Migrate templates to Zola 0.23 / Tera v2

bin/update-zola always installs the latest release, which as of
v0.23.0 rewrote the template engine to Tera v2. That broke the whole
site: removed filters (slice, concat, escape), test calls now require
named args, shortcodes are gone in favor of Tera components, and
content itself is now Tera-templated before markdown runs.

- slice(end=n) -> native [:n] slicing; concat(with=x) -> spread [...arr, x]
- escape -> escape_html; starting_with/containing -> named `pat` arg
- get_taxonomy_url `name` -> `term` (old name is deprecated)
- %+ date format no longer recognized; replaced with explicit RFC3339 pattern
- shortcodes (note/tip/warning/danger/youtube) rewritten as components;
  content call sites updated to component invocation syntax
- {% include %} no longer inherits for-loop-local variables (only ambient
  page/section context) - post-card.html converted to a component that
  takes page/index explicitly instead of relying on implicit `page`/`loop`
- two content code blocks with literal Jinja-style {{ }} syntax (Netlify
  CMS config, a Flask template snippet) wrapped in {% raw %} so Tera
  doesn't try to render them, since content is now templated too
- fixed a real content corruption bug along the way: the youtube
  shortcode's multi-line <iframe> tag had a conditional that could
  collapse to a whitespace-only line, which prematurely closed the
  HTML block under CommonMark rules and got the rest of the tag
  syntax-highlighted as code instead of rendered

Verified with a clean `zola build` and `zola serve` on v0.23.1, plus a
spot-check of the rendered HTML for both callouts and the video embed.
`zola check` only reports pre-existing external link rot, unrelated to
this change.
This commit is contained in:
2026-08-07 10:46:09 +03:00
parent e0a7feed3e
commit e992baf2d2
17 changed files with 52 additions and 46 deletions
@@ -7,7 +7,7 @@ date = 2026-04-08
tags = ["assembly", "rev", "pwn"]
+++
{{ youtube(id="KbH239zvDtM") }}
{{<youtube id="KbH239zvDtM" page={page} config={config} />}}
Before diving into how to break a program, we need to understand what the computer is actually executing. When you write a C program, the processor doesn't understand a single line of it. The C language exists for *our* benefit, allowing us to write logic without having to manually shuffle bits around in the processor.
@@ -78,9 +78,9 @@ In x64 Linux, when a function is called, the arguments are passed directly into
5. `r8` (Fifth argument)
6. `r9` (Sixth argument)
{% note() %}
{% <note> %}
In older x86 32-bit binaries, arguments aren't passed in registers at all; they are pushed onto the stack. When a function finishes and returns a value, that return value is almost always placed in the **`rax`** register (or `eax` in 32-bit).
{% end %}
{% </note> %}
### **Register Sizes and "Words"**
+2
View File
@@ -76,6 +76,7 @@ The first file, `admin/index.html`, is the entry point for the Netlify CMS admin
Now let’s move to the configuration section. These are the configurations that go into the `config.yml` file. This process is different for every site. I followed the guidelines on the website and made minor adjustments. It worked on my website. The configuration options are available at the [docs](<https://www.netlifycms.org/docs/add-to-your-site/#:~:text=%2C%20MyTemplate)-,Configuration,-Configuration%20is%20different>). This is how I configured my config.yml file:
```yaml
{% raw %}
backend:
name: git-gateway
branch: netlify-cms # Branch to update (optional; defaults to master)
@@ -104,6 +105,7 @@ collections:
- { label: 'Categories', name: 'categories', widget: 'list' }
- { label: 'Comments', name: 'comment', widget: 'boolean', default: true }
- { label: 'Table of Contents', name: 'toc', widget: 'boolean', default: true }
{% endraw %}
```
**Step 5**
+2
View File
@@ -41,6 +41,7 @@ upload.html
display.html
```html
{% raw %}
<!DOCTYPE html>
<html>
<head>
@@ -60,6 +61,7 @@ display.html
<p><a href="/">Upload another image</a></p>
</body>
</html>
{% endraw %}
```
`[app.py](http://app.py)`