-
DescriptionOn my previous websites using Gatsby or eleventy I was able to generate metadata at build time. For example: extracting information from file path:
This is handled by an awesome feature called data cascade in eleventy see the doc here. Is it possible to do something similar in quarto? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Yes, you can use pre-render script and the 1.5 pre-release.
Note that |
Beta Was this translation helpful? Give feedback.
-
Thank you @mcanouil for these directions , I'll investigate on pre-render scripts with 1.5 version. Is there any way to change the url to a page dynamically or is it always computed from the file path? |
Beta Was this translation helpful? Give feedback.
-
It seems that manipulating function Meta(meta)
local title = meta.title
meta["title"][1]["text"] = "New title"
return meta
end Title is set correctly for the document but breadcumb and navbars are not updated. I imagine that the only way to handle this specific use is to modify the |
Beta Was this translation helpful? Give feedback.
Some metadata are needed to actually build the structure and for Quarto to know what to build and where.
Your filter to modify the title is a bit odd but if it works.
Use
format: native
and look at the AST representation of the document when developing filter, it helps.As I said,
permalink
does not exist, but you can define redirection in your YAML frontmatter.I don't know if it will work to generate them dynamically in a pre-render script though.