Mehdi Kimakhe
All articles
1 min read

Hello world

A placeholder post that exercises every field in the content schema.


This post exists so the scaffold has something to render. Delete it once you publish something real.

Frontmatter

Every field the schema knows about is documented in src/content.config.ts. The ones worth remembering:

  • featured: true pins a post above the chronological list on /articles.
  • canonicalUrl is only for posts first published elsewhere — pages are self-canonical otherwise, which is what makes syndication safe.
  • syndication records where a post was reposted, and renders an “Also published on …” line at the foot of the article.
  • draft: true hides a post from production builds, the feed and search, while leaving it visible in astro dev.

A blockquote carries a 2px signal rule and no quote glyphs.

Code

Syntax highlighting follows the theme toggle:

export function readingTime(body: string): number {
  const words = body.trim().split(/\s+/).length;
  return Math.max(1, Math.round(words / 200));
}

A <CodeBlock> adds a filename bar and a copy button around the same block:

src/lib/readingTime.ts
export function readingTime(body: string): number {
  const words = body.trim().split(/\s+/).length;
  return Math.max(1, Math.round(words / 200));
}

MDX

Because this is .mdx rather than .md, you can use the design system’s components here — they are passed in by the route, so no import line is needed. Text can also carry a highlighted phrase when one sentence deserves it.