Migrate from Zola

accent import zola reads a Zola site and writes a new Accent site beside it. It never writes into the Zola site. It works as accent import hugo does: the same flags, the same report, and the same component stubs and agent kit.

# Show what the import changes. Nothing is written.
accent import zola ./my-zola-site

# Write the new site to ./my-zola-site-accent
accent import zola ./my-zola-site --write

What the import changes

ZolaAccent
+++ TOML frontmatterYAML frontmatter, with the comments kept. Blank lines before +++ are removed
_index.mdindex.md
template = "theme.html"template: theme, and a template stub in themes/zola-import/templates/
redirect_toredirect
pathurl, from the site root
2024-01-02-hello.mdhello.md with date: 2024-01-02. The rest of the name is slugified, as Zola does
slugThe file name. A page bundle directory takes the new name with its files
page.fr.mdA page of the fr language, at /fr/...
aliases = ["old"]aliases: [/old]. Zola reads an alias from the site root
page_template of a sectiontemplate of each page below it that names no template
/x/ URLssite.trailing_slash: always
(@/path/page.md#x)(/path/page/#x)
{{ <name a="1" n={2} flag /> }}{% name a="1" n="2" flag="true" /%}
{{ <name> }} ... {{ </name> }}{% name %} ... {% /name %}
{{ name(a="1") }}, from before Zola 0.23{% name a="1" /%}
{% name(a="1") %} ... {% end %}, from before Zola 0.23{% name a="1" %} ... {% /name %}
{{ "text" }}text. A string that holds template syntax becomes inline code
{# comment #}Removed
{% raw %}, {% endraw %}Removed. The text between them is written as inline code
sort_by, paginate_by, and other section keysKept and counted. They have no Accent meaning

Template syntax and @/ links in code stay as written. A page that skip_content_templating excludes keeps its Tera as text, as inline code.

Tera that has no Accent form, such as {% if %}, {% set %}, or {{ config.title }} in prose, becomes inline code, so it shows as text. The report lists each one with its file and line, for you to rewrite. It also lists each @/ link to a page that does not exist, and each component argument whose value is an expression, such as title={page.title}. The import drops that argument.

Convert the stubs

Each Zola component becomes a stub in themes/zola-import/shortcodes/. The comment at the top of the stub template holds the {% component %} block from the Zola templates. Convert the stubs as the Hugo guide describes: import/STUBS.md, import/report.json, and import/SKILL.md are the same.