Skip to content

spatial-model-editor/spatial-model-editor.github.io

Repository files navigation

icon

Build and deploy to gh-pages W3C Validation

How it works

Structure

Deployment

On every commit to the main branch:

How to edit locally

  • clone this repo
    • git clone https://github.com/spatial-model-editor/spatial-model-editor.github.io.git
    • cd spatial-model-editor.github.io
  • (optional) install pre-commit to auto-format code
    • pip install pre-commit
    • pre-commit install
  • install pnpm
    • windows: iwr https://get.pnpm.io/install.ps1 -useb | iex
    • linux/macOS: curl -fsSL https://get.pnpm.io/install.sh | sh -
  • install website dependencies
    • pnpm install
  • start a live in-browser local preview of the website
    • pnpm start
  • make changes to the files in src/ and the preview will update automatically

Adding a new page

To add a page X:

  • create a text file src/content/X.yml with the contents page_title: "X"
  • create a text file src/pages/X.njk that extends the base layout
  • create a text file src/pages/X.11tydata.js with the contents module.exports = require("./_helpers/loadContent")("X.yml");
  • add an entry for it to the list of pages in src/content/navbar.yml

Acknowledgements

About

Spatial Model Editor Website

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors