This is an automated email from the ASF dual-hosted git repository. ddekany pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/freemarker-docgen.git
commit cf09fc5d72febb9bc0e66dc74302d6cd118c7483 Author: ddekany <[email protected]> AuthorDate: Sun Jun 22 12:13:27 2025 +0200 Pagefind: Updated README --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f805aff..b23124b 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ These tools must be installed: * [Node.js](https://nodejs.org/) was tested with 22.15.0. (Node.js is only used to generate static content while building Docgen itself.) -To build, ensure that `npm` (from Node.js) is in the path, then in the top project directory +To build, ensure that `npm` and `bpx` (from Node.js) are in the path, then in the top project directory (`freemarker-docgen`) issue this: ```mvn install``` @@ -75,6 +75,24 @@ This happens automatically during build, in the `generate-resources` Maven phase The generated output is in `target\resources-gulp`, which will be included in the core jar artifact. + +### Pagefind (search) support + +Can be enabled in the `docgen.cjson` (a file that's normally next to the DocBook XML) via `pagefindBasedSearch: true`. + +Pagefind indexing is done when generating the docgen output from the DocBook XML. The output is fully static HTML, with +purely cline-side JavaScript that generates the search results. However, due to browser security restrictions, the +search functionality will only work if you visit via HTTP(S), and not via a `file:` URL. For local testing you can use +`npx http-server` for example. + +When `pagefindBasedSearch` is `true`, Node.js has to be available where Docgen generates its output (the HTML-s), and +not just when building Docgen itself! That's because Pagefind indexing depends on Node.js. + +\[TODO]: +- TOC hierarchy of pages aren't correctly detected +- Lower `data-pagefind-weight` for the marked sections (typically for Version History, Alphabetical Index) + + ## Releasing a new Docgen version \[TODO] Standard ASF release procedure (staging, voting, etc.), so that we can release
