]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
docs: generate index.md in Jekyll 11317/head
authorFilipe Brandenburger <filbranden@google.com>
Wed, 2 Jan 2019 22:20:39 +0000 (14:20 -0800)
committerFilipe Brandenburger <filbranden@google.com>
Wed, 2 Jan 2019 22:23:18 +0000 (14:23 -0800)
This uses a {% for %} loop in Jekyll to render the page, from the "title"
information in the Front Matter of the actual page files.

This also makes `make-index-md` build rule unnecessary, since generation is
done by the template engine itself.

Tested this by running Jekyll locally.

docs/index.md
meson.build
tools/make-index-md.sh [deleted file]

index 890c4f8e767ba5c0df6cb4fbd9608f0f6e324914..ffb30b9634c0f227741059df8f4dd23b1dd690d9 100644 (file)
@@ -4,21 +4,8 @@ title: systemd Documentation
 
 # systemd Documentation
 
-* [Automatic Boot Assessment](https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT)
-* [Locking Block Device Access](https://systemd.io/BLOCK_DEVICE_LOCKING)
-* [The Boot Loader Interface](https://systemd.io/BOOT_LOADER_INTERFACE)
-* [The Boot Loader Specification](https://systemd.io/BOOT_LOADER_SPECIFICATION)
-* [Control Group APIs and Delegation](https://systemd.io/CGROUP_DELEGATION)
-* [The systemd Community Conduct Guidelines](https://github.com/systemd/systemd/blob/master/docs/CODE_OF_CONDUCT.md)
-* [Code Quality Tools](https://systemd.io/CODE_QUALITY)
-* [Coding Style](https://systemd.io/CODING_STYLE)
-* [Contributing](https://github.com/systemd/systemd/blob/master/docs/CONTRIBUTING.md)
-* [Porting systemd To New Distributions](https://systemd.io/DISTRO_PORTING)
-* [Predictable Network Interface Names](https://systemd.io/PREDICTABLE_INTERFACE_NAMES)
-* [Known Environment Variables](https://systemd.io/ENVIRONMENT)
-* [Hacking on systemd](https://systemd.io/HACKING)
-* [Portable Services Introduction](https://systemd.io/PORTABLE_SERVICES)
-* [Steps to a Successful Release](https://systemd.io/RELEASE)
-* [What settings are currently available for transient units?](https://systemd.io/TRANSIENT-SETTINGS)
-* [Notes for Translators](https://systemd.io/TRANSLATORS)
-* [Users, Groups, UIDs and GIDs on `systemd` Systems](https://systemd.io/UIDS-GIDS)
+{% for p in site.pages %}
+  {% if p.url != page.url and p.title %}
+* [{{ p.title }}]({{ p.url | relative_url }})
+  {% endif %}
+{% endfor %}
index f74a0bf3b2d82b4bafa3da8ccf3804537f52d539..b4af6a790cd48242bf9565c84163eb807cef1d87 100644 (file)
@@ -3050,10 +3050,6 @@ run_target(
         depends : [man, libsystemd, libudev],
         command : [meson_check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
 
-run_target(
-        'make-index-md',
-        command : ['sh', '@0@/tools/make-index-md.sh'.format(meson.source_root()), meson.source_root()])
-
 ############################################################
 
 status = [
diff --git a/tools/make-index-md.sh b/tools/make-index-md.sh
deleted file mode 100755 (executable)
index 78506cb..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-set -eu
-
-cd "$@"/docs/
-(
-        echo -e "# systemd Documentation\n"
-
-        for f in *.md ; do
-                if [ "x$f" != "xindex.md" ] ; then
-                        t=`grep "^# " "$f" | head -n 1 | sed -e 's/^#\s*//'`
-
-                        if [ "x$f" = "xCODE_OF_CONDUCT.md" -o "x$f" = "xCONTRIBUTING.md" ] ; then
-                                # For some reason GitHub refuses to generate
-                                # HTML versions of these two documents,
-                                # probably because they are in some way special
-                                # in GitHub behaviour (as they are shown as
-                                # links in the issue submission form). Let's
-                                # work around this limitation by linking to
-                                # their repository browser version
-                                # instead. This might not even be such a bad
-                                # thing, given that the issue submission form
-                                # and our index file thus link to the same
-                                # version.
-                                u="https://github.com/systemd/systemd/blob/master/docs/$f"
-                        else
-                                u="https://systemd.io/"`echo "$f" | sed -e 's/.md$//'`
-                        fi
-                        echo "* [$t]($u)"
-                fi
-        done
-) > index.md