From 49072447055e3b46fcf2839168f65350e02fae03 Mon Sep 17 00:00:00 2001 From: southerntofu Date: Wed, 22 Apr 2020 18:19:50 +0200 Subject: [PATCH] config.extra.home_title affects home both as page and section --- templates/index.html | 3 ++- theme.toml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/index.html b/templates/index.html index cee9a65..4002c00 100644 --- a/templates/index.html +++ b/templates/index.html @@ -37,8 +37,9 @@ {% block main %} {% if config.extra.home_section %} {% set home_section = config.extra.home_section ~ "/_index.md" %} - {{ widgets::section(cur_section=get_section(path=widgets::i18n_path(path=home_section)), full_articles=config.extra.home_fullarticles, title=config.extra.home_sectiontitle) }} + {{ widgets::section(cur_section=get_section(path=widgets::i18n_path(path=home_section)), full_articles=config.extra.home_fullarticles, title=config.extra.home_title) }} {% else %} + {% if config.extra.home_title %}

{{ section.title }}

{% endif %} {{ section.content | markdown | safe }} {% endif %} {% endblock %} diff --git a/theme.toml b/theme.toml index 5fea234..e683721 100644 --- a/theme.toml +++ b/theme.toml @@ -24,14 +24,15 @@ max_width_for = "main" # Can be either main or body # setting. 800px is the water.css default max_width = "800px" +# Show/hide home title, whether the home_section's or the homepage's. +home_title = true # If home_section is empty, homepage is generated from the content of the index # page content/_index*.md. If you want to display a section's latest articles on # the homepage, set home_section to the name of this section without _index.md, # like "blog" for content/blog/. Pagination is defined by this section's # pagination settings. home_section = "" -# Show/hide home section title (only when home_section is set) -home_sectiontitle = true + # Determines whether to show full articles on the homepage. If disabled, it will # only show summaries (if they are defined in the content), or the date/title. # (only when home_section is set)