From 646ec83f996adf5afb5137340c7a40cdd9fc7426 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 5 Feb 2019 11:44:53 -0800 Subject: [PATCH] make site/index.md-push: restore (and consolidate), still used [ci skip] --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index b4dccab7d..f80d99d34 100644 --- a/Makefile +++ b/Makefile @@ -625,6 +625,21 @@ quickheap-%: hledgerprof samplejournals \ ############################################################################### $(call def-help-subheading,DOCUMENTATION: (see also Shake.hs)) +site/index.md-push: \ + $(call def-help,site/index.md-push, update home page with ./wiki/_Sidebar content and push if changed ) + (sed -ne '1,// p' site/index.md ; \ + sed -ne '/^#.*Cookbook/,$$ p' wiki/_Sidebar.md \ + | perl -p \ + -e 's/\[\[([^\|]*)\|([^\]]*)\]\]/[\1](https:\/\/github.com\/simonmichael\/hledger\/wiki\/\2)/g;' \ + -e 's/\[\[([^\]]*)\]\]/[\1](https:\/\/github.com\/simonmichael\/hledger\/wiki\/\1)/g;' \ + -e 's/^# >/##/;' \ + ; \ + sed -ne '//,$$ p' site/index.md ) \ + > site/_index.md.$$$$ && \ + mv site/_index.md.$$$$ site/index.md + git diff --quiet site/index.md || \ + (git commit -q -m 'site: home: latest wiki links' -m '[ci skip]' site/index.md && git push) + site-liverender: Shake \ $(call def-help,site-liverender, update the website html when source files are saved ) ls $(DOCSOURCEFILES) | entr ./Shake website