Use 'highlight' to produce syntax-highlighted versions of
xml, html, and tex demo pages (in website /examples/).
Add links so that html files can be viewed as web pages
(without syntax highlighting).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@543 788f1e2b-df1e-0410-8736-df70ead52e1b
commit06ff1feea054f42909776528b73787afaac202f8
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateMon 19 Feb 2007, 04:47 (20 years ago)
parent8138fc4
web/Makefile+4
@@ -12,6 +12,10 @@ clean:
1212
1313examples.txt : $(PANDOC_DEPS) mkdemos.pl config.xsl S5DEMO README
1414 PATH=$(PANDOC_PATH):$$PATH ./mkdemos.pl demos $@
15+ perl -pi -e 's!(href="(main|(my)?header|footer|example\d+)\.(html|tex|xml|css))"!\1.html"!g' $@
16+ for file in $$(ls | egrep '(main|(my)?header|footer|example[0-9]+)\.(html|tex|xml|css)$$'); \
17+ do highlight -u utf-8 --style emacs $$file > $$file.html; \
18+ done
1519
1620%.html : %.txt $(PANDOC_DEPS)
1721 $(MAKEPAGE) $< > $@
web/mkdemos.pl+4
@@ -21,7 +21,11 @@ while (<IN>) {
2121 $line =~ s/ ([A-Za-z0-9_:\/]+(\.|\/)[a-zA-Z0-9.\/]*|README|S5DEMO)/ <a href="$1">$1<\/a>/g;
2222 $line =~ s/-/\\-/g;
2323 $line =~ s/^(.*)$/ <code>$1<\/code>/g;
24+ if ( $line =~ /(example\d+\.html)<\/a><\/code>/m ) {
25+ $line .= "\n (View [`$1` as a web page]($1).)\n";
26+ }
2427 }
2528 print OUT $line;
2629
2730}
31+