post: beginning again + adopt YAML frontmatter for posts#52
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new writing entry (“Beginning again”) to validate the new writing layout and ensure the /writing index renders correctly with real MDX prose content.
Changes:
- Introduces a new MDX post under
/writing/beginning-again/withmetadataconsumed by the/writingindex. - Uses
ArticleLayoutwith title/meta/subtitle/back link to exercise the new typography and TOC behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
viniciusdc
commented
May 19, 2026
2919cc6 to
5c61944
Compare
A meta post kicking off the new notebook era. Honest about prior attempts stalling, frames writing as a thinking tool rather than an audience-facing thing, sets out what the notebook will and won't try to be. Tagged "meta" — content-about-the-notebook rather than any of the existing topical tags.
Posts no longer need to wrap themselves in <ArticleLayout ...>. The layout is referenced from yaml frontmatter and the body is pure markdown. Cleaner, less boilerplate, less JSX in things that should read like prose. Example post header — what authors write now: --- layout: '@/layouts/ArticleLayout.astro' title: Beginning again date: 2026-05-18 tag: meta description: ... --- I've started a blog several times. ... Changes: - ArticleLayout reads from `Astro.props.frontmatter` when used as a layout reference, falls back to direct props when used inline from an .astro file (backward-compat for project pages). Auto-composes `meta` as "date · tag" so authors don't have to compute it. - YAML dates are auto-parsed into Date objects, which broke string sorts and rendered as ISO timestamps. Coerced to YYYY-MM-DD via a duck-typed asDateString helper in the layout, the writing index, and the homepage. - Listing pages (homepage, /writing/) now accept both `frontmatter` (yaml-front-matter pattern) and `metadata` (export const pattern). - Templates (note.mdx, architecture.mdx, project.mdx) updated to the yaml-frontmatter shape. project.mdx uses `frontmatter.X` to read fields inside the body for the ProjectMeta block. - Beginning-again post rewritten in the new format — header is yaml, body is markdown, no JSX wrapping. - cspell: add "frontmatter". Project pages in `src/pages/projects/<slug>/index.astro` keep their existing pattern (export const metadata + ArticleLayout wrapper) — ArticleLayout still supports it via direct props.
5c61944 to
17aa97c
Compare
The \`layout: '@/layouts/ArticleLayout.astro'\` line was boilerplate on every post. Made it optional via a small remark plugin in astro.config.mjs that injects the layout into the frontmatter for any mdx file under /pages/writing/ or /pages/projects/ that doesn't already have one. Authors can still override per-post by setting \`layout:\` explicitly. While here: - Layout's \`meta\` composition now falls back to \`fm.label\` so project pages auto-render their label above the title without needing an explicit \`meta:\` line. - Drop the \`layout:\` line from note / architecture / project templates and the beginning-again post. - Drop the \`meta: system\` redundancy from the project template.
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.
Summary
Two changes, coupled because the post can't ship without the API change.
YAML frontmatter for posts
Posts no longer wrap themselves in `<ArticleLayout ...>`. The layout is referenced from frontmatter and the body is pure markdown:
Cleaner, less JSX in things that should read like prose. MDX is still allowed — imports work normally for future use (custom components, math, etc.).
The post itself
A meta opener in your voice — frames writing as a thinking tool, sets out the broader scope (software / AI/math/design/games), declares an honest commitment to publishing imperfect things.
Test plan
2026-05-18 · meta
` — date coercion works.