Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Developer Guide

TL;DR To build the pages, do the following:

  1. Install Node.js (version 16+). I did this with conda using
    conda create --name synoptic -c conda-forge nodejs conda activate synoptic 
    And add npm to your PATH
    # e.g., in ~/.bashrc export PATH=/home/blaylock/miniconda3/envs/synoptic/bin:$PATH 
  2. cd 11ty-site - Every time
  3. npm install - Do once, or anytime a NPM dependency changes
  4. npm run dev - Builds the full site in develop mode, (not tracked by Git).
  5. npm run dev:site - Builds the site without PyScript in develop mode, (not tracked by Git).
  6. npm run build - Builds the full site in production mode, (tracked by Git). Do NOT run this command; the page build is instead completed by GitHub Actions (./github/workflows/static.yml)

SynopticPy App Organization

The web app is built using the 11ty static site generator with Nunjucks as the template language.

Folder Structure

📂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.md

VS Code Tasks

There 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.

  1. 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.
  2. 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.