thandle page titles in markdown easier - mars - superminimal static website framework [h|git clone git://parazyd.org/mars.git|URL:git://parazyd.org/mars.git|server|port] [1|Log|/git/mars/log.gph|server|port] [1|Files|/git/mars/files.gph|server|port] [1|Refs|/git/mars/refs.gph|server|port] [1|README|/git/mars/file/README.md.gph|server|port] [1|LICENSE|/git/mars/file/LICENSE.gph|server|port] --- [1|commit 5a5784a53b4544597855a78a9321a52e508aff90|/git/mars/commit/5a5784a53b4544597855a78a9321a52e508aff90.gph|server|port] [1|parent c85d220ed80b3b35c5f64af98cfbc56c038e06aa|/git/mars/commit/c85d220ed80b3b35c5f64af98cfbc56c038e06aa.gph|server|port] [h|Author: parazyd |URL:mailto:parazyd@dyne.org|server|port] Date: Mon, 4 Jul 2016 09:59:36 +0200 handle page titles in markdown easier Diffstat: D example/markdown/index.html | 49 ------------------------------- M example/markdown/index.md | 6 +++--- M mars.sh | 3 +-- 3 files changed, 4 insertions(+), 54 deletions(-) --- [1|diff --git a/example/markdown/index.html b/example/markdown/index.html|/git/mars/file/example/markdown/index.html.gph|server|port] t@@ -1,49 +0,0 @@ - - - - - - This is da real title - - - - - - -
- - -
-

And this will be teh header

-

and more st00f

- -
- - - - [1|diff --git a/example/markdown/index.md b/example/markdown/index.md|/git/mars/file/example/markdown/index.md.gph|server|port] t@@ -1,5 +1,5 @@ -##+ This is da real title +##+TITLE This is our title -# And this will be teh header +# And this is our page content -and more st00f +:) [1|diff --git a/mars.sh b/mars.sh|/git/mars/file/mars.sh.gph|server|port] t@@ -91,7 +91,7 @@ process-page() { done } local pagetitle=`grep '^##+TITLE ' $page | cut -c 10- -` - sed -i -e 's/DEFAULT_TITLE/'$pagetitle'/' $name.html + sed -i -e 's/.*<\/title>/<title>'$pagetitle'<\/title>/' $name.html tmpage=`mktemp` && cp $page $tmpage sed -i -e 's/##+TITLE .*//' $tmpage t@@ -120,7 +120,6 @@ skip-page() { push() { countdown "rsyncing" && \ rsync -P -e 'ssh' -avul --delete --stats \ - #-n \ --size-only \ --exclude-from 'rsync-exclude' \ . $WEBHOST:$WEBROOT