Skip to content

Next version - #3089

Merged
Keats merged 51 commits into
masterfrom
next
Aug 5, 2026
Merged

Next version#3089
Keats merged 51 commits into
masterfrom
next

Conversation

@Keats

@Keats Keats commented Jan 22, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@Stebe25

Stebe25 commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

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 <pre><code> </code></pre>, if there is a tab before the html tag; e.g. after "%}" or empty lines:

{% component wraps_in_pre_code() %}
	<p>tab => wrapped in pre-code</p>
<p>no tab  => not wrapped</p>
	<p>tab => not wrapped</p>

	<p>tab => wrapped in pre-code</p>
{% if x %}{% endif %}
	<p>tab => wrapped in pre-code</p>
{% if x %}{% endif -%}
	<p>tab => not wrapped</p>
{% endcomponent %}

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).

@Keats

Keats commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for trying!

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.

I just pushed a commit to fix that, good catch!

Components sometimes wrap their output (or parts of it) in

 
, if there is a tab before the html tag; e.g. after "%}" or empty lines:

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.

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).

Do you mean shortcodes? You can pass it explicitly to the components that need it eg {{ <component config lang /> }} assuming the components parameters are called config/lang.

@Stebe25

Stebe25 commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

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.

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.

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).

Do you mean shortcodes? You can pass it explicitly to the components that need it eg {{ <component config lang /> }} assuming the components parameters are called config/lang.

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.
For most use cases lang is probably not that important anymore since the trans function no longer needs the currently mandatory "lang=lang" to get the translation (in multilingual sites). The num_format filter still needs a locale argument though.

I forgot to mention that {{ __tera_context }} no longer works. And the filters num_format and markdown are "unknown".

@Keats

Keats commented Feb 28, 2026

Copy link
Copy Markdown
Collaborator Author

macros also had access to these variables without explicitly passing them

Hmm no macros were the same as components, you wouldn't get anything outside of what is defined in the macro parameter

I forgot to mention that {{ __tera_context }} no longer works.

😕 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
@Stebe25

Stebe25 commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

I forgot to mention that {{ __tera_context }} no longer works.

😕 there's even a test for that! do you have a sample template where it fails?

Sure, works on version <= 0.22, but fails for 0.23.
tera_context.zip

@Keats

Keats commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator Author

Ok found the issue: Keats/tera2#103
I'll publish a new alpha later today

Keats and others added 9 commits March 5, 2026 10:54
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>
SilensAngelusNex and others added 6 commits June 17, 2026 22:57
* 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.
@ARitz-Cracker

Copy link
Copy Markdown
Contributor

Hey, noticed that tera v2 was released recently, just wanted to say congrats! 🎉

@Keats

Keats commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks!

Keats added 3 commits July 18, 2026 15:03
# Conflicts:
#	docs/content/documentation/content/shortcodes.md
#	docs/content/documentation/themes/extending-a-theme.md
sassman and others added 12 commits July 18, 2026 15:32
* 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
@Keats
Keats merged commit 97aba0f into master Aug 5, 2026
13 of 14 checks passed
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.