tsoniclang/tsumo

A hugo-inspired blog engine

2

stars

132

commits

C#

primary language

Sep 2, 2026

updated

README

tsumo

A Hugo-inspired static site generator.

tsumo is implemented in TypeScript and compiled to native code with Tsonic (TS → C# → .NET).

Documentation

  • docs/README.md — end-user docs (getting started, CLI, config, templates, docs mode)
  • examples/basic-blog/README.md — minimal blog example
  • examples/docs-site/README.md — multi-repo docs example (mounts + nav + search)

Hugo compatibility (subset)

AreaFeatureStatusNotes
MarkdownGitHub Flavored Markdown (GFM)Powered by Markdig (GitHub heading IDs, tables, task lists, autolinks, fenced code blocks, etc.)
ContentSections + nested pathscontent/posts/series/part-1.md/posts/series/part-1/
ContentLeaf bundles (index.md)Copies non-.md bundle resources next to the built page
ContentBranch bundles (_index.md)Home and nested section list pages
Front matterYAML / TOML / JSONtitle, date, draft, description, slug, type, layout, tags, categories, params
Taxonomiestags + categoriesGenerates terms + term pages
TemplatesHugo-like Go templates (subset)baseof, block, define, partial, if/else/else if, with, range, template
TemplatesRender hookslayouts/_markup/*.html + layouts/_default/_markup/*.html
Shortcodes{{< >}} + {{% %}}Loaded from layouts/shortcodes/ + layouts/_shortcodes/
MenusConfig + front matter menusMerged + hierarchical (parent, weight)
AssetsHugo-like pipeline (subset)resources.*, css.Sass, Fingerprint, ExecuteAsTemplate (Sass requires TSUMO_SASS/sass)
Outputsindex.xml, sitemap.xml, robots.txtGenerated unless you provide your own static files
CLIbuild, server, new site, newserver supports watch + rebuild
DocsMulti-repo mounts + nav + searchEnabled by tsumo.docs.json (tsumo-specific)
Advanced HugoMultilingual builds, paginationNot implemented

Data model

tsumo parses configuration, front matter, docs manifests, template contexts, and resource metadata into closed engine models. JSON input is accepted for supported schemas and then narrowed into typed Tsonic classes before build or template execution.

This keeps generated native code deterministic while preserving Hugo-style authoring for normal site content.

Repo layout

  • packages/engine — core build + server engine (Tsonic source package, user-owned Tsumo.Engine.csproj)
  • packages/clitsumo CLI (Tsonic executable, user-owned Tsumo.Cli.csproj with NativeAOT publish)
  • packages/tests — Tsonic-authored xUnit tests (user-owned Tsumo.Tests.csproj)
  • packages/markdig — vendored Markdig source build (GFM Markdown; provider + target reference)
  • examples/basic-blog — example site (Hugo-style layout)
  • examples/docs-site — docs-mode example (mounts + nav + search)

Coding standards

See CODING-STANDARDS.md.

Build

npm install
npm run build

npm run build runs three ordered stages:

  1. prepare:provider-references — builds the vendored Markdig assembly and materializes the locked NuGet compile closure (PhotoSauce + codecs) into an immutable .temp/provider-reference-snapshots/*/product directory and atomically selects it through .temp/active-provider-references; these exact assemblies are both the Tsonic provider reflection input and the .csproj compile references.
  2. build:tsonictsonic build for the engine, CLI, and tests projects. Tsonic emits C# source only into each package's ignored out/csharp/; the user-owned .csproj files are never generated or modified.
  3. build:dotnetdotnet build for the user-owned projects.

Sibling checkouts are installed via file: dependencies (../tsonic, ../tsonic-csharp, ../csharp-runtime, ../csharp-js, ../csharp-nodejs).

Tests

npm run test:dotnet   # Tsonic-authored xUnit tests through dotnet test
npm test              # Node-driven end-to-end CLI/fixture tests

Try the example

# Build the example site into examples/basic-blog/public
dotnet run --project packages/cli/Tsumo.Cli.csproj -- build --source ./examples/basic-blog

# Dev server (watch + rebuild)
dotnet run --project packages/cli/Tsumo.Cli.csproj -- server --source ./examples/basic-blog

Commands

  • tsumo new site <dir> — scaffold a new site
  • tsumo new <path.md> [--source <dir>] — create new content under content/
  • tsumo build [--source <dir>] — build site into public/
  • tsumo server [--source <dir>] — serve public/ (watch + rebuild by default)

Native AOT

npm run -w tsumo-cli publish:aot
./packages/cli/bin/Release/net10.0/linux-x64/publish/tsumo --help

Contributors

jeswin

132 commits

tsoniclang/tsumo

A hugo-inspired blog engine

2

stars

132

commits

C#

primary language

Sep 2, 2026

updated

README

tsumo

A Hugo-inspired static site generator.

tsumo is implemented in TypeScript and compiled to native code with Tsonic (TS → C# → .NET).

Documentation

  • docs/README.md — end-user docs (getting started, CLI, config, templates, docs mode)
  • examples/basic-blog/README.md — minimal blog example
  • examples/docs-site/README.md — multi-repo docs example (mounts + nav + search)

Hugo compatibility (subset)

AreaFeatureStatusNotes
MarkdownGitHub Flavored Markdown (GFM)Powered by Markdig (GitHub heading IDs, tables, task lists, autolinks, fenced code blocks, etc.)
ContentSections + nested pathscontent/posts/series/part-1.md/posts/series/part-1/
ContentLeaf bundles (index.md)Copies non-.md bundle resources next to the built page
ContentBranch bundles (_index.md)Home and nested section list pages
Front matterYAML / TOML / JSONtitle, date, draft, description, slug, type, layout, tags, categories, params
Taxonomiestags + categoriesGenerates terms + term pages
TemplatesHugo-like Go templates (subset)baseof, block, define, partial, if/else/else if, with, range, template
TemplatesRender hookslayouts/_markup/*.html + layouts/_default/_markup/*.html
Shortcodes{{< >}} + {{% %}}Loaded from layouts/shortcodes/ + layouts/_shortcodes/
MenusConfig + front matter menusMerged + hierarchical (parent, weight)
AssetsHugo-like pipeline (subset)resources.*, css.Sass, Fingerprint, ExecuteAsTemplate (Sass requires TSUMO_SASS/sass)
Outputsindex.xml, sitemap.xml, robots.txtGenerated unless you provide your own static files
CLIbuild, server, new site, newserver supports watch + rebuild
DocsMulti-repo mounts + nav + searchEnabled by tsumo.docs.json (tsumo-specific)
Advanced HugoMultilingual builds, paginationNot implemented

Data model

tsumo parses configuration, front matter, docs manifests, template contexts, and resource metadata into closed engine models. JSON input is accepted for supported schemas and then narrowed into typed Tsonic classes before build or template execution.

This keeps generated native code deterministic while preserving Hugo-style authoring for normal site content.

Repo layout

  • packages/engine — core build + server engine (Tsonic source package, user-owned Tsumo.Engine.csproj)
  • packages/clitsumo CLI (Tsonic executable, user-owned Tsumo.Cli.csproj with NativeAOT publish)
  • packages/tests — Tsonic-authored xUnit tests (user-owned Tsumo.Tests.csproj)
  • packages/markdig — vendored Markdig source build (GFM Markdown; provider + target reference)
  • examples/basic-blog — example site (Hugo-style layout)
  • examples/docs-site — docs-mode example (mounts + nav + search)

Coding standards

See CODING-STANDARDS.md.

Build

npm install
npm run build

npm run build runs three ordered stages:

  1. prepare:provider-references — builds the vendored Markdig assembly and materializes the locked NuGet compile closure (PhotoSauce + codecs) into an immutable .temp/provider-reference-snapshots/*/product directory and atomically selects it through .temp/active-provider-references; these exact assemblies are both the Tsonic provider reflection input and the .csproj compile references.
  2. build:tsonictsonic build for the engine, CLI, and tests projects. Tsonic emits C# source only into each package's ignored out/csharp/; the user-owned .csproj files are never generated or modified.
  3. build:dotnetdotnet build for the user-owned projects.

Sibling checkouts are installed via file: dependencies (../tsonic, ../tsonic-csharp, ../csharp-runtime, ../csharp-js, ../csharp-nodejs).

Tests

npm run test:dotnet   # Tsonic-authored xUnit tests through dotnet test
npm test              # Node-driven end-to-end CLI/fixture tests

Try the example

# Build the example site into examples/basic-blog/public
dotnet run --project packages/cli/Tsumo.Cli.csproj -- build --source ./examples/basic-blog

# Dev server (watch + rebuild)
dotnet run --project packages/cli/Tsumo.Cli.csproj -- server --source ./examples/basic-blog

Commands

  • tsumo new site <dir> — scaffold a new site
  • tsumo new <path.md> [--source <dir>] — create new content under content/
  • tsumo build [--source <dir>] — build site into public/
  • tsumo server [--source <dir>] — serve public/ (watch + rebuild by default)

Native AOT

npm run -w tsumo-cli publish:aot
./packages/cli/bin/Release/net10.0/linux-x64/publish/tsumo --help

Contributors

jeswin

132 commits

Languages

C#

58.0%

TypeScript

40.3%

JavaScript

1.4%