← Back to blog

Embedding code snippets in blog posts

Aug 7, 2026

Edit

Code snippets now render with syntax highlighting

You can embed source code in a post using a fenced code block. Specify the language for the best result:

tsfunction greet(name: string): string {
  // a friendly hello
  return `Hello, ${name}!`;
}

Bash works too:

bashkubectl get svc japnam-web
curl -s https://japnam.tech/api/env-status

And inline code like npm run build is styled as well.

More from the blog