Getting Started with Our Blog
Welcome to the Pradnya blog! This post demonstrates all the markdown features available for writing blog posts.
Writing Content
Blog posts are written in standard Markdown with full GitHub-Flavored Markdown support. You can use italics, bold, strikethrough, and inline code.
Headings
All headings automatically get anchor links, so readers can link directly to any section of your post.
Code Blocks
Code blocks are highlighted at build time using Shiki — zero JavaScript is sent to the browser.
interface BlogPost {
title: string;
description: string;
date: string;
tags: string[];
}
function getLatestPosts(posts: BlogPost[]): BlogPost[] {
return posts
.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())
.slice(0, 5);
} <script lang="ts">
let count = $state(0);
</script>
<button onclick={() => count++}>
Count: {count}
</button> Tables
Tables are supported via remark-gfm:
| Feature | Status | Notes |
|---|---|---|
| Markdown rendering | ✅ | Full GFM support |
| Code highlighting | ✅ | Shiki (build-time) |
| SEO meta tags | ✅ | Auto-generated from frontmatter |
| RSS feed | ✅ | Available at /rss.xml |
| Sitemap | ✅ | Available at /sitemap.xml |
Lists
Unordered
- Write posts in Markdown
- Co-locate images with your content
- Use Svelte components inline
Ordered
- Create a folder:
src/lib/data/blogs/YYYY/MM-DD/my-post/ - Add a
page.mdwith frontmatter - Start writing!
Task Lists
- Set up mdsvex
- Configure Shiki highlighting
- Add remark-gfm support
- Write more blog posts
Blockquotes
The best way to predict the future is to create it.
— Abraham Lincoln
Using Svelte Components
You can import and use Svelte components directly in your markdown:
<script>
import MyComponent from '$lib/components/MyComponent.svelte';
</script>
<MyComponent prop="value" /> Images
To use co-located images, import them in a script tag at the top of your markdown file:
<script>
import coverImage from './cover.jpg';
</script>
<img src={coverImage} alt="Description" /> Images placed in the same folder as page.md are processed by Vite with content hashing for optimal caching.
That’s it! Create a new folder under src/lib/data/blogs/YYYY/MM-DD/your-slug/ and start writing.