The SSG procedure to generate a book online with versioning https://openfreebooks.org
Find a file
2026-05-21 23:55:33 -07:00
.agents/skills Update contributing guidelines and enhance build scripts: Add detailed instructions for build modes in CONTRIBUTING.md, clarifying the use of incremental and full rebuilds. Revise package.json to streamline build commands and introduce new dev scripts for better development workflow. Remove deprecated integer arithmetic chapter files and update curriculum JSON to reflect the latest structure. Enhance Pythagorean theorem content with a new vocabulary section for improved clarity. 2026-05-21 23:55:33 -07:00
.github Add GitHub sponsors support and enhance contributing page: Introduce a new script for syncing GitHub sponsors in package.json. Update contributing.md to acknowledge contributors and sponsors, and enhance the contributing page with a dedicated section for sponsors. Improve styles for sponsor-related content in SCSS files and update templates to include sponsor information across relevant pages. 2026-05-21 11:40:42 -07:00
content Update contributing guidelines and enhance build scripts: Add detailed instructions for build modes in CONTRIBUTING.md, clarifying the use of incremental and full rebuilds. Revise package.json to streamline build commands and introduce new dev scripts for better development workflow. Remove deprecated integer arithmetic chapter files and update curriculum JSON to reflect the latest structure. Enhance Pythagorean theorem content with a new vocabulary section for improved clarity. 2026-05-21 23:55:33 -07:00
data Update contributing guidelines and enhance build scripts: Add detailed instructions for build modes in CONTRIBUTING.md, clarifying the use of incremental and full rebuilds. Revise package.json to streamline build commands and introduce new dev scripts for better development workflow. Remove deprecated integer arithmetic chapter files and update curriculum JSON to reflect the latest structure. Enhance Pythagorean theorem content with a new vocabulary section for improved clarity. 2026-05-21 23:55:33 -07:00
docs/research Enhance curriculum catalog functionality: Update CONTRIBUTING.md to reflect changes in curriculum structure, including the introduction of curriculumCoverage for frameworks. Modify frontend components to support a new comparison view for Mathematics, allowing users to compare curricula. Update catalog data to include "Common Core" and improve curriculum filtering logic. Enhance styles for better visual representation of curriculum badges and Mermaid diagrams. Adjust TypeScript types to accommodate new features and ensure backward compatibility with legacy curriculum data. 2026-05-20 14:02:29 -07:00
frontend/src Enhance math content presentation and widget styles: Update SKILL.md to specify the use of shared modal patterns for chapter widgets. Revise algebraic fractions examples in _index.md, core.html, and supplement.html to utilize aligned multi-line KaTeX for improved readability. Introduce responsive styles in chapter.scss for better mobile layout in addition groups and big numbers scale controls. 2026-05-21 23:25:20 -07:00
scripts Update contributing guidelines and enhance build scripts: Add detailed instructions for build modes in CONTRIBUTING.md, clarifying the use of incremental and full rebuilds. Revise package.json to streamline build commands and introduce new dev scripts for better development workflow. Remove deprecated integer arithmetic chapter files and update curriculum JSON to reflect the latest structure. Enhance Pythagorean theorem content with a new vocabulary section for improved clarity. 2026-05-21 23:55:33 -07:00
static Update contributing guidelines and enhance build scripts: Add detailed instructions for build modes in CONTRIBUTING.md, clarifying the use of incremental and full rebuilds. Revise package.json to streamline build commands and introduce new dev scripts for better development workflow. Remove deprecated integer arithmetic chapter files and update curriculum JSON to reflect the latest structure. Enhance Pythagorean theorem content with a new vocabulary section for improved clarity. 2026-05-21 23:55:33 -07:00
themes/openfreebooks Update contributing guidelines and enhance build scripts: Add detailed instructions for build modes in CONTRIBUTING.md, clarifying the use of incremental and full rebuilds. Revise package.json to streamline build commands and introduce new dev scripts for better development workflow. Remove deprecated integer arithmetic chapter files and update curriculum JSON to reflect the latest structure. Enhance Pythagorean theorem content with a new vocabulary section for improved clarity. 2026-05-21 23:55:33 -07:00
.gitignore Refactor math chapter structure and styling: Update .gitignore to exclude specific CSS directories, enhance CONTRIBUTING.md with new guidelines for subject-specific assets, and streamline chapter content organization. Modify curriculum data to include new chapter dependencies and improve frontend logic for loading shared styles and scripts. Adjust styles for better visual consistency across math chapters. 2026-05-20 18:07:39 -07:00
bun.lock Update .gitignore to exclude generated chapter sync output, enhance package.json scripts for chapter synchronization, and update README and CONTRIBUTING.md for improved clarity on chapter structure and development processes. Remove obsolete components related to quadratic demos to streamline the project. 2026-05-19 15:39:35 -07:00
CONTRIBUTING.md Update contributing guidelines and enhance build scripts: Add detailed instructions for build modes in CONTRIBUTING.md, clarifying the use of incremental and full rebuilds. Revise package.json to streamline build commands and introduce new dev scripts for better development workflow. Remove deprecated integer arithmetic chapter files and update curriculum JSON to reflect the latest structure. Enhance Pythagorean theorem content with a new vocabulary section for improved clarity. 2026-05-21 23:55:33 -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
math-banner.jpg Add catalog subject banner feature: Introduce optional header images for subjects in the catalog, update CONTRIBUTING.md with guidelines for adding banners, and modify catalog data structure to support banner URLs. Enhance frontend components and styles to display banners effectively. Update TypeScript types and curriculum structure to accommodate new banner functionality. 2026-05-20 12:40:51 -07:00
package.json Update contributing guidelines and enhance build scripts: Add detailed instructions for build modes in CONTRIBUTING.md, clarifying the use of incremental and full rebuilds. Revise package.json to streamline build commands and introduce new dev scripts for better development workflow. Remove deprecated integer arithmetic chapter files and update curriculum JSON to reflect the latest structure. Enhance Pythagorean theorem content with a new vocabulary section for improved clarity. 2026-05-21 23:55:33 -07:00
README.md Update contributing guidelines and enhance build scripts: Add detailed instructions for build modes in CONTRIBUTING.md, clarifying the use of incremental and full rebuilds. Revise package.json to streamline build commands and introduce new dev scripts for better development workflow. Remove deprecated integer arithmetic chapter files and update curriculum JSON to reflect the latest structure. Enhance Pythagorean theorem content with a new vocabulary section for improved clarity. 2026-05-21 23:55:33 -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 Update curriculum content and improve site metadata: Change the status of multiple math chapters from 'planned' to 'live' in the JSON curriculum file. Enhance the chapter content in spec.md with updated best practices for chapter creation. Revise the feed and sitemap XML files to include new chapters and their last modified timestamps for better SEO and navigation. Update the section title in the why-sections template for clarity. 2026-05-21 09:54:30 -07:00
tsconfig.json Refactor math rendering: Replace direct KaTeX imports with a centralized module for rendering math expressions across widgets. Update CONTRIBUTING.md with new guidelines for using KaTeX in HTML and widgets. Enhance TypeScript configuration for path resolution of the KaTeX module. Update curriculum status for linear equations and improve math rendering logic in the frontend. 2026-05-20 13:17:25 -07:00
vite.config.ts Update build scripts and enhance README: Modify build command to delete HTML files before building, improve search indexing command, and add a badge for DeepWiki in the README. Refactor math subject initialization and enhance type definitions in BigNumbersScale component for better clarity and maintainability. Introduce sound effects in vertical arithmetic workbench for improved user interaction. 2026-05-20 22:05:38 -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 Add catalog subject banner feature: Introduce optional header images for subjects in the catalog, update CONTRIBUTING.md with guidelines for adding banners, and modify catalog data structure to support banner URLs. Enhance frontend components and styles to display banners effectively. Update TypeScript types and curriculum structure to accommodate new banner functionality. 2026-05-20 12:40:51 -07:00

Open Free Books — Free, Open-Source Textbooks

Open Free Books

DeepWiki

Work in Progress. I am looking for contributors to help build this project. Educators and engineer welcome.

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
Search Pagefind (post-build index, Component UI)
Hosting Cloudflare Workers (static assets via Wrangler)

Chapter content is HTML partials in the theme today (not Markdown). Catalog maps use a Mermaid-powered interactive tree view (pan/zoom).

Contributing curriculum, subjects, or chapters? See CONTRIBUTING.md.

Prerequisites

Project layout

content/                 # Pages and sections (Markdown front matter)
data/                    # Catalog + per-subject curriculum JSON
static/                  # Site assets copied to public/ (favicons, _redirects)
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

For day-to-day local development, run JS watch + Zola serve together:

bun run dev

Open http://127.0.0.1:1111. Re-run bun run index:search when you change chapter HTML or add pages so search stays up to date.

Use bun run dev:full when you want to force a full chapter sync before starting dev servers.

Search UI is available immediately; results require the index step above (static/pagefind/ is gitignored and copied from the build output).

Production build

bun run build

bun run build is smart/incremental for local development:

  • first run (or missing cache) behaves like a full build,
  • repeat runs skip unchanged steps.

Use bun run build:full for a deterministic full rebuild (recommended for CI/release validation).

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, search_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.

Contributor experience — known friction (task list)

These issues make contributions harder than they should be. PRs that fix any item are welcome.

Agent skills

Skill Path Use
OFB (this project) .agents/skills/ofb/SKILL.md Catalog, curriculum JSON, chapters, product rules
Zola + Solid .agents/skills/zola/SKILL.md Templates, Sass, bundle, zola serve

License

Open source — see the repository license file when added.