Grimoire is a Python library for creating interactive fiction as hyperlinked html.
The source code is available on github including the source for this tutorial which was created using Grimoire itself.