Skip to content

Commit

Permalink
Build an examples index for github pages
Browse files Browse the repository at this point in the history
Github pages doesn't do directory listings by default

This is a bit hacky and manual but it works.
  • Loading branch information
timabell committed Apr 13, 2023
1 parent 2299047 commit 94c1c90
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/build-index.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

rm index.html

echo "<h1>reveal.js example decks</h1><ul>" >> index.html
for deck in `ls *.html`; do
name="${deck%.html}"
echo "<li><a href='$deck'>$name</a></li>" >> index.html
done
echo "</ul>" >> index.html
12 changes: 12 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<h1>reveal.js example decks</h1><ul>
<li><a href='auto-animate.html'>auto-animate</a></li>
<li><a href='backgrounds.html'>backgrounds</a></li>
<li><a href='barebones.html'>barebones</a></li>
<li><a href='index.html'>index</a></li>
<li><a href='layout-helpers.html'>layout-helpers</a></li>
<li><a href='markdown.html'>markdown</a></li>
<li><a href='math.html'>math</a></li>
<li><a href='media.html'>media</a></li>
<li><a href='multiple-presentations.html'>multiple-presentations</a></li>
<li><a href='transitions.html'>transitions</a></li>
</ul>

0 comments on commit 94c1c90

Please sign in to comment.