Add Insights blog (Markdown-based, bilingual EN/MN) - #266
Merged
Conversation
Adds an Insights section (replacing the /test placeholder). Posts are authored as Markdown files in frontend/content/insights/ — drop a .md file in that folder and it publishes automatically (newest date first). Hand writers the _TEMPLATE.md sample to fill in. - frontend/content/insights/: one .md per post (front matter: title, author, date, thumbnail, linkedin, excerpt; then a Markdown body). Files starting with "_" (e.g. _TEMPLATE.md) are ignored. - frontend/src/content/insights.ts: server-side loader (gray-matter), called only from getStaticProps/getStaticPaths. - frontend/src/content/dates.ts: client-safe, deterministic date formatter. - pages/insights.tsx (card grid) and pages/insights/[slug].tsx (article, body rendered via react-markdown + remark-gfm) — both statically generated. - New `insights` i18n namespace (en/mn); NavBar + Footer point to /insights. - Adds deps: gray-matter, react-markdown, remark-gfm. Verified: next build prerenders /insights and each post; dev server returns 200 with bold/list/blockquote rendered and _TEMPLATE excluded; screenshots confirm the index grid and article render. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Posts can now ship a Mongolian translation alongside the English file: add a sibling `<slug>.mn.md` with localized title/excerpt/body. The content loader returns per-language fields (en + optional mn), and the index and article pages pick the variant matching the site language toggle, falling back to English when no translation exists. Shared fields (date, author, thumbnail, linkedin) come from the English file. Includes a Mongolian translation of the rangelands-from-space sample post, a template note documenting the convention, and an inline image in the sample post. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Puturbold
force-pushed
the
feat/insights-blogs
branch
from
June 4, 2026 04:11
8cfe6fb to
c33a8d4
Compare
Sync the lockfile with the upgraded dependencies now on main plus the Insights deps (gray-matter, react-markdown, remark-gfm). The previously committed lockfile predated the major dependency bumps; `npm ci` now resolves cleanly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an Insights tab backed by Markdown files, with optional bilingual (EN/MN) posts.
Insights blog
/insightsindex and/insights/[slug]article pages, rendered at build time from Markdown infrontend/content/insights/..mdfile in that folder and it publishes automatically (newest date first). Front matter carries title/date/author/thumbnail/linkedin; excerpt is taken from front matter or derived from the first paragraph._TEMPLATE.mddocuments the format (ignored at build because it starts with_).public/en|mn/insights.json.Bilingual support (latest commit)
my-post.md). Add a siblingmy-post.mn.mdto provide a Mongolian version.en+ optionalmn); the index cards and article page show the variant matching the site language toggle, falling back to English when no translation exists.rangelands-from-spacesample post.Notes for reviewers
content/insights.tsuses Nodefsand is only called fromgetStaticProps/getStaticPaths, so it never reaches the browser bundle.mainincludes those lockfile/package.jsonchanges andONBOARDING.md.🤖 Generated with Claude Code