Go • Zero JS • Vue SFC syntax

Server-side component
rendering for Go

Write reusable HTML components in .vue files. Render them server-side in Go — no Node.js, no JavaScript runtime, no virtual DOM.

go install github.com/dhamidi/htmlc/cmd/htmlc@latest
🆕
Zero JavaScript runtime

Templates evaluate once per request and produce plain HTML. No hydration, no virtual DOM, no client bundles.

📄
Vue SFC syntax

Author components using the same .vue format you already know — v-if, v-for, v-bind, slots, scoped styles.

🔧
CLI & Go API

Use the htmlc CLI for static sites or import the Go package to render components inside any HTTP handler.

🎨
Scoped styles

<style scoped> rewrites selectors and injects scope attributes automatically — styles never leak between components.

📚
Static site generation

htmlc build walks a pages directory and renders every .vue file to a matching .html file. Props come from sibling JSON files.

🔎
Debug mode

Pass -debug and the output is annotated with HTML comments showing which component rendered each subtree.

Up and running in minutes

Install the CLI, write a component, render it.

1. Install
go install github.com/dhamidi/htmlc/cmd/htmlc@latest
2. Write a component
<!-- templates/Greeting.vue -->
<template>
  <p>Hello, {{ name }}!</p>
</template>
3. Render it
$ htmlc render -dir ./templates Greeting \
    -props '{"name":"world"}'
<p>Hello, world!</p>
4. Build a whole site
$ htmlc build \
    -dir ./templates \
    -pages ./pages \
    -out ./dist
Build complete: 12 pages, 0 errors.