Pagefind (pagefind v0.1.0)
Pagefind is an installer and runner for Pagefind
It will always download the pagefind_extended
release,
which includes specialized support for indexing Chinese and Japanese pages.
Pagefind configuration
There are the global configurations for the pagefind application:
:version
- the expected pagefind version, defaults to1.3.0
the latest known version at the time of publishing this package.:path
- the path to find the pagefind executable at. By default, it is automatically downloaded and placed inside the_build
directory of your current app:target
- the target architecture for the pagefind executable. For example"x86_64-unknown-linux-musl"
. By default, it is automatically detected based on system information.:args
- the default arguments to pass to the pagefind executable. By default, it is an empty list. Read the pagefind documentation for more information on the available arguments.:env
- optional environment variables to pass to the pagefind executable.config :pagefind, args: ~w( --site _site ), env: %{"PAGEFIND_OUTPUT_SUBDIR" => "pagefind"}
Overriding the :path
is not recommended, as we will automatically
download and manage pagefind
for you. But in case you can't download
it (for example, GitHub behind a proxy), you may want to
set the :path
to a configurable system location.
You can check the pagefind docs for more information on how to install it.
config :pagefind, path: "/path/to/pagefind"
Summary
Functions
Returns the path to the executable.
Returns the version of the pagefind executable.
Returns the configured pagefind target. By default, it is automatically detected.
Returns the configured pagefind version.
The default URL to install Pagefind from.
Installs pagefind with configured_version/0
.
Installs, if not available, and then runs pagefind
.
Runs the given command with args
.
Functions
Returns the path to the executable.
The executable may not be available if it was not yet installed.
Returns the version of the pagefind executable.
Returns {:ok, version_string}
on success or :error
when the executable
is not available.
Returns the configured pagefind target. By default, it is automatically detected.
Returns the configured pagefind version.
The default URL to install Pagefind from.
Installs pagefind with configured_version/0
.
Installs, if not available, and then runs pagefind
.
Returns the same as run/1
.
Runs the given command with args
.
The given args will be appended to the configured args. The task output will be streamed directly to stdio. It returns the status of the underlying call.