Skip to content

Display fortune cookie messages #22

Open
@goodmami

Description

@goodmami

There was a request to re-add fortune cookie messages, at least to the front page. There are two issues with the way things are currently set up:

  1. The FortuneCookies are in a wiki, so we'd need a GitHub action triggered by wiki (gollum) events that captures edits to that page and extracts the fortunes out.
  2. The main page is rendered from index.md, and the rendering system strips out unsafe HTML like <script> and <link> tags, which makes it difficult to add javascript code to display the fortune.

I propose the following:

  1. Move the content of the FortuneCookies wiki to a .js file, e.g.:
    var fortunes = [
      'Recursive, adj: See "recursive"',
      ...
    ];
  2. Change index.md to index.html to avoid rendering with Gollum
  3. Add code to index.html that loads the fortunes.js (or whatever it's called) and displays a random one

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions