Tutorials webb that aggregates content from multiple sources into a single bilingual (EN/SV) site with tag-based navigation.
- umsme — markdown and auto-generated screens pulled from the
umsmeapp repo'stutorial/directory. Screens are produced by the app's Storybook (tutorial/screenshot.jsinside umsme) and must stay there. - local — tutorials authored directly in this repo under
content/. - gdrive — tutorials authored in publicly-shared Google Docs. The sync downloads each doc's markdown export, decodes its inline base64 images into
sources/gdrive/tutorial/screens/, flattens layout-grid tables, and strips trailing version-history sections. SeeAUTHORING-GDRIVE.mdfor the author-facing format spec.
npm install
npm run sync # populates gitignored sources/ (umsme shallow-clone + gdrive markdown export)
npm run build # writes dist/
npm run serve # serves dist/ at http://localhost:8000
Or run all three in order:
npm run dev
npm run sync runs both source-specific syncs in order. You can also run them individually:
npm run sync:umsme— shallow + sparse checkout of the umsme repo intosources/umsme/, limited to thetutorial/directory. The synced commit SHA is recorded insources/umsme/.synced-sha.- Re-running updates to the latest
master. scripts/sync-umsme.sh --ref <branch|tag|sha>syncs a specific ref instead.
- Re-running updates to the latest
npm run sync:gdrive— fetches each{ source: "gdrive" }tutorial intutorials.config.jsfrom Google Docs' markdown export, decodes inline base64 images, cleans the markdown (heading quirks, table flattening, trailing version-history removal), and writes tosources/gdrive/tutorial/. Per-doc sha256 hashes are recorded insources/gdrive/.synced-sha. Each gdrive tutorial entry carries adocs: { en?, sv? }map of Google Doc IDs — single-language tutorials are allowed.
sources/ is gitignored — upstream content never enters this repo's history.
Swedish is the default language and lives at the site root: /, /app/, /app/installApp/. English is mirrored one level deeper under /en/: /en/, /en/app/, /en/app/installApp/. The language switcher on every page links to the paired URL in the other language, so each tutorial is deep-linkable in either language.
The default language is set by DEFAULT_LANG in tutorials.config.js.
- Create
content/en/<slug>.mdandcontent/sv/<slug>.md. - Reference screens (if any) as
../screens/<name>.png, with the actual file atcontent/screens/<name>.png. - Add an entry to
TUTORIALSintutorials.config.js:{ source: "local", slug: "<slug>", tag: "<tag>" } npm run build.
build.js # build pipeline
template.html # page shell
site.css # styles
tutorials.config.js # SOURCES, TAGS, TUTORIALS, DEFAULT_LANG
scripts/sync-umsme.sh # umsme source loader
content/ # locally-authored tutorials
deploy/ # server-side auto-deploy (systemd timer)
sources/ # gitignored — populated by sync scripts
dist/ # gitignored — build output
The production site at tutorial.uppsalamakerspace.se rebuilds hourly via a server-side systemd timer that runs deploy/deploy.sh. See deploy/README.md for setup and operator commands.