cmark

My personal build of CMark ✏️

Commit
143f3f5cf2630367fe7d614fb79d834601cad8d0
Parent
57484668150bc847cb21dfa0ad9b2e8e56e2ba25
Author
John MacFarlane <jgm@berkeley.edu>
Date

Landing page for spec is now a list with links to all versions.

Diffstat

2 files changed, 5 insertions, 13 deletions

Status File Name N° Changes Insertions Deletions
Modified Makefile 7 5 2
Deleted spec.redirect.in 11 0 11
diff --git a/Makefile b/Makefile
@@ -89,8 +89,11 @@ fuzztest:
 	for i in `seq 1 10`; do \
 	  time cat /dev/urandom | head -c 100000 | iconv -f latin1 -t utf-8 | $(PROG) >/dev/null; done
 
-_site/spec.html: spec.redirect.in spec.txt
-	perl -pe 's/VERSION/$(SPECVERSION)/g' $< > $@
+_site/spec.html: spec.txt
+	(echo "% CommonMark Spec\n";\
+	for vers in $(shell cd _site; ls -d -t 0.*) ; do \
+	  echo "- [Version $$vers](/$$vers/)" ; done) | \
+	pandoc --template template.html -S -s -t html5 -o $@
 
 _site/index.html: _site/spec.html
 	cp $< $@
diff --git a/spec.redirect.in b/spec.redirect.in
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <title>CommonMark Spec</title>
-    <meta http-equiv="refresh" content="0;URL='http://spec.commonmark.org/VERSION/" >
-  </head>
-  <body>
-    <p>The most recent version of the CommonMark Spec can be found
-at <a href="http://spec.commonmark.org/VERSION/">http://spec.commonmark.org/VERSION/</a>.</p>
-  </body>
-</html>