diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-10-27 23:05:18 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-10-27 23:05:18 -0700 |
commit | 7a126d9764e7536d291608889ca7525dcb972769 (patch) | |
tree | 1c6266df1430d3f5bbf7d4220edd492a6e3c0973 /Makefile | |
parent | b193033728ad421c9e0a37ec6438d98dc1adefee (diff) |
Make "latest version" more prominent on spec landing page.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 $< $@ |