From 586fe818b037ae8784ebdafa8b5395ffba371d35 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 8 Nov 2020 13:57:44 -0700 Subject: [PATCH] install.sh: use "normal" style sheet for markdown docs Instead of using the `--stub` option when formatting the Markdown documentation, provide our own "stub" that uses the same style sheets that are used for the rest of Girocco to try and maintain a similar look and feel. Also take the opportunity to stuff in the correct shortcut icon link at the same time. Signed-off-by: Kyle J. McKay --- install.sh | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index eb5887d..a945e3f 100755 --- a/install.sh +++ b/install.sh @@ -1125,10 +1125,39 @@ for d in basics.md syntax.md; do FOOTER } >"$cgiroot/html/gfm/$d.html" - <"markdown.git/$d" LC_ALL=C sed -e '/\[[Ll]icense\]/d' \ - -e 's, \([a-z][a-z]*\)\.md, \1.md.html,' \ - -e 's/ by adding `.md` to the URL//' | - "$perlbin" "markdown.git/Markdown.pl" --stub >"$cgiroot/html/gfm/${d%.md}.html" + { + title="Markdown: $(echo "${d%.md}" | "$perlbin" -pe '$_=ucfirst')" + gwfpath="$cfg_gitwebfiles" + case "$gwfpath" in *"//"*) + case "$gwfpath" in *"/");;*) gwfpath="$gwfpath/"; esac + gwfpath="${gwfpath#*//}"; gwfpath="${gwfpath#*/}" + esac + case "$gwfpath" in "/"*);;*) gwfpath="/$gwfpath"; esac + gwfpath="${gwfpath%/}" + cat <<-HEADER + + + + + + $title + + + + + +
+ HEADER + <"markdown.git/$d" LC_ALL=C sed -e '/\[[Ll]icense\]/d' \ + -e 's, \([a-z][a-z]*\)\.md, \1.md.html,' \ + -e 's/ by adding `.md` to the URL//' | + "$perlbin" "markdown.git/Markdown.pl" + cat <<-FOOTER +
+ + + FOOTER + } >"$cgiroot/html/gfm/${d%.md}.html" done -- 2.11.4.GIT