docs: beef up entrypoint documentation page

Let's use the rough categorization of the markdown pages to add basic
sections, via Jeykll templating. Also, add in a couple of additional
links via a JSON array that lists them.

So much web development, so much wow!
This commit is contained in:
Lennart Poettering 2019-12-11 10:49:59 +01:00
parent 4cdca0af11
commit 5d3f5e4081
2 changed files with 19 additions and 3 deletions

View File

@ -0,0 +1,10 @@
[
{ "category": "Project", "title": "Brand", "url": "https://brand.systemd.io/" },
{ "category": "Project", "title": "Releases", "url": "https://github.com/systemd/systemd/releases" },
{ "category": "Project", "title": "GitHub Project Page", "url": "https://github.com/systemd/systemd" },
{ "category": "Project", "title": "Issues", "url": "https://github.com/systemd/systemd/issues" },
{ "category": "Project", "title": "Pull Requests", "url": "https://github.com/systemd/systemd/pulls" },
{ "category": "Project", "title": "Mailing List", "url": "https://lists.freedesktop.org/mailman/listinfo/systemd-devel" },
{ "category": "Manual Pages", "title": "Index", "url": "https://www.freedesktop.org/software/systemd/man/" },
{ "category": "Manual Pages", "title": "Directives", "url": "https://www.freedesktop.org/software/systemd/man/systemd.directives.html" }
]

View File

@ -4,8 +4,14 @@ title: systemd Documentation
# systemd Documentation
{% for p in site.pages %}
{% if p.url != page.url and p.title %}
* [{{ p.title }}]({{ p.url | relative_url }})
{% assign by_category = site.pages | group_by:"category" %}
{% assign extra_pages = site.data.extra_pages | group_by:"category" %}
{% assign merged = by_category | concat: extra_pages | sort:"name" %}
{% for pair in merged %}
{% if pair.name != "" %}
## {{ pair.name }}
{% assign sorted = pair.items | sort:"title" %}{% for page in sorted %}
* [{{ page.title }}]({{ page.url | relative_url }}){% endfor %}
{% endif %}
{% endfor %}