Longform
A plugin for longform content in Wagtail
Install / Use
/learn @torchbox/LongformREADME
Longform
Provides a new page type in wagtail that allows authors to add content to several newely defined block types within streamfield.
Each longform page created produces both a page that depends on JavaScript, and, a Printable, Accessible, JavaScript-less, lightweight page.
What's required
- An instance of Wagtail
What's included
- Blocktype definitions for streamfield
- Templates, compiled CSS and JS to render both resulting pages
Installation
Authoring content with it
- The
title,introductionandbackground imagemake up the Coverblock - The
menu linkspopulate the primary navigation - The
related pageis added to the Footerblock as a link using thetitleandintroductionproperties from the linked page - Within the
bodyan author will need to create achapterproviding it with atitle, each chapter populates the chapter navigation present on desktop resolutions upwards - After creating a
chapterusers can then chose thesectionstyle they would like to use
Developing with it
If you would like to make modifications to the templates;
- Browse the templates directory and modify the corresponding template
If you would like to adjust the CSS and/or JS;
- Ensure you have node 4.x or higher (we recommend sticking to LTS releases to ensure module compatibility)
- Install dependancies, navigate to the
/longformdirectory and runnpm install - Build and watch source directories with
npm run dev
