Knowledge Base

front.js as a documentation site generator

The KB is a showcase project demonstrating how to build a documentation site with front.js.
It features client-side markdown rendering, hash-based navigation, and zero build steps.

About the KB Project

Documentation Site

A complete documentation generator built with front.js, demonstrating markdown rendering and navigation.

Reactive Components

Features Navigation and MarkdownViewer components built with val, run, and calc primitives.

Zero Build Step

Pure HTML, CSS, and JavaScript. No bundlers, no transpilers. Just serve and go.

Features

📝 Client-Side Markdown

Uses the marked library from CDN to render markdown content dynamically.

đź”— Hash-Based Navigation

Deep linking via URL hash (#explainer, #manifesto) for bookmarkable pages.

⚡ Reactive UI

Navigation and content viewer built with front.js reactivity primitives.

🚀 Static Deployment

Deploy anywhere—GitHub Pages, Netlify, Vercel, or any static host.

How to Run Locally

Option 1: Using back-js

cd back-js
npm start

# KB available at http://localhost:3000/KB/

Option 2: Static Server

# Python
python3 -m http.server 8000

# Node.js
npx serve .

# Then navigate to /KB/

Common Gotchas

"Component not registered" Error

If you see Component "NavBar" not registered in the console:

  • Missing Script Tags: Ensure app.js (and front.js) is included on every HTML page. Since front.js is an MPA framework, scripts are not shared between pages.
  • Script Type: specific script tags must be type="module".