From 5d3f5e4081964694dd08b9083c923a47eeff79e9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Dec 2019 10:49:59 +0100 Subject: [PATCH] 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! --- docs/_data/extra_pages.json | 10 ++++++++++ docs/index.md | 12 +++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 docs/_data/extra_pages.json diff --git a/docs/_data/extra_pages.json b/docs/_data/extra_pages.json new file mode 100644 index 0000000000..5ede56c6fc --- /dev/null +++ b/docs/_data/extra_pages.json @@ -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" } +] diff --git a/docs/index.md b/docs/index.md index ffb30b9634..2969162a2a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 %}