Skip to content

HAST-CMS

HAST-CMS is a minimalist, Git-based Markdown publishing system built with Astro and TypeScript.

The core workflow is: Write Markdown → Commit → Push → Auto-deploy.

No database, no admin panel, no backend — plain .md files generate a static website.

Language: Astro / TypeScript
Repository: github.com/th30d4y/HAST-CMS

  • Node.js 18+
  • npm
  • Git
Terminal window
git clone https://github.com/th30d4y/HAST-CMS.git
cd HAST-CMS
npm install
npm run dev

The development server starts at http://localhost:4321.

CommandPurpose
npm run devStart development server
npm run buildBuild static output to dist/
npm run previewPreview built site locally
npm run new:post "Title"Create post from template
npm run validateCheck all post frontmatter
npm run checkTypeScript type checking
src/content/posts/ # Blog posts (.md files)
src/content/pages/ # Static pages
src/content/authors/ # Author profiles (.json)
src/content/settings/site.md # Branding config
src/config/site.ts # Structural config
public/ # Images and static assets
Terminal window
npm run new:post "My Post Title"

Creates src/content/posts/my-post-title.md with draft: true.

Required fields:

FieldTypeNotes
titlestringPost headline
descriptionstringMax 300 characters
dateYYYY-MM-DDControls sort order

Optional fields (selected):

FieldTypeDefaultNotes
slugstringfilenameURL override
draftbooleanfalseHides post in production
featuredbooleanfalseHomepage featured section
pinnedbooleanfalseHomepage pinned section
categorystring“Uncategorized”One per post
tagsstring[][]Multiple allowed
seriesstringGroups related posts
seriesOrderintegerPosition within series
tocbooleantrueTable of contents sidebar
noindexbooleanfalseExclude from search engines

Edit src/content/settings/site.md frontmatter:

  • siteName
  • author
  • authorRole
  • authorBio
  • siteDescription

Changes propagate to all pages, feeds, and meta tags on next build.

Edit src/config/site.ts:

  • siteURL — full deployed URL for canonical links and feeds
  • navigation — top nav links array
  • postsPerPage — default 10
  • relatedPostsCount — default 3
  • rss.feedItems — default 20
  • analytics — disabled by default; supports Plausible, Umami, GoatCounter
  • MDX support
  • Drafts and scheduled posts (future-dated posts auto-suppress)
  • Series navigation with prev/next links
  • Related posts
  • Client-side full-text search
  • RSS 2.0 at /rss.xml and JSON Feed 1.0 at /feed.json
  • Auto-generated sitemap
  • Syntax-highlighted code blocks with copy button
  • Reading time
  • Table of contents
  • SEO: canonical URLs, Open Graph, Twitter/X cards, Schema.org JSON-LD
PlatformBuild CommandOutput Directory
GitHub Pagesvia Actions workflowdist/
Cloudflare Pagesnpm run builddist/
Netlifynpm run builddist/
Vercelnpm run builddist/
ProblemSolution
Posts not appearing after dev startClear Astro cache: rm -rf .astro/data-store.json .astro/collections
Post not live after pushVerify draft: false, date is not future, GitHub Actions completed
Duplicate slug warningRename file or add unique slug: field
Series nav missingEnsure exact same series string (case-sensitive) across all posts
Images not loadingUse /images/file.png, not public/images/file.png
Search not finding contentRebuild with npm run build; search index is compile-time only
  • deploy.yml — Triggers on push to main and daily schedule; validates, type-checks, builds, and deploys.
  • pr-check.yml — Validates and builds PRs without deploying; blocks merges on errors.