OER-Forge is a database-driven static site generator for open educational resources (OER). It converts Markdown and other source files into a fully navigable, static HTML website, using a SQLite database as the source of truth for content, navigation, and assets.
- Markdown to HTML Conversion: Converts all Markdown files listed in
_content.ymlto HTML using markdown-it-py and Jinja2 templates. - Database-Driven Navigation: Navigation menus and content relationships are managed in a SQLite database (
db/sqlite.db), populated from_content.yml. - Relative Link Rewriting: All internal links and asset references are rewritten to be relative to the
build/directory for static hosting compatibility. - Static Asset Management: Copies CSS, JS, and image assets to the build directory. Images referenced in the database are also copied.
- Site Metadata: Site information (title, author, theme, etc.) is synced from
_content.ymlto the database. - Logging: All build steps and errors are logged to
log/build.logfor debugging and inspection.
- Python 3.8+
- All dependencies listed in
requirements.txt
- Install dependencies:
pip install -r requirements.txt
- Edit
_content.ymlto define your site structure, navigation, and metadata. - Run the build:
python build.py # or python oerforge/make.py - The generated site will be in the
build/directory, ready for static hosting. - Check
log/build.logfor build details and errors.
build/β Output directory for generated HTML and assetscontent/β Source Markdown and other content filesdb/β SQLite database and related fileslayouts/β Jinja2 HTML templateslog/β Build and database logsoerforge/β Core Python package (build scripts, utilities)tests/β Test scripts_content.ymlβ Site structure, navigation, and metadatarequirements.txtβ Python dependenciesREADME.mdβ This fileBUILD-NOTES.mdβ Developer build notes and roadmap
- verify.py Integration: Automated validation of build output, link checking, and content integrity.
- Image Embedding: Support for embedding both local and remote images in HTML output.
- IPYNB and DOCX Conversion: Add support for converting Jupyter Notebooks (
.ipynb) and Word documents (.docx). - Download/Linked File Buttons: UI buttons for downloading or linking to related files (PDF, DOCX, EPUB, etc.) on each page.
- Admin View: Admin dashboard for managing site content and conversions, controlled by
_content.yml.
Contributions are welcome! Please:
- Keep code clean, DRY, and well-documented.
- Reference the database and
_content.ymlstructure in your changes. - Add or update docstrings and usage examples as needed.
- Run tests and check logs before submitting a pull request.
See LICENSE for details.
For more information, see BUILD-NOTES.md and the code documentation in each script.