Skip navigation

Frontend Integration

Frontend Integration

Sparrow CMS gives you full control over the frontend.

Templates

Pages use Django templates. The base template (sparrow/base.html) provides the HTML skeleton with header, footer, and content blocks. Override content_body for custom layouts.

Themes

SCSS files in website/static/website/scss/. Import a Bootswatch theme in default.scss, add custom variables in _variables.scss, site styles in _common.scss. Compile with python manage.py sass.

Static Files

JavaScript goes in website/static/website/js/. CSS is compiled from SCSS. collectstatic gathers everything for production. WhiteNoise or S3 serves them.

Headless

Use the Wagtail REST API or wagtail-grapple for GraphQL. Sparrow also provides a YAML import API at /api/wagtail/import/.