~technomancy/fennel

Also ignore patch version directories v1 PROPOSED

Christoph Frick
Christoph Frick: 2
 Also ignore patch version directories
 Generate a title with the tag for the tag docs

 3 files changed, 11 insertions(+), 3 deletions(-)
Nice idea; thanks! Applied and pushed.

-Phil
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~technomancy/fennel/patches/8427/mbox | git am -3
Learn more about email & git

[PATCH 1/2] Also ignore patch version directories Export this patch

Christoph Frick
---
 .gitignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index c5b69cf..b509cb8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,4 @@
/signups
/tutorial.html
/master
/v?.?.?
/v?.?.?*
-- 
2.23.0

[PATCH 2/2] Generate a title with the tag for the tag docs Export this patch

Christoph Frick
---
 makefile      | 5 +++--
 tag-intro.fnl | 7 +++++++
 2 files changed, 10 insertions(+), 2 deletions(-)
 create mode 100644 tag-intro.fnl

diff --git a/makefile b/makefile
index eadfcd8..7c11ad0 100644
--- a/makefile
+++ b/makefile
@@ -22,10 +22,11 @@ generate.lua: fennel/generate.fnl ; fennel/fennel --compile $^ > $@
# TODO: for now all master and tags are generated the same;
# there might be time, when we have "generations" of fennel
# TODO: dedupe v% and master setup here
%/tag-intro.md: ; fennel/fennel tag-intro.fnl $@ > $@
v%/fennel: ; git clone --branch $* fennel $@
v%/index.html: $(foreach md, $(TAGSOURCES), v%/fennel/${md}.md); $(PANDOC) -o $@ $^
v%/index.html: v%/tag-intro.md $(foreach md, $(TAGSOURCES), v%/fennel/${md}.md); $(PANDOC) -o $@ $^
master/fennel: ; git clone --branch master fennel $@
master/index.html: $(foreach md, $(TAGSOURCES), master/fennel/${md}.md); $(PANDOC) -o $@ $^
master/index.html: master/tag-intro.md $(foreach md, $(TAGSOURCES), master/fennel/${md}.md); $(PANDOC) -o $@ $^ && rm master/tag-intro.md

tagdirs: ; $(foreach tagdir, $(TAGDIRSS), mkdir -p ${tagdir})
cleantagdirs: ; $(foreach tagdir, $(TAGDIRS), rm -rf ${tagdir})
diff --git a/tag-intro.fnl b/tag-intro.fnl
new file mode 100644
index 0000000..d01a54f
--- /dev/null
+++ b/tag-intro.fnl
@@ -0,0 +1,7 @@
(let [version (: (. arg 1) :gsub "/.*" "")] 
  (print (.. "---\n"
             "pagetitle: Documentation for " version "\n"
             "---\n"
             "\n"
             "[Fennel](/) documentation for " version "\n"
             "=========================================\n")))
-- 
2.23.0
Nice idea; thanks! Applied and pushed.

-Phil
View this thread in the archives