The SSG procedure to generate a book online with versioning https://openfreebooks.org
Find a file
2026-05-19 03:22:22 -07:00
.agents/skills Update .gitignore to include additional static assets for KaTeX, add KaTeX and Commander dependencies in package.json and bun.lock, enhance footer with an About link in base.html, and improve work card links in index.html. Update Vite configuration for asset handling and add new components in SASS files. 2026-05-18 23:35:42 -07:00
content Update .gitignore to include additional static assets for KaTeX, add KaTeX and Commander dependencies in package.json and bun.lock, enhance footer with an About link in base.html, and improve work card links in index.html. Update Vite configuration for asset handling and add new components in SASS files. 2026-05-18 23:35:42 -07:00
data Update .gitignore to include additional static assets for KaTeX, add KaTeX and Commander dependencies in package.json and bun.lock, enhance footer with an About link in base.html, and improve work card links in index.html. Update Vite configuration for asset handling and add new components in SASS files. 2026-05-18 23:35:42 -07:00
frontend/src Refactor build process in package.json to clean up CSS files before building, enhance particle background implementation with new tree structure and color settings, and add new styles for tree call-to-action components in SASS files. 2026-05-19 03:22:22 -07:00
scripts Enhance package.json with a new script for scanning output size and update index.html to improve the hero section's heading with a new design and messaging. 2026-05-19 01:21:41 -07:00
static Update project configuration and documentation: set version in package.json, enhance spec.md with canvas feature details, add credits URL in zola.toml, and improve footer layout in base.html. Remove unused static files including 404.html, index.html, main.css, robots.txt, site.webmanifest, and sitemap.xml. 2026-05-18 22:33:20 -07:00
themes/openfreebooks Refactor build process in package.json to clean up CSS files before building, enhance particle background implementation with new tree structure and color settings, and add new styles for tree call-to-action components in SASS files. 2026-05-19 03:22:22 -07:00
.gitignore Update .gitignore to include additional static assets for KaTeX, add KaTeX and Commander dependencies in package.json and bun.lock, enhance footer with an About link in base.html, and improve work card links in index.html. Update Vite configuration for asset handling and add new components in SASS files. 2026-05-18 23:35:42 -07:00
bun.lock Add three.js dependency in package.json and bun.lock, implement particle background in main.tsx, and update SASS and HTML templates for background integration. 2026-05-19 02:05:58 -07:00
LICENSE Update project configuration and documentation: set version in package.json, enhance spec.md with canvas feature details, add credits URL in zola.toml, and improve footer layout in base.html. Remove unused static files including 404.html, index.html, main.css, robots.txt, site.webmanifest, and sitemap.xml. 2026-05-18 22:33:20 -07:00
package.json Refactor build process in package.json to clean up CSS files before building, enhance particle background implementation with new tree structure and color settings, and add new styles for tree call-to-action components in SASS files. 2026-05-19 03:22:22 -07:00
README.md Update zola.toml to include site title, description, theme, and additional URLs for navigation 2026-05-18 21:06:12 -07:00
skills-lock.json Update .gitignore to include additional static assets for KaTeX, add KaTeX and Commander dependencies in package.json and bun.lock, enhance footer with an About link in base.html, and improve work card links in index.html. Update Vite configuration for asset handling and add new components in SASS files. 2026-05-18 23:35:42 -07:00
spec.md Refactor build process in package.json to clean up CSS files before building, enhance particle background implementation with new tree structure and color settings, and add new styles for tree call-to-action components in SASS files. 2026-05-19 03:22:22 -07:00
tsconfig.json Update zola.toml to include site title, description, theme, and additional URLs for navigation 2026-05-18 21:06:12 -07:00
vite.config.ts Update .gitignore to include additional static assets for KaTeX, add KaTeX and Commander dependencies in package.json and bun.lock, enhance footer with an About link in base.html, and improve work card links in index.html. Update Vite configuration for asset handling and add new components in SASS files. 2026-05-18 23:35:42 -07:00
wrangler.jsonc Update zola.toml to include site title, description, theme, and additional URLs for navigation 2026-05-18 21:06:12 -07:00
zola.toml Update project configuration and documentation: set version in package.json, enhance spec.md with canvas feature details, add credits URL in zola.toml, and improve footer layout in base.html. Remove unused static files including 404.html, index.html, main.css, robots.txt, site.webmanifest, and sitemap.xml. 2026-05-18 22:33:20 -07:00

Open Free Books

Free, open-source textbooks for every learner — from elementary school through university. The site is fully static, open on GitHub, and deployed to Cloudflare.

Live site: openfreebooks.org

Stack

Layer Tool
Site generator Zola
Theme Custom theme in themes/openfreebooks/
Interactivity Solid.js (header, marquee, scroll reveal, theme toggle)
JS build Bun + Vite
Hosting Cloudflare Workers (static assets via Wrangler)

Book content will use Markdown. Canvas features will follow the JSON Canvas standard (Obsidian-compatible).

Prerequisites

Project layout

content/                 # Pages and sections (Markdown)
static/                  # Site assets copied to public/ (favicons, manifest)
themes/openfreebooks/    # Zola theme
  templates/             # HTML (Tera)
  sass/                  # Stylesheets (compiled to main.css)
  static/js/bundle.js    # Built Solid bundle (committed for simple deploys)
frontend/src/            # Solid.js source
public/                  # Zola build output (gitignored) — Wrangler deploy target
wrangler.jsonc           # Cloudflare Workers static assets config

Development

Install JS dependencies:

bun install

Build the Solid bundle and start Zola’s dev server:

bun run build:js
zola serve

Open http://127.0.0.1:1111. Re-run bun run build:js (or bun run dev:js in another terminal) when you change frontend/.

Production build

bun run build

This runs vite build (outputs to themes/openfreebooks/static/js/bundle.js) and then zola build (outputs to public/).

Deploy to Cloudflare

bun run build
wrangler deploy

The Worker name is openfreebooks (see wrangler.jsonc). Assets are served from public/ with no server-side logic.

Configuration

Site-wide settings live in zola.toml:

  • base_url — canonical URL for feeds and absolute links
  • [extra] — site_title, github_url, browse_url, about_url (used in templates and the Solid config block)

Theme notes

The visual design is inspired by manlung.work: paper background with grain, Instrument Serif headings, warm ochre accent (#9a6b2e), and light/dark mode (system preference plus a toggle).

Keep themes/openfreebooks/static/ clean. Only committed built assets belong there (currently js/bundle.js). Do not copy Zola’s public/ output into the theme static/ folder — that pollutes public/js/ on the next build.

License

Open source — see the repository license file when added.