This PR contains the main breaking(ish) changes for Pagefind 1.0
The default location that Pagefind outputs files to is now /pagefind/ instead of /_pagefind/
Reasoning: Some hosting providers do not host directories that lead with an underscore by default:
188
Backwards compat: This is the main breaking change being introduced for 1.0.
In this PR, Pagefind will look at pages as it is indexing and see if it encounters any CSS or JS links with a /_pagefind/... URL. If one is found, then Pagefind will output all search files to both/pagefind/ and /_pagefind/.
This approach will miss any setups where the page with search assets is excluded by a glob, or sites where the JS API is used directly from a script.
My hope is that the majority of sites are using the default UI, and sites using a more advanced setup are more likely to be setting a custom directory, or be pinning the version of Pagefind they run such that a conscious 1.0 migration is possible.
The --bundle-dir option has been renamed to --output-subdir
Reasoning: This option was repeatedly confusing:
#68
#138
Backwards compat:--bundle-dir is still honoured (and warned on)
A --output-path option that is not relative to the indexed site has been introduced
Reasoning: Not a breaking change, but a new addition to help clarify the above option
The --source option has been renamed to --site for clarity
Reasoning: By default Pagefind modifies this directory, which is unusual for a source directory. site is more neutral.
Mentioned in #68
Backwards compat:--source is still honoured (and warned on)
Backwards compat:-s now aliases to site instead of source
This PR contains the main breaking(ish) changes for Pagefind 1.0
/pagefind/
instead of/_pagefind/
188
/_pagefind/...
URL. If one is found, then Pagefind will output all search files to both/pagefind/
and/_pagefind/
.--bundle-dir
option has been renamed to--output-subdir
--bundle-dir
is still honoured (and warned on)--output-path
option that is not relative to the indexed site has been introduced--source
option has been renamed to--site
for claritysource
directory.site
is more neutral.--source
is still honoured (and warned on)-s
now aliases tosite
instead ofsource