M pkg/gemserver/routes.go => pkg/gemserver/routes.go +5 -0
@@ 8,6 8,7 @@ import (
"net/url"
"path"
"path/filepath"
+ "sort"
"github.com/markbates/pkger"
"github.com/pitr/gig"
@@ 47,6 48,10 @@ func handleHome(gm *gamemanager.GameManager, version string) func(gig.Context) e
return fmt.Errorf("couldn't load game: %w", startErr)
}
+ sort.Slice(startStates, func(a int, b int) bool {
+ return startStates[a].Description < startStates[b].Description
+ })
+
return c.Render("gemif:/static/templates/index.gmi.tmpl", map[string]interface{}{
"Stories": startStates,
"Banner": getRandomBanner(),
M static/templates/index.gmi.tmpl => static/templates/index.gmi.tmpl +3 -1
@@ 1,9 1,11 @@
+```
{{.Banner}}
+```
v{{.Version}}
GemIF is a simple Interactive Fiction engine for Gemini (think: twine but with fewer features).
-Each story below is represented as a (relatively-) simple YAML file describing the scenes and transitions.
+Each story below is written in a simple mark-up format similar to Gemini format and compiled into a (relatively-) simple YAML file describing the scenes and transitions.
Stories allow users to make choices, moving from scene to scene. Simple logic can be added in the form of "condition" tags attached to the game state. Making choices can apply those transitions, which allow for conditional text rendering and conditionally allowing use of transitions later in the story.