From 51915fade9fa6c2002eb8afaa7da2f6a41035b25 Mon Sep 17 00:00:00 2001 From: TillDiem Date: Sat, 25 Dec 2021 16:46:37 +0100 Subject: [PATCH] Added the html generator scripts --- GH.png | Bin 0 -> 4268 bytes blogindex.css | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ template.html | 15 +++++++++ wikihtml.sh | 28 +++++++++++++++++ 4 files changed, 127 insertions(+) create mode 100644 GH.png create mode 100644 blogindex.css create mode 100644 template.html create mode 100755 wikihtml.sh diff --git a/GH.png b/GH.png new file mode 100644 index 0000000000000000000000000000000000000000..ea6ff545a246caa64074ba809bbc86fcb8589071 GIT binary patch literal 4268 zcmaJ_c|25m+@2YcEGe=tO+zT_42H4qTL_VT8D=nHX3PwRki9HfBH7BIQ7JCj_beeI z(PA%IQuZumf5*MI`@VnN`<~A^=eL~adA{p8f1EgTGXqv8J|+MFz-nZuYe^f)M;9Xl z?T$df2WbN@Nzaya1?NEuL=w;dEfmfT4L0&cdZI1SNK}yDE3_&AKqrE+vL)G?nkc*D ze5H{`7-_OEp2h|MR5i$Wq`Nno1a?DvVz6qEm4+4w7=u!S*eICFn&NfPUKqn*0{Tj@ znU#C6w>ts_(NG7gl9g!!zGxB>O!oD`5|znnkUw>mY4f9P83_1K2+3Ow@|RP#rsiNB z903hhkd~8jmxV&XaJV#7UI7k=N`hgsP?(G??SxA~<&_oS$}mOn-v@+djezn{w$#=C z+ZJu52Js@1@X9hWfq{Y2fpXF~f~O1=fj}H-z+h4|gcLCdOG1*RuteeC3c6^bI{||y zVQ^URks{I!=TB0D&^-Ms1Yi6=vRLBZX`&@ehK$6^K&54mLi!CfHU0mgzP|sUi6l$( z|N8r{!bGbeJX*#QO~m;V+-ZgL5I!=6SJok*kt7_!3WxLgokepm90^DC!r{R>SKwfA zQ=~fvd$e)kPllD+ zRvxaUgpifj{ms?Ix%>N~v83Nz6pahhl84G`Y3tCq(0}C~HG?mnW?2_azyzRC`UIRW z_|Kq~G5_t0?0@_67Z>#}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V zMDqqtV5Q@0Jnd^ZegdA!J_j+KUwf*Q89r!GpX^tCjM-_vCiKDr%LHG*Tq?b|4*FY1 zr|I5VzQbkN?NfI!QSV9w{6i7N+PZuZNn#B7s)KDhPO1TQJe zZL1UgBIOOdRP;I*>7?O<3ezgLDn5OQ67L#>r1#{bKe8hz0Pg XLyRvu{aX3a{{tgEGu={c*U0|?Dtn-9 literal 0 HcmV?d00001 diff --git a/blogindex.css b/blogindex.css new file mode 100644 index 0000000..f27c755 --- /dev/null +++ b/blogindex.css @@ -0,0 +1,84 @@ + + +body { +} + + +.abstract { + padding: 5px 0px 0px 5px; + +} + +.button1 { + background-color: white; + color: black; + border: 2px solid white; + /*padding: 7px 16px;*/ + text-decoration: none; + font-size: 16px; + cursor: pointer; + float: right; +} + +.button1:hover { + background-color: rgba(236, 240, 241, 1); + } + +a { + text-decoration: none; + color: darkblue; +} + +a.visited { + color: darkblue; +} + +h1 { +text-align: center ; +} +h2 { +text-align: left ; +} + +footer { +text-align: center ; +} + +li{ + margin: 0px 0 0 -5px; +} + +.mainpart{ +margin: auto ; +padding: 50px 0px ; +margin-bottom: 100px ; +max-width: 1000px; +font-size: 14pt; + +} +p { + line-height: 1.2; +} + +@media only screen and (min-width: 920px) { + /* For tablets: */ + + li {margin: 0px 0 0 0;} + .mainpart { + font-size: 14pt; + max-width: 1000px; + } + table { border: 2px solid #dddddd; + font-size: 14pt; + } + +} +@media only screen and (min-width: 1000px) { + /* For desktop: */ + li {margin: 0px 0 0 0;} + .mainpart {font-size: 14pt; } + table { border: 2px solid #dddddd; + font-size: 14pt; + } + +} diff --git a/template.html b/template.html new file mode 100644 index 0000000..929cd94 --- /dev/null +++ b/template.html @@ -0,0 +1,15 @@ + + + + +mykb - Knowledgebase for Arch Setups + + + + diff --git a/wikihtml.sh b/wikihtml.sh new file mode 100755 index 0000000..984e4a4 --- /dev/null +++ b/wikihtml.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +FORCE="$1" +SYNTAX="$2" +EXTENSION="$3" +OUTPUTDIR="$4" +INPUT="$5" +CSSFILE="$6" + +FILE=$(basename "$INPUT") +FILENAME=$(basename "$INPUT" .$EXTENSION) +FILEPATH=${INPUT%$FILE} +OUTDIR=${OUTPUTDIR%$FILEPATH*} +OUTPUT="$OUTDIR"/$FILENAME +#CSSFILENAME=$(basename "$6") +CSSFILENAME=~/blogpost.css +NAME=$(echo $FILE | sed "s/.md//g") +HAS_MATH=$(grep -o "\$\$.\+\$\$" "$INPUT") + + +if [ ! -z "$HAS_MATH" ]; then + MATH="--mathjax=https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js" +else + MATH="" +fi + + +sed -r 's/(\[.+\])\(([^)]+)\)/\1(\2.html)/g' <"$INPUT" | sed -r 's/^[ ]*\*/-/g' | sed -r 's/^[ \t]\*/-/g' | sed 's/\.md.html)/.html)/g' | pandoc $MATH -s -f $SYNTAX -t html -c $CSSFILENAME --template ~/template.html --metadata title=$NAME >"$OUTPUT.html"