Getting started

From an empty folder to a standalone, checked page.

First page

Four commands take you from an empty folder to a standalone, checked page.

Build a page

Create the skeleton, read the fragment contract, add a section and run the check.

  1. 01Skeleton
  2. 02Contract
  3. 03Composition
  4. 04Check
Create the project
python3 scripts/scaffold.py ./output/report --surface interface --title "Report"
Read the contract
python3 scripts/compose.py ./output/report --fragment section --list-placeholders
Preview the composition
python3 scripts/compose.py ./output/report --fragment section --dry-run \
  --set SECTION_ID=summary --set SECTION_TITLE="Summary" \
  --set SECTION_SUMMARY="A short explanation" \
  --html 'SECTION_CONTENT=<p>Content</p>'
Check the result
python3 scripts/check_project.py ./output/report
Recipe markup

What the recipe shows

  1. Start with a minimal skeleton without demo data.
  2. Check the fragment contract before filling in content.
  3. The finished page passes the same validator as the Craft catalogs.

Parts