Documentation
st.ht is a simple markdown hosting service. Upload a zip file containing markdown files, and we'll create a website at username.st.ht.
username.st.htAll .md files in your zip will become pages on your site. The filename becomes the URL:
about.md → username.st.ht/aboutprojects.md → username.st.ht/projectsindex.md → username.st.ht/ (home page)index.md - If present, becomes your site's home page instead of the default page listing._ are ignored (Mac metadata files)Add YAML front matter to the top of your markdown files to control page properties:
---
title: My Page Title
template: custom
---
# My Page Content
This is the content of my page.
title - Sets the page title (overrides title extracted from first heading)template - Specifies which template to use for rendering this page---
title: About Me
template: profile
---
# About Me
I'm a developer who loves building simple, useful tools.
Customize how your pages look by including HTML templates in your zip file.
Create a _templates/ directory in your zip file and add .html files:
my-site.zip
├── index.md
├── about.md
└── _templates/
├── default.html
└── profile.html
Your templates have access to these variables:
{{.Page.Title}} - The page title{{.Page.Slug}} - The page URL slug{{.Page.Template}} - The template name{{.Page.CreatedAt}} - When the page was created{{.HTMLContent}} - The rendered HTML content from markdownCreate _templates/profile.html:
<!DOCTYPE html>
<html>
<head>
<title>{{.Page.Title}}</title>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
.profile { border: 2px solid #333; padding: 20px; }
</style>
</head>
<body>
<div class="profile">
<h1>{{.Page.Title}}</h1>
{{.HTMLContent}}
</div>
</body>
</html>
Reference your template in the front matter of your markdown files:
---
title: About Me
template: profile
---
# About Me
Content here will be rendered with the profile template.
If you create _templates/default.html, it will be used for all pages that don't specify a template or specify template: default in their front matter.
Code blocks are automatically highlighted:
```go
func main() {
fmt.Println("Hello, world!")
}
```
Link between pages using double brackets:
Check out my [[about]] page or my [[projects]].
Your site automatically includes search functionality accessible via API at /api/search?q=query
index.md file for your home pagemy-blog.zip
├── index.md # Home page
├── about.md # About page
├── blog/
│ ├── first-post.md # Blog post
│ └── second-post.md # Another post
└── _templates/
├── default.html # Default template
└── blog-post.html # Blog post template
This creates:
username.st.ht/ (home page)username.st.ht/aboutusername.st.ht/first-postusername.st.ht/second-post