template-m
v0.0.2
Published
Render HTML based on HTML annotated with attributes.
Readme
Template-M
A minimal templating library for JavaScript developers.
Build Process
This project includes a build step that converts Markdown documentation to HTML using Ruby's Kramdown library.
Prerequisites
- Ruby (tested with Ruby 3.x)
- Go (for building the server binary)
- Docker (for containerization)
Building
make allThis will:
- Render Markdown files to HTML (installs Ruby gems automatically)
- Build the Go binary
- Build the Docker image
Development
To render just the Markdown files:
make render-markdownThe html-rendering-paradigms.md file is converted to HTML and inserted into public/paradigms.html while preserving the page structure (header, navigation, footer).
Markdown Rendering
The markdown rendering is handled by scripts/render_markdown.rb, which:
- Uses Kramdown with GitHub Flavored Markdown (GFM) parser
- Extracts header and footer from the existing HTML template
- Converts markdown to HTML
- Wraps the content in the appropriate structure
- Preserves navigation and styling
Project Structure
public/- Static files served by the web serverscripts/- Build and utility scriptssrc/- Go source code for the web servertemplates/- Go HTML templatesresources/- Application resourceshtml-rendering-paradigms.md- Source markdown for paradigms documentation
