cmark

My personal build of CMark ✏️

Commit
7a126d9764e7536d291608889ca7525dcb972769
Parent
b193033728ad421c9e0a37ec6438d98dc1adefee
Author
John MacFarlane <jgm@berkeley.edu>
Date

Make "latest version" more prominent on spec landing page.

Diffstat

1 file changed, 4 insertions, 5 deletions

Status File Name N° Changes Insertions Deletions
Modified Makefile 9 4 5
diff --git a/Makefile b/Makefile
@@ -91,19 +91,18 @@ 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.txt
+$(SITE)/index.html: spec.txt
 	(echo "% CommonMark Spec\n";\
+	 echo "[**Latest version ($(SPECVERSION))**](/$(SPECVERSION)/)\n"; \
+	 echo "Older versions:\n"; \
 	 for vers in $(VERSIONS); do \
 	   if [ "$$vers" != "$(SPECVERSION)" ]; then \
 		perl -p -i -e 's/<div id="watermark">.*?<\/div>/<div id="watermark" style="background-color:black">This is an older version of the spec. For the most recent version, see <a href="http:\/\/spec.commonmark.org">http:\/\/spec.commonmark.org<\/a>.<\/div>/' $(SITE)/$$vers/index.html ; \
+	  echo "- [$$vers](/$$vers/)" ; \
 	  fi; \
-	  echo "- [Version $$vers](/$$vers/)" ; \
 	  done) | \
 	pandoc --template template.html -S -s -t html5 -o $@
 
-$(SITE)/index.html: $(SITE)/spec.html
-	cp $< $@
-
 $(SITE)/$(SPECVERSION)/index.html: spec.html
 	mkdir -p $(SITE)/$(SPECVERSION)
 	cp $< $@