]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Make the tables pretty
authorPieter Lexis <pieter@plexis.eu>
Fri, 5 Sep 2014 22:32:26 +0000 (00:32 +0200)
committerPieter Lexis <pieter@plexis.eu>
Tue, 25 Nov 2014 19:11:11 +0000 (20:11 +0100)
pdns/docs/Makefile
pdns/docs/process-md.sh

index 8f90c9d5bdf5cb9d47cd847996b9bb44ab614179..72c0713991879d27934b052ad952b91f8cedc812 100644 (file)
@@ -15,8 +15,9 @@ html-new/index.html: process-md.sh mkdocs.yml markdown/** markdown/*/**
        mkdir -p html-new
        mkdir -p doc-build
        rsync -a --delete markdown/. doc-build/.
-       ./process-md.sh
+       ./process-md.sh pre
        mkdocs build
+       ./process-md.sh post
 
 pdns-expanded.html: pdns-expanded.xml
        xmlto xhtml-nochunks -m config.xsl $<
index 5494d8c41c7dc2ec613a3f42884336afb89c567e..f5c15e0a1b2feba88146d197623ac10b14df127f 100755 (executable)
@@ -1,5 +1,13 @@
 #!/bin/sh
 
-for file in `find doc-build -name '*.md' -type f -print`; do
-  pandoc -f markdown_github+pipe_tables -t markdown_github+pipe_tables -F markdown/process-includes.py $file -o $file
-done
+pre() {
+  for file in `find doc-build -name '*.md' -type f -print`; do
+    pandoc -f markdown_github+pipe_tables -t markdown_github+pipe_tables -F markdown/process-includes.py $file -o $file
+  done
+}
+
+post() {
+  find html-new -type f -name '*.html' -exec sed -i 's/<table>/<table class="table-bordered">/' {} +
+}
+
+$1