Skip to content

Examples

Jérôme Beau edited this page Nov 11, 2022 · 1 revision

ssg-api has been developed to generate the RR0 website, so its repository is a good place to find examples.

A good place to start is to look at RR0's build source code to see how it initializes and run its configuration, comprised of:

  • a TimeReplaceCommand to replace <time>yyyy-mm-dd hh:mm</time> tags with links to a page about that very date.
  • a PlaceReplacer to be used through a ClassDomReplaceCommand("place", new PlaceReplacerFactory(placeService)) to replace <span class="place">Paris (France)</span> tags with a clickable tag to display the map of the mentioned place.
  • a OutlineReplaceCommand to insert an outline of the current HTML page.
  • a LinkReplaceCommand to insert navigation links matching the "start", "contents", "prev" and "next" relationships of the current HTML page.
  • a CopyStep to copy images in the output dir;
  • a RR0SsgContext specializes SsgContextImpl aht adds access to locale-specific messages and time context.
  • a AnchorReplaceCommand to add trailing slash to links and a target="_blank" if the url is outside of the current website.
  • a CaseDirectoryStep and PeopleDirectoryStep to generate live indexes of UFO cases and people subdirectories.
Clone this wiki locally