GoMark turns a folder of markdown into a real website. This guide walks through the basics: installing the package, creating a content tree, and launching your first markdown-powered site.
Install#
GoMark is both a CLI and an importable Go package. For the quickest start, install the CLI:
go install github.com/arivictor/gomark/cmd/gomark@latestPrefer to drive it from Go? Add the package to your module instead:
go get github.com/arivictor/gomarkCreate a content tree#
Your markdown tree is your site. GoMark maps files and folders directly to routes — no config required. Point GoMark at any directory; this guide uses content/.
content/
index.md
guides/
index.md
install.mdcontent/index.mdbecomes/content/guides/index.mdbecomes/guidescontent/guides/install.mdbecomes/guides/install
Add your first page#
Add frontmatter to give each page a title, description, and navigation label.
---
title: My Docs # Shows in the page header and meta tags
description: The home page for my GoMark site. # Optional: shows in search results and meta tags.
nav_title: Home # Optional: controls sidebar label
order: 0 # Optional: controls sidebar order
---
# My Docs
This site is powered by GoMark.Start your site#
The CLI previews your content with live reload — no code required:
gomark serve content --liveVisit http://localhost:8080 and GoMark renders your markdown tree as a live website, reloading as you edit.
Configure it (optional)#
Site title, logo, SEO, navigation, and analytics live in an optional gomark.yaml that serve and build auto-discover. See the configuration guide for the full schema.
title: My Docs
url: https://docs.example.com
seo:
description: Docs for my project.Drive it from Go (optional)#
Prefer code? The HTTP server is part of the package, so a few lines of Go does the same thing:
package main
import (
"log"
gm "github.com/arivictor/gomark"
)
func main() {
s := gm.NewSite(
gm.WithSiteTitle("My Docs"),
gm.WithSiteContentDir("content"),
gm.WithSiteMode(gm.PreRender), // Use LiveRender for local development to see changes immediately
)
if err := s.Start(); err != nil {
log.Fatal(err)
}
}Opinionated features out of the box#
No extra setup, no plugins — the moment your site boots, you have:
- HTML rendering for every markdown page
- Sidebar navigation built from your folders and pages
- Top-level navigation from your top-level sections
- A search endpoint at
/api/search - Generated
sitemap.xmlandrobots.txt - A presentable, responsive built-in theme — no frontend setup