How crabston/grav-theme-hadron works
Hadron is a Grav theme for building customizable sites. The principal workflow is configuring theme options and authoring page content, which Grav presents through Hadron’s page templates and shared site chrome. Distinct content capabilities include blog, documentation, modular pages, H5P, and Embed.ly; browser-side behavior adds responsive tables and navigation interactions. The README documents the major features, while sampled PHP and JavaScript show shortcode registration/rendering and client behavior. Template-to-blueprint routing is not shown, so those links are omitted.
Main entry points: templates Page templates · hadron.php Shortcode registration · hadron.js Theme interactions · H5PShortcode.php H5P embeds
Components 17
Site authoring
- Theme options
hadron.yaml - Page blueprints
blueprints
Page rendering
- Page templates
templates - Shared layout
templates/partials - Blog pages
templates/blog.html.twig - Docs pages
templates/docs.html.twig - Modular pages
templates/modular - Navigation and language
templates/partials/navigation.html.twig
Content integrations
- Shortcode registration
hadron.php - H5P embeds
shortcodes/H5PShortcode.php - Embed.ly cards
shortcodes/EmbedlyShortcode.php
Browser experience
- Theme interactions
js/hadron.js - Responsive tables
ts/responsiveTable.ts
Other components
- Site author
- Grav runtime
- H5P content service
- Embed.ly service
Connections 15
- Site author → Theme options: configures
README.md - Site author → Page blueprints: authors pages
README.md - Grav runtime → Page templates: uses theme
README.md - Page templates → Shared layout: renders shared chrome
- Page templates → Blog pages: renders blog
- Page templates → Docs pages: renders docs
- Page templates → Modular pages: renders modular content
- Page templates → Navigation and language: renders navigation
- Grav runtime → Shortcode registration: registers handlers
hadron.php - Shortcode registration → H5P embeds: loads shortcode
hadron.php - Shortcode registration → Embed.ly cards: loads shortcode
hadron.php - H5P embeds → H5P content service: embeds content
shortcodes/H5PShortcode.php - Embed.ly cards → Embed.ly service: loads card widget
shortcodes/EmbedlyShortcode.php - Theme interactions → Embed.ly service: creates card links
js/hadron.js - Theme interactions → Responsive tables: initializes tables