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.
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.jsonorapp/, no/newsroute, and the navbar has six entries.What to change
kramdownin the Gemfile. Posts live incontent/news/<YYYY-MM-DD>-<slug>.mdwith a small front matter block (title, date, summary, author); aNewsPostPORO 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.atomfrom a Rails builder template so readers and the Telegram channel can subscribe.locale_pathrewriting thatapp/helpers/application_helper.rb:91-107applies to translated copy, so/supported-hardwarein a post lands in the reader's language.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.atomrender; the feed validates.bin/rails testand does not reach production.