How to turn Markdown files into a website
Publish a folder of Markdown files as a website with a static site generator: Hugo, Jekyll, Astro and Eleventy commands, folder layouts and free hosting.

To turn Markdown files into a website, put them in a folder, run a static site generator such as Hugo, Jekyll, Astro or Eleventy, and upload the HTML it produces to any static host. The generator reads each .md file, wraps it in a page layout, builds navigation from your folders and front matter, and writes plain HTML files you can host for free on GitHub Pages or a similar service. Your Markdown stays the source; the site is rebuilt from it whenever you change a file.
This guide shows the start-up commands for four common generators (checked against their documentation in November 2026), how each expects your files to be arranged, and when you do not need a generator at all.
How does a Markdown website work?
A static site generator does the same three steps no matter which one you choose:
- Read every Markdown file in a content folder, plus the front matter block at the top of each one (title, date, draft status).
- Render the Markdown to HTML and place it inside a template, the theme, that adds the header, navigation and styles.
- Write a folder of finished
.html, CSS and image files, which is the whole website.
Nothing runs on the server when someone visits; the host only sends files. That makes these sites fast, cheap to host and hard to break. The trade-off is that anything dynamic, such as comments or search, comes from a client-side script or a third-party service.
Which static site generator should you use?
Pick by what you already have installed and what the site is for. All four read standard Markdown with front matter.
| Generator | Written in | Start command | Local preview | Output folder | Good fit |
|---|---|---|---|---|---|
| Hugo | Go (single binary) | hugo new project mysite |
hugo server -D |
public/ |
Large sites, fast builds, no dependencies |
| Jekyll | Ruby | jekyll new myblog |
bundle exec jekyll serve |
_site/ |
Blogs, sites built on GitHub Pages |
| Astro | JavaScript | npm create astro@latest |
npm run dev |
dist/ |
Sites that mix Markdown with components |
| Eleventy | JavaScript | npx @11ty/eleventy |
npx @11ty/eleventy --serve |
_site/ |
Small sites, minimal setup |
For project documentation, MkDocs and Docusaurus are also common; they are covered in docs as code.
How do you build a Markdown site with Hugo?
Hugo is one executable with no runtime to install. The quick start in Hugo's documentation asks for version 0.158.0 or later and creates the site with hugo new project; if your installed version does not have that command, use hugo new site.
hugo new project mysite
cd mysite
git init
git submodule add https://github.com/gohugo-ananke/ananke themes/ananke
echo "theme = 'ananke'" >> hugo.toml
hugo new content content/posts/my-first-post.md
hugo server -D
hugo server starts a local preview at http://localhost:1313 and reloads as you save. -D includes pages marked as drafts. Run hugo on its own to build the finished site into public/.
A Hugo page is a Markdown file with front matter:
---
title: "My first post"
date: 2026-11-26
draft: false
---
The first paragraph of the post.
Hugo creates new files with draft: true. Change it to false, or remove the line, before you publish, or the page will not be built.
How do you build a Markdown blog with Jekyll?
Jekyll needs Ruby, RubyGems and a compiler toolchain. From Jekyll's documentation:
gem install jekyll bundler
jekyll new myblog
cd myblog
bundle exec jekyll serve
The site runs at http://localhost:4000. On Ruby 3.0 or newer, if serve fails, the docs suggest running bundle add webrick first.
Posts go in _posts/ and must be named with the date first:
myblog/
_config.yml
_posts/
2026-11-26-my-first-post.md
about.md
index.md
Jekyll's main draw is GitHub Pages, which can build a Jekyll site directly from a branch of your repository, with no build step on your side.
How do you build a Markdown site with Astro?
Astro is a JavaScript framework that treats Markdown files as pages. Create a project with the setup wizard:
npm create astro@latest
cd my-site
npm run dev
The development server runs at http://localhost:4321. Any .md file inside src/pages/ becomes a page at the matching URL, so src/pages/about.md is served at /about. For a blog, Astro's content collections let you keep posts in src/content/ and check their front matter against a schema. npm run build writes the site to dist/.
Astro takes more setup than Hugo or Jekyll, and in return you can drop interactive components into a mostly-Markdown site.
How do you build a Markdown site with Eleventy?
Eleventy can build a folder of Markdown with no configuration at all. In a folder with an index.md:
npx @11ty/eleventy --serve
It converts every .md file to an .html file in _site/ and serves it at http://localhost:8080. Add a layout file and a config file when you want shared navigation and styles.
Do you need a generator for a single page?
No. For one page, such as a résumé, a project page or a set of notes, convert the file to HTML directly and upload it. Pandoc does this in one command:
pandoc notes.md --standalone --metadata title="Project notes" -o index.html
--standalone produces a complete HTML document with <head> and <body> rather than a fragment. More options for one-off conversions are in Markdown to HTML. Switch to a generator once you have several pages that need shared navigation.
How should you organize the files?
Organize the content folder the way you want the URLs to look, because most generators map folders to paths.
- Use lowercase, hyphenated file names.
getting-started.mdbecomes/getting-started/. - Keep images next to the content or in one static folder, and use relative paths. The images page covers paths and alt text.
- Use front matter for titles and dates instead of encoding them in the text. The front matter page lists common fields.
- Check how links between pages work. Some generators rewrite a link to
other-page.mdinto the page's URL; others expect you to link to the URL itself. Test one internal link before writing fifty.
Where can you host a static Markdown site?
Any host that serves static files works, and several have free plans for personal and open source sites:
- GitHub Pages. Builds Jekyll sites from a branch, or deploys any generator's output through a GitHub Actions workflow.
- GitLab Pages. Deploys from a GitLab CI job.
- Netlify and Vercel. Connect a Git repository, set the build command (
hugo,npm run build) and the output folder, and every push redeploys. - Your own server. Copy the output folder to any web server with
rsyncorscp.
Because the output is plain files, moving hosts later means pointing a new service at the same repository.
Writing site content in Noteline
Noteline, which we make, can open a site's content folder (Cmd+O on a Mac, Ctrl+O on Windows and Linux) and edit the posts as plain Markdown files, with headings, tables and code blocks formatted as you type. Front matter stays in the file as you wrote it for the generator to read. For a single page, the desktop app's File > Save As > HTML (.html) writes a note out as an HTML file. Building and deploying a multi-page site is still the generator's job.