Make ignore
s in all plugins more adaptable: Read from file / folder
#8
Labels
🚧 config
Configuration file updates
⏫ enhancement
New feature or request
🆘 help wanted
Extra attention is needed
📦 package
Updates in package structure or package.json
Milestone
In larger documentation websites, like e.g. the Astro docs, it will be hard to maintain a list of strings in the
astr.config.mjs
file for the words that should be ignored by the different plugins.I therefore recommend, implementing a more dynamic zod schema for all
ignore
fields, which can either be a list of words to ignore (z.array(z.string()).default([])
) or a file path to a single file or folder (z.string().optional()
). In case the string has a file extension, it can be assumed that this is a file, if it ends with/
than we can assume, that in this folder there exist files with the locals, e.g.:en.md
,fr.md
,de.md
.This would lead to some kind of zod definition which looks like this:
One difficult point is how to read the relative path of the file from the plugin. Therefore, I'll set the milestone to
v0.2.0
as I think I rather wanna publish the v0.1 soon and can implement this logic later.The text was updated successfully, but these errors were encountered: