Skip to content

Conversation

@slusarz
Copy link
Contributor

@slusarz slusarz commented Nov 20, 2025

Providing static versions of the fully parsed/transformed data files used to build the documentation may be useful, since it allows things like, e.g., parsing the settings or doveadm config files for use in automated coding and tasks.

To get to this point, needed to refactor the data file parsing code to allow for these files to be generated at the appropriate points to be added to the build process.

Side effect: this allowed us (me) to finally fix the bootstrapping problem with the data files. We need to do a pre-scan of all files before beginning the actual transformation, since we need to build various lookup tables (e.g. links, settings) in order to replace markdown tokens. This was fixed by taking advantage of the vite "configResolved" plugin hook, which is the appropriate place to do this initialization.

It only took a year, but finally figured out that vite provides a plugin/hook
(configResolved()) that allows us to execute code AFTER the configuration has
been fully parsed and BEFORE the page transformations start.

This is the correct place to force full loading of the various data files,
since they need to pre-scan all the files for, e.g., frontmatter data needed
to do proper inter-page linking.

This allows us to use core javascript async/await functionality, rather than
the somewhat hackish previous method of using "import-sync" module.
@github-actions

This comment has been minimized.

@slusarz slusarz force-pushed the data_parsing_refactor branch from 52d1338 to a381519 Compare November 20, 2025 04:02
@github-actions

This comment has been minimized.

…umentation

Providing static versions of the fully parsed/transformed data files used
to build the documentation may be useful, since it allows things like,
e.g., parsing the settings or doveadm config files for use in automated
coding and tasks.
@slusarz slusarz force-pushed the data_parsing_refactor branch from 6fe134c to fe13c5d Compare November 20, 2025 04:18
There's ~4000 empty keys, so just need to refactor a few locations to ignore missing
keys and we can substantially reduce the size of the chunk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant