summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-10-27 23:05:18 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-10-27 23:05:18 -0700
commit7a126d9764e7536d291608889ca7525dcb972769 (patch)
tree1c6266df1430d3f5bbf7d4220edd492a6e3c0973
parentb193033728ad421c9e0a37ec6438d98dc1adefee (diff)
Make "latest version" more prominent on spec landing page.
-rw-r--r--Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e1475d5..e16b962 100644
--- 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 $< $@