TL;DR To build the pages, do the following:
- Install Node.js (version 16+). I did this with conda using And add npm to your PATH
conda create --name synoptic -c conda-forge nodejs conda activate synoptic# e.g., in ~/.bashrc export PATH=/home/blaylock/miniconda3/envs/synoptic/bin:$PATH cd 11ty-site- Every timenpm install- Do once, or anytime a NPM dependency changesnpm run dev- Builds the full site in develop mode, (not tracked by Git).npm run dev:site- Builds the site without PyScript in develop mode, (not tracked by Git).Do NOT run this command; the page build is instead completed by GitHub Actions (./github/workflows/static.yml)npm run build- Builds the full site in production mode, (tracked by Git).
The web app is built using the 11ty static site generator with Nunjucks as the template language.
📂11ty-site/ ├─📂dev/ # The local site build; not tracked by git; DO NOT EDIT ├─📂node_modules/ # Node dependencies installed with `npm install` ├─📂pages/ # Holds the content of the website │ ├─📂_data/ │ ├─📂_includes/ │ ├─📂app/ # HTML, CSS, Python, fonts, etc. that make the webpage │ ├─📂web/ │ └─📄index.njk ├─📄.eleventy.js ├─📄package-lock.json ├─📄package.json └─📄README.mdThere are two VS Code tasks to help you test the webpage before it is deployed.
Note:These assume you have nodejs installed in a conda environment named
synoptic.
- Build 11ty - Develop Will build the site in "develop" mode and serve the page to http://localhost:8080/ so you can preview changes to the site as you are working on the app.
- Build 11ty - Develop (pyscript off) Does the same as above, except it turns of loading pyscript. This is useful if you are working on the UI and don't need to test the pyscript functionality.