Skip to content

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icon

Build and deploy to gh-pages W3C Validation

How it works

  • the contents of each page are stored in yaml format in src/content
  • there is a corresponding pug HTML template for each page in src/pug
  • uses CSS and icons from the Bootstrap framework
  • uses pnpm and webpack to manage the build and dependencies

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/pug/X.pug with the contents extends layouts/base
  • create a text file src/content/X.yml with the contents page_title: "X"
  • add an entry for it to the list of pages in src/content/navbar.yml

Acknowledgements