Conversation
|
While trying out the next branch, I noticed a couple of things: get_url for static files is broken in multilingual sites (e.g. path="style.css"): zola prepends "lang/" to the path if the page/section lang is not the default language. Components sometimes wrap their output (or parts of it) in Macros had access to the config and lang variables, while components do not (config and lang are therefore not available in templates included in components). |
|
Thanks for trying!
I just pushed a commit to fix that, good catch!
That's sadly a CommonMark "feature". Things that are indented by 4 spaces are considered a code block. I'm very tempted to fork pulldown-cmark and remove that as it just causes issues non stop.
Do you mean shortcodes? You can pass it explicitly to the components that need it eg |
Thanks, now that I know that, I can simply change my tab spaces or simply use -%}, but could be quite annoying for someone who doesn't know that.
I haven't used components much, because I ran into the CommonMark "feature", but from what I've seen, they turned out really nice! I mean shortcodes too, but macros also had access to these variables without explicitly passing them. Just thought to mention it, because it was useful if you don't have to pass config and lang around (almost) everywhere. I forgot to mention that |
Hmm no macros were the same as components, you wouldn't get anything outside of what is defined in the macro parameter
😕 there's even a test for that! do you have a sample template where it fails? |
* register num_format and markdown filter * register num_format and markdown filter * register num_format and markdown filter
Sure, works on version <= 0.22, but fails for 0.23. |
|
Ok found the issue: Keats/tera2#103 |
Co-authored-by: Asher Bernstein-Meachum <dev.asherbm.untracked946@passinbox.com>
* feat: get_page optional param allow_missing Signed-off-by: Lazaro O'Farrill <lazaroofarrill@gmail.com> * feat: get_section optional param allow_missing Signed-off-by: Lazaro O'Farrill <lazaroofarrill@gmail.com> --------- Signed-off-by: Lazaro O'Farrill <lazaroofarrill@gmail.com>
* test: consolidate accent term assertion into existing test (per @Keats review) Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com> * style: apply rustfmt Signed-off-by: SAY-5 <saiasish.cnp@gmail.com> --------- Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com> Signed-off-by: SAY-5 <saiasish.cnp@gmail.com> Co-authored-by: SAY-5 <SAY-5@users.noreply.github.com> Co-authored-by: SAY-5 <saiasish.cnp@gmail.com>
Add `#[serde(deny_unknown_fields)]` to the `Highlighting` struct so that typos like `extra_grammar` (instead of `extra_grammars`) produce a clear error at config load time. The `#[serde(flatten)]` on `HighlightConfig` was incompatible with `deny_unknown_fields`, so the theme configuration is now represented as explicit `theme`, `light_theme`, and `dark_theme` Option fields with validation in `init()`. Closes #3127
…3156) * Fix Create notifications on Windows; Fix Remove notifications * Run cargo fmt
No description provided.