How beaurancourt/sovereign works
Main Components
• Content Files: These include Markdown files such as arcane-traditions.md, character-creation.md, classes.md, combat.md, etc. They hold the narrative and informational content for the site.
• Data Sources: The _data directory contains JSON files (e.g., feats.json, monsters.json, rules.json) that provide structured game data used to populate the site.
• Layouts & Includes: The _layouts and _includes directories house HTML template files (for instance, default.html and chapter-toc.html) that define the overall structure and reusable elements of the site.
• Assets: The assets folder (subdivided into css, js, and images) manages the site’s styling, interactivity (through JavaScript files like search.js, monster-search.js, sidebar.js), and visual assets.
• Jekyll Engine: The Jekyll build system itself (invoked via the command line) processes all of the above components through Ruby-based templating and the Liquid engine to output a fully rendered static website.
• Build Tools & Configuration: Files like Gemfile, Gemfile.lock, and build-toc.rb are used by Bundler and Jekyll to manage dependencies, build scripts, and site generation.
Relationships and Interactions
• Content Flow: Markdown files and JSON data feed into the Jekyll engine.
• Templating: Jekyll uses _layouts and _includes to wrap Markdown content into complete HTML pages.
• Assets Integration: The final HTML pages incorporate styles and scripts found in the assets folder for proper presentation and dynamic functionalities.
• Build Process: The build-toc.rb script and configuration files assist with generating navigational elements such as table of contents, ensuring an organized structure throughout the site.
Key Architectural Patterns and Design Principles
• Separation of Concerns: Content, structure, and styling are segregated into distinct directories (content in Markdown, templates in _layouts/_includes, and presentation via assets).
• Data-Driven Rendering: The _data folder is leveraged to manage structured data (game rules, stats, etc.) that can be reused across different pages.
• Static Site Generation: The project follows the static site paradigm where the build process produces pure HTML/CSS/JS outputs rather than relying on runtime server-side rendering.
Relevant Technologies and Libraries
• Jekyll (for static-site generation)
• Ruby (as the programming language for Jekyll and associated scripts)
• Bundler (to manage Ruby Gem dependencies)
• Liquid Templates (for embedding dynamic data into static pages)
Elements
• Clear Labels: For each main component – Content Files, Data Files, Layouts, Includes, Assets, Build Scripts, and the Jekyll Engine.
Additional Details
• Role of the Gemfile and Bundler in setting up the environment.
• Build process (jekyll serve) that continuously compiles changes into the static site.
• Optionally, note how additional scripts (like build-toc.rb) assist with dynamic content generation such as navigation.