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>
* Make ImageMetadataResponse creation non-pub * Change get_image_metadata error message context Include the file extension we're using, and make it clear that we're reading metadata, not necessarily the image itself. * Move format specific logic into new_svg and new_avif * Make helpers take parsed exif data instead of raw This way we won't have to parse multiple times when calling multiple helpers. * Add description and created fields to ImageMetaResponse * Wrap helpers.rs functions in Result Bubble errors up to the caller so that error messages have the full context and so that it's clear when the result means "We successfully checked the metadata, and should make no changes." * Change helper functions to support missing image metadata Change the helper.rs functions to make it easier for meta.rs to only log to stderr in cases where not being able to get the EXIF metadata fields is actually an issue. For example, it's not a problem if an image has no description field or if an image is missing EXIF metadata all together, but it is a problem if the image has metadata but we're unable to parse it, or if fields have data, but for an unexpected type. * Remove eprintlns for missing metadata We exepect to encounter image files missing any/all of these metadata fields; don't log errors in these cases.
|
Hey, noticed that tera v2 was released recently, just wanted to say congrats! 🎉 |
|
Thanks! |
# Conflicts: # docs/content/documentation/content/shortcodes.md # docs/content/documentation/themes/extending-a-theme.md
* feat: exclude individual pages from RSS/Atom feeds Follow-up to #3125, closes #3124. - pages can opt out of all feeds via `include_in_feeds = false` in front matter - defaults to true, so existing behavior is unchanged - expose as template variable for conditional rendering Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me> * fix: formatting Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me> * fix: clippy findings Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me> * Add render check --------- Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me> Co-authored-by: Vincent Prouillet <github@vincentprouillet.com>
* Optional filter for resize_image * Log instead of println
* Resolve colocated assets in @/ links Closes #2598 * Make colocated asset resolve with @/ in markdown as well * Fix md @/ links to be lang aware like get_url
* fix(serve): rebuild the whole site when anchor-link.html changes Editing templates/anchor-link.html during `zola serve` recompiled the Tera template registry but did not update the served pages: the heading anchors it renders are produced during Markdown rendering, which a template reload does not re-run. The change only appeared after a manual restart. Detect templates consumed during Markdown rendering (anchor-link.html) among the changed template files and trigger a full site rebuild for them, instead of a template-only reload. Other template changes keep the existing reload-only fast path. Closes #2940 * Inline the full-rebuild template list per review Replace the fs_utils helper and its test with an inline ALWAYS_FULL_REBUILD list in the serve watcher. * Move the full-rebuild template list to the top of the file
No description provided.