Files
gitea-pages/pages/special-layouts/kb_layout.md

2.0 KiB

title, permalink, tags, keywords, audience, last_updated, summary, metadata
title permalink tags keywords audience last_updated summary metadata
Knowledge-base homepage /kb_layout/ special-layouts false

{% include linkrefs.html %}

This shows a sample layout for a knowledge base. Each square could link to a tag archive page. In this example, font icons from Font Awesome are enlarged to a large size. You could also add captions below each icon, and so forth. In a real implementation, you would probably make your own square graphics that included the text inside them.

 

Linking to non-tag archive pages

If you don't want to link to a tag archive index, you could link to a page with code like this: {% raw %}

Here are all pages tagged with getting_started:

<ul>
{% assign counter = '0' %}
{% for page in site.pages %}
{% for tag in page.tags %}
{% if tag == "getting-started" and counter < '25' %}
{% capture counter %}{{ counter | plus:'1' }}{% endcapture %}
<li><a href="{{ page.permalink | prepend: site.baseurl }}">{{page.title}}</a></li>
{% endif %}
{% endfor %}
{% endfor %} 
</ul>

{% endraw %}