What's under the hood?
This shows how Jinja2-based static builds are used to turn folders into structured logic sites.
K-Site is a zero-GUI transformation engine that converts any folder into a static, navigable HTML site.
No servers. No frameworks. No runtime dependency chain.
Deploys as a .zip from a repo - or as a desktop app for one-click local builds.
Core Process
- Python 3.10+
- Libraries used:
jinja2
→ HTML rendering from templatesmarkdown
,toc
,extra
→ for .md content + TOC logicyaml
→ configuration rules (render extensions, output paths)csv
,json
,io
→ structured content parsingpathlib
,os
,shutil
→ folder traversal, file opsre
→ content rewrites (autolink TOCs, viewer redirects)
Execution Flow
-
Folder scan
Each subfolder is walked recursively. Logic skips ignored folders by YAML config. -
Content classification
.md
,.txt
,.csv
,.json
,.py
→ rendered withviewer.html
- Images → copied directly
-
Other files → either skipped or zipped (configurable)
-
Viewer generation
Rendered HTML is injected with aviewer.html
template, embedding content and safe download links. -
Subfolder
index.html
build
Each folder gets its own index with file links, built from the list of generated items. -
Root
index.html
(landing)
Generated fromREADME.md
with markdown-to-HTML conversion. Injected into a stripped landing template. -
Static variant (
index_static.html
)
Optionally generated as a no-script fallback using the same file map, minus JS logic. -
Packaging
Entiredocs/
is zipped into a standalone site bundle.
K-Site is meant to ship offline.
No runtime, no build chain, no NPM, no Docker, no bullshit.
Just Python + Jinja + a structured mind.
-- Kay
`#ksite #aiposbuilt #foldertransformationengine #fromukrainianswithlovetohumankind 🇺🇦`