docs: add a simple, auto-generated index.md
authorLennart Poettering <lennart@poettering.net>
Tue, 2 Oct 2018 07:53:05 +0000 (09:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Oct 2018 08:43:54 +0000 (10:43 +0200)
This is useful for the github pages feature

docs/index.md [new file with mode: 0644]
meson.build
tools/make-index-md.sh [new file with mode: 0755]

diff --git a/docs/index.md b/docs/index.md
new file mode 100644 (file)
index 0000000..32366cc
--- /dev/null
@@ -0,0 +1,25 @@
+# systemd Documentation
+
+* [The Boot Loader Specification](BOOT_LOADER_SPECIFICATION.md)
+
+* [Control Group APIs and Delegation](CGROUP_DELEGATION.md)
+
+* [The systemd Community Conduct Guidelines](CODE_OF_CONDUCT.md)
+
+* [Code Quality Tools](CODE_QUALITY.md)
+
+* [Contributing](CONTRIBUTING.md)
+
+* [Porting systemd To New Distributions](DISTRO_PORTING.md)
+
+* [Known Environment Variables](ENVIRONMENT.md)
+
+* [Portable Services Introduction](PORTABLE_SERVICES.md)
+
+* [Steps to a successful release](RELEASE.md)
+
+* [What settings are currently available for transient units?](TRANSIENT-SETTINGS.md)
+
+* [Notes for Translators](TRANSLATORS.md)
+
+* [Users, Groups, UIDs and GIDs on `systemd` systems](UIDS-GIDS.md)
index c29f622..1c4febf 100644 (file)
@@ -2909,6 +2909,10 @@ 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
new file mode 100755 (executable)
index 0000000..1c0dc36
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -eu
+
+cd "$@"/docs/
+(
+        echo "# systemd Documentation"
+
+        for f in *.md ; do
+                if [ "x$f" != "xindex.md" ] ; then
+                        t=`grep "^# " "$f" | head -n 1 | sed -e 's/^#\s*//'`
+                        echo -e "\n* [$t]($f)"
+                fi
+        done
+) > index.md