Read in all plugins and markdown and site global info
Create plan to create indexes
Refresh
Pull indexes, run thru all plugins, create desired manifest
Pull existing files/create old Manifest (skipped in DEV)
Plan (skipped in DEV)
Diff desired vs old manifest
generate list of pages (and other files) to generate
Build (in DEV - only build on demand)
Pull data slices
Generate HTML, JS, CSS and JSON
PostBuild (n/a in DEV)
FullData => RSS
Serverside Redirects?
Concepts:
Site global info is readable anywhere. changing it forces complete rebuild.
We break up data fetching into (cheap) data index and (expensive) data slices. We memoize data slice calls and attach them to data Index in a FullData object, with which we can do final builds like for RSS.
ssg can generate pages, images, and misc files - we just call these "files"
plugins can:
contribute indexes
map from index they own to files
map from FullData index to files
map from indexes to new index? -> eg how to generate tags/categories
Features to design for:
shadowed/eject templates and webpack config
We want programmatic page creation
We want incremental builds
We want a nice dev mode
We want redirects -> clientside as well as serverside
We want typescript/postprocessing/postcss
We want RSS (dataslices)
we can stop and rerun any stages if misconfigured
REPL for data
Filesystem routing
nonfeatures
No js in main page - just has mount points for svelte
The primary way
ssg
will work:Concepts:
Features to design for:
nonfeatures
===
https://github.com/sw-yx/ssg-prototype