diff options
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | templates/base.html | 4 | ||||
| -rw-r--r-- | templates/page.html | 4 |
3 files changed, 8 insertions, 3 deletions
@@ -41,7 +41,7 @@ To enable listing of pages in homepage add the following in `config.toml` ```toml [extra] -list_pages = false +list_pages = true ``` ### Header and footer nav links @@ -56,6 +56,7 @@ header_nav = [ { name = "#tags", url = "/tags" }, { name = "+categories", url = "/categories" }, { name = "@contexts", url = "/contexts" }, + { name = "example", url = "http://example.com", new_tab=true }, ] footer_nav = [ { name = "< previous", url = "#" }, diff --git a/templates/base.html b/templates/base.html index e4d358e..8c737df 100644 --- a/templates/base.html +++ b/templates/base.html @@ -100,7 +100,7 @@ {% if config.extra.header_nav %} <nav> {% for nav_item in config.extra.header_nav %} - <a href="{{ nav_item.url | safe }}">{{ nav_item.name }}</a> + <a href="{{ nav_item.url | safe }}" {% if nav_item.new_tab %}target="_blank" rel="noreferrer noopener"{% endif %}>{{ nav_item.name }}</a> {% endfor %} </nav> {% endif %} @@ -122,4 +122,4 @@ </div> </body> </html> -
\ No newline at end of file + diff --git a/templates/page.html b/templates/page.html index aab169f..35221dc 100644 --- a/templates/page.html +++ b/templates/page.html @@ -37,12 +37,16 @@ Table of contents {% for tag in page.taxonomies.tags %} <a href="/tags/{{ tag | slugify }}">#{{ tag }}</a> {% endfor %} +{% if page.taxonomies.categories %} {% for category in page.taxonomies.categories %} <a href="/categories/{{ category | slugify }}">+{{ category }}</a> {% endfor %} +{% endif %} +{% if page.taxonomies.contexts %} {% for context in page.taxonomies.contexts %} <a href="/contexts/{{ context | slugify }}">@{{ context }}</a> {% endfor %} {% endif %} +{% endif %} </p> {% endblock footer %}
\ No newline at end of file |
