# Template Documentation ## Overview This directory contains Jinja2 templates used by the build script to generate HTML pages for the marimo WebAssembly + GitHub Pages project. Templates define the structure and appearance of the generated pages, particularly the index page that lists all notebooks and apps. ## Template Requirements ### Basic Structure A template should be a valid HTML file with Jinja2 syntax for dynamic content. The template should: 1. Have a `.html.j2` extension 2. Include proper HTML structure (doctype, head, body) 3. Use responsive design principles for good display on various devices ### Expected Variables Templates receive the following variables from the build script: - `notebooks`: A list of dictionaries containing information about notebooks - Each notebook has: - `display_name`: The formatted name of the notebook (e.g., "Penguins" instead of "penguins") - `html_path`: The path to the HTML file for the notebook - `apps`: A list of dictionaries containing information about apps - Each app has: - `display_name`: The formatted name of the app - `html_path`: The path to the HTML file for the app ### Required Sections A complete template should include: 1. **Conditional Notebook Section**: Only display if notebooks exist ```jinja {% if notebooks %}