Skip to content

Add a news section written as Markdown in the repository #212

Description

@openipc-ai

Part of #206 (Phase 1). Depends on nothing.

Why

June's navigation has seven entries and the seventh is News. It was deferred to Phase 2 along with its mechanism: posts as Markdown files in the repository, rendered with kramdown, so an announcement is a pull request and not a database row. Nothing of this exists. There is no Markdown renderer in the Gemfile, package.json or app/, no /news route, and the navbar has six entries.

What to change

  • kramdown in the Gemfile. Posts live in content/news/<YYYY-MM-DD>-<slug>.md with a small front matter block (title, date, summary, author); a NewsPost PORO reads the directory, parses the front matter, renders the body, and sorts by date. Loaded once per process in production, per request in development.
  • /news (index: title, date, summary) and /news/<slug> (the post), full-bleed, plus /news.atom from a Rails builder template so readers and the Telegram channel can subscribe.
  • Internal links inside a post go through the same locale_path rewriting that app/helpers/application_helper.rb:91-107 applies to translated copy, so /supported-hardware in a post lands in the reader's language.
  • English only at launch, as June decided; the index and posts render under every prefix without a missing-translation string, and the i18n gate is told so.
  • News becomes the seventh navbar entry and a footer link. The sitemap lists the index and each post.
  • One real first post, so the section does not launch empty. Candidate: the relaunch itself.
  • A test renders every file in content/news/ and fails on malformed front matter or an unsafe HTML element, so a bad post breaks CI rather than a request.

Done means

  • /news, one post and /news.atom render; the feed validates.
  • A post with broken front matter fails bin/rails test and does not reach production.
  • Screenshots of the index and a post before any PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions