summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--web/S5DEMO19
-rw-r--r--web/demos.sh43
-rw-r--r--web/header.html9
4 files changed, 72 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e6e87cea2..f0077413b 100644
--- a/Makefile
+++ b/Makefile
@@ -344,7 +344,7 @@ make_page:=./$(MAIN) -s -B $(web_src)/header.html \
-H $(web_src)/css
cleanup_files+=$(web_dest)
website: $(web_dest)
-$(web_dest)/: $(MAIN) html
+$(web_dest)/: $(MAIN) html
-rm -rf $(web_dest)
( \
mkdir $(web_dest); \
@@ -363,6 +363,10 @@ $(web_dest)/: $(MAIN) html
sed -e 's/@WINDOWS_PKG_NAME@/$(win_pkg_name)/g' | \
sed -e 's/@VERSION@/$(VERSION)/g' | \
$(make_page) > $(web_dest)/index.html; \
+ cp README $(web_dest)/README; \
+ cp $(web_src)/S5DEMO $(web_dest)/S5DEMO; \
+ sh $(web_src)/demos.sh $(web_dest) | \
+ $(make_page) > $(web_dest)/demos.html; \
) || { rm -rf $(web_dest); exit 1; }
.PHONY: distclean clean
diff --git a/web/S5DEMO b/web/S5DEMO
new file mode 100644
index 000000000..e61ecf853
--- /dev/null
+++ b/web/S5DEMO
@@ -0,0 +1,19 @@
+% Eating Habits
+% John Doe
+% March 22, 2005
+
+# In the morning
+
+- Eat eggs
+- Drink coffee
+
+# In the evening
+
+- Eat spaghetti
+- Drink wine
+
+# Conclusion
+
+- And the answer is...
+- $f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n$
+
diff --git a/web/demos.sh b/web/demos.sh
new file mode 100644
index 000000000..3c402ead6
--- /dev/null
+++ b/web/demos.sh
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+# creates demo page for pandoc
+# argument is the destination directory
+
+DEST=$1
+
+NEWLINE='
+'
+DEMOS='pandoc README -o demo0.html
+pandoc -s -S README -o demo0.html
+pandoc -s README -o demo0.tex
+pandoc -s -w rst README -o demo0.txt
+pandoc -s README -o demo0.rtf
+pandoc -s -m -i -w s5 S5DEMO -o demo0.html
+web2markdown http://www.gnu.org/software/make/ -o demo0.txt
+markdown2pdf README -o demo0.pdf'
+
+oldifs=$IFS
+IFS=$NEWLINE
+set -- $DEMOS
+IFS=$oldifs
+
+cd $DEST
+PATH=../..:$PATH
+
+echo '% Pandoc demos
+
+To see the output created by each of the commands below,
+click on the name of the output file:
+
+'
+num=0
+for command in "$@"; do
+ num=$((num + 1))
+ command=$(echo $command | sed -e "s/0/$num/")
+ firstpart=$(echo $command | sed -e 's/\(.*\) [^ ]* -o.*/\1/')
+ input=$(echo $command | sed -e 's/.* \([^ ]*\) -o.*/\1/')
+ output=$(echo $command | sed -e 's/.*-o \(.*\)/\1/')
+ echo "1. <code>$firstpart <a href=\""$input"\" title=\""View input file"\">$input</a> -o <a href=\""$output"\" title=\""View pandoc output"\">$output</a></code>"
+ result=$($command) # run the command and create output file
+ echo "Created $output." >&2
+done
+
diff --git a/web/header.html b/web/header.html
index fbbe7ac15..ee5528c94 100644
--- a/web/header.html
+++ b/web/header.html
@@ -4,10 +4,11 @@
<div id="sidebar">
<ul>
-<li><a href="index.html">Home</a></li>
-<li><a href="README.html">README</a></li>
-<li><a href="doc/index.html">API</a></li>
-<li><a href="history.html">History</a></li>
+<li><a href="index.html" title="Home page">Home</a></li>
+<li><a href="README.html" title="Pandoc documentation">README</a></li>
+<li><a href="demos.html" title="Pandoc demos">Demos</a></li>
+<li><a href="doc/index.html" title="API documentation for Pandoc libraries">API</a></li>
+<li><a href="history.html" title="Pandoc's changelog">History</a></li>
</ul>
</div>
<div id="main" class="withleftmenu">