diff --git a/config.toml b/config.toml index ac413ac..fa78039 100644 --- a/config.toml +++ b/config.toml @@ -7,6 +7,8 @@ compile_sass = true # Whether to build a search index to be used later on by a JavaScript library build_search_index = true +title = "Elf's Notes" + [markdown] # Whether to do syntax highlighting # Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola diff --git a/content/docs/zola/_index.md b/content/docs/zola/_index.md index 3091169..17105b8 100644 --- a/content/docs/zola/_index.md +++ b/content/docs/zola/_index.md @@ -3,7 +3,7 @@ title = "Zola" description = "Zola is a static site generator" date = 2025-05-01T18:00:00+00:00 updated = 2021-05-01T18:00:00+00:00 -template = "section.html" +template = "docs/section.html" sort_by = "weight" weight = 4 draft = false @@ -65,6 +65,16 @@ that comes after it. ### Statements +#### `block` + +The `block` is probably the most important statement; it defines a chunk of +content. When a template is created, it can define its whole content as a +block, and it can define subsections (note: section is a heavily overloaded +word) of itself. These blocks can be used as-is, or replaced when another +template inherits them and overwrites them. + + + #### `set` Variables are set in a given scope with `set`: @@ -101,8 +111,8 @@ The list of `is` tests that are shipped with Zola are: - `ending_with(string)`: Returns true if the given variable is a string and ends with the arg given. - `containing(val)`: Returns true if the given variable contains the arg given. - strings: is the arg a substring? - - arrays: is the arg given one of the members of the array? - - maps: is the arg given a key of the map? + - arrays: is the arg one of the members of the array? + - maps: is the arg a key of the map? - `matching(regexp)`: Returns true if the given variable is a string and matches the regex in the argument. #### `for` @@ -169,6 +179,9 @@ And an example of this macro (again, in the `header.html` file) would look like ``` + + + ```jinja2 {% raw %}Content {{ goes here }}{% endraw %} ``` diff --git a/templates/docs/section.html b/templates/docs/section.html index dc6d1c8..b92109b 100644 --- a/templates/docs/section.html +++ b/templates/docs/section.html @@ -6,7 +6,7 @@ {% block header %} {% set current_section = "docs" %} -{{ macros_header::header(current_section=current_section)}} +{{ header::header(current_section=current_section)}} {% endblock header %} {% block content %} diff --git a/templates/section.html b/templates/section.html index a7dc9c3..baa1002 100644 --- a/templates/section.html +++ b/templates/section.html @@ -2,28 +2,6 @@ {% extends "base.html" %} -{% block seo %} -{{ super() }} -{% set title_addition = "" %} - -{% if section.title and config.title %} -{% set title = section.title %} -{% set title_addition = title_separator ~ config.title %} -{% elif section.title %} -{% set title = section.title %} -{% else %} -{% set title = config.title %} -{% endif %} - -{% if section.description %} -{% set description = section.description %} -{% else %} -{% set description = config.description %} -{% endif %} - -{{ macros_head::seo(title=title, title_addition=title_addition, description=description) }} -{% endblock seo %} - {% block body %} {% if section.extra.class %} {% set page_class = section.extra.class %}