Preact Documentation Website
Based on preact-boilerplate
masteris automatically deployed to preactjs.com
This website is built as a static-app, following the Application Shell pattern.
Content is fetched and rendered on the fly from Markdown documents located in
Documents can contain optional YAML FrontMatter for specifying page metadata or layout information.
Once fetched, content is parsed using marked and rendered to VDOM via preact-markup.
Since preact is used to render the Markdown content, HTML contained in a document reference any of the Components listed in
src/components/widget.js as Custom Elements, useful for dynamic content.
Currently, the navigation menu and route handling is controlled by
This is likely to change, but in the meantime it means any new pages must be linked from the
"nav" section of the config.
Clone & Install Dependencies
git clone https://github.com/developit/preact-www.git cd preact-www npm install
To start a live-reload development server:
PORT=8080 npm run dev
Any time you make changes within the
srcdirectory, it will rebuild and even refresh your browser.
Generate a production build in
npm run build