Skip to content

Commit

Permalink
fix: remove hardcoded section for docs & blog
Browse files Browse the repository at this point in the history
  • Loading branch information
ledoyen committed Sep 11, 2022
1 parent 5c69827 commit 63010fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
{{ macros_head::resource() }}
{{ macros_head::stylesheet() }}

{% if current_path -%}
{% set current_section = current_path | split(pat="/") | nth(n=1) -%}
{% else -%}
{% set current_section = '/' -%}
{% endif -%}

{% block seo %}
{% if config.extra.title_separator %}
{% set title_separator = " " ~ config.extra.title_separator ~ " " %}
Expand Down
2 changes: 0 additions & 2 deletions templates/blog/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
{% extends "page.html" %}

{% block seo %}
{# This value is matched by the config.extra.menu.main->section #}
{% set_global current_section = 'blog' %}
{{ super() }}
{% endblock seo %}

Expand Down
2 changes: 0 additions & 2 deletions templates/docs/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
{% endblock body %}

{% block header %}
{# This value is matched by the config.extra.menu.main~url #}
{% set current_section = "docs" %}
{{ macros_header::header(current_section=current_section)}}
{% endblock header %}

Expand Down

0 comments on commit 63010fd

Please sign in to comment.