---
title: "How to Build a Blog with Fresh"
description: "A markdown blog can be built with Fresh, Deno's edge-first framework that ships zero client JavaScript by default, using file-based routes, custom GET handlers and server-side rendering."
url: "https://swe.quest/articles/how-to-build-a-blog-with-fresh-9e3aca10e6ed3207"
canonical: "https://deno.com/blog/build-a-blog-with-fresh"
source: "Deno"
published: "2022-10-25"
difficulty: "medium"
kind: "How-to"
reading_minutes: 6
tags: ["typescript","frontend","serverless"]
---

# How to Build a Blog with Fresh

A post on [Deno](https://swe.quest/sources/deno.md), published 2022-10-25, 6 min read, How-to. Original: [https://deno.com/blog/build-a-blog-with-fresh](https://deno.com/blog/build-a-blog-with-fresh)

## Summary

A markdown blog can be built with Fresh, Deno's edge-first framework that ships zero client JavaScript by default, using file-based routes, custom GET handlers and server-side rendering. Posts are read from a posts directory with Deno.readDir, front matter is parsed with the std library's extract, and individual posts are served via a dynamic \[slug\].tsx route that renders markdown through the gfm module with its stylesheet. The finished site deploys to Deno Deploy by linking a GitHub repo with main.ts as the entry point.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)

## Prerequisites

- TypeScript basics ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))
- JSX components

## Keywords

Fresh, Deno, Deno Deploy, Tailwind, GitHub Flavored Markdown

## Related posts

- [Fresh 1.0](https://swe.quest/articles/fresh-1-0-407c9d4b84f51b2c.md): Deno · 2022-06-28 · Medium · 5 min read · Frontend, JavaScript, TypeScript, Web performance, CDN & edge
  Fresh is a full stack web framework for Deno that renders pages just-in-time on the server and ships zero JavaScript to the client by default, using the islands architecture so only explicitly opted-in components are hydrated in the browser.
- [Fresh 1.1 - automatic JSX, plugins, DevTools, and more](https://swe.quest/articles/fresh-1-1-automatic-jsx-plugins-devtools-and-more-546b7dc860fe9b32.md): Deno · 2022-09-08 · Medium · 7 min read · Frontend, TypeScript, JavaScript
  Fresh 1.1, Deno's zero-client-JS, no-build-step web framework, switches new projects to automatic JSX via the deno.json jsxImportSource setting.
- [How to build a static site with Lume](https://swe.quest/articles/how-to-build-a-static-site-with-lume-03f00be9f04a60ba.md): Deno · 2022-12-07 · Medium · 7 min read · Frontend, JavaScript, CI/CD, Deployment
  Lume, a Deno-based static site generator, can produce a blog either from the prebuilt "Simple blog" theme or from scratch using Markdown posts, Nunjucks layouts in \_includes, directory-level \_data.yml variables, and a TypeScript index page that lists posts via the search helper.
- [A Whole Website in a Single JavaScript File](https://swe.quest/articles/a-whole-website-in-a-single-javascript-file-71d46431d0988f5b.md): Deno · 2022-04-05 · Medium · 2 min read · JavaScript, Serverless, CDN & edge, Frontend, TypeScript
  A demo multi-page website fits entirely in one JavaScript file and is server-rendered on demand at the edge with Deno.
- [How to setup a blog with Hugo and Deno Deploy](https://swe.quest/articles/how-to-setup-a-blog-with-hugo-and-deno-deploy-7b19707c0d32a809.md): Deno · 2022-04-27 · Medium · 5 min read · CI/CD, Deployment, CDN & edge, JavaScript
  A Hugo static site can be published on Deno Deploy by building it in GitHub Actions and serving the generated public directory with Deno's standard-library file server, imported directly by URL with no download or compile step.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
