config.extra.home_title affects home both as page and section

This commit is contained in:
southerntofu 2020-04-22 18:19:50 +02:00
parent 9cb9250f46
commit 4907244705
2 changed files with 5 additions and 3 deletions

View File

@ -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 %}<h1 class="p-name">{{ section.title }}</h1>{% endif %}
{{ section.content | markdown | safe }}
{% endif %}
{% endblock %}

View File

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