Skip to content

build: install @slide-ng/core 2.0.0 and support its several-deck builds - #2

Merged
erkamyaman merged 4 commits into
mainfrom
release/2.0.0-support
Oct 23, 2026
Merged

erkamyaman merged 4 commits into
mainfrom
release/2.0.0-support

Conversation

@erkamyaman

@erkamyaman erkamyaman commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

What and why

Moves the image to slide.ng 2.0.0 and follows its command line. Merge after @slide-ng/core 2.0.0 is on npm (the default build installs it from npm; a tarball in packages/ works today).

  • The Dockerfile, docker-compose.yml and .env.example install @slide-ng/core@2.0.0 by default (was 0.1.0).
  • 2.0 builds and exports several decks at once (slide-ng build a.md b.md, each deck in <out>/<name>/, served under <base><name>/). build, export, export-notes, serve and watch now pass every .md file named after the mode; a flag's .md value (--output talk.md) is not taken for a deck. dev still runs one deck.
  • serve.mjs serves such a build: an address gets the index.html of its deck's folder, <base>a redirects to <base>a/, and the base lists the decks.
  • 2.0 moves the inline scripts of index.html into inline-<hash>.js files, so a strict Content-Security-Policy works. serve.mjs now caches them like the other hashed files.
  • skills is passed to slide-ng like format.
  • README: several decks, --router-mode (passed through; hash and memory builds need nothing from the server) and CSP (serve.mjs sends none; put a real web server in front, see slide.ng's HOSTING.md). CHANGELOG updated.

How I checked it

  • bash tests/entrypoint.test.sh: 75 passed (new cases for several decks, the .md flag value, the deck list, the redirect, the inline-*.js caching and skills). bash tests/commit-msg.test.sh: 14 passed.
  • shellcheck -x entrypoint.sh tests/*.sh .githooks/commit-msg (0.11.0) and hadolint Dockerfile (2.15.1): pass.
  • docker compose config: parses.
  • Built the image on Docker 29.8.2 (Linux) with SLIDE_NG_SOURCE=packages/slide-ng-core-2.0.0.tgz; slide-ng --version prints 2.0.0. The build machine reaches Debian and npm only through an HTTPS proxy, so the test copy of the Dockerfile sent apt and npm through it; nothing else differed.
  • In the container: build --base /talk/, build --router-mode hash, export --format pdf (deck mounted :ro, --shm-size=1g), export a.md b.md, serve a.md b.md --base /x/ (both decks and the presenter opened in Chromium without errors), watch, dev with a password, serve with --read-only --tmpfs /tmp --cap-drop ALL, and docker compose --profile build run --rm build. All worked.
  • Not run: the GitHub Actions workflow, and watch with a read-only root.

Checklist

  • bash tests/entrypoint.test.sh and bash tests/commit-msg.test.sh pass.
  • shellcheck -x and hadolint pass.
  • I built and ran the image (with the 2.0.0 tarball; see above for the proxy note).
  • I updated the README for a changed variable, port or mode.
  • I kept the security defaults: non-root user, a password for dev, compose ports on 127.0.0.1.
  • I agree that my contribution is under the MIT license.

0.1.0 was an early release. The Dockerfile, the compose file and .env.example now name 2.0.0, as do the examples in the issue template and the workflow. 2.0.0 must be on npm before the default build works; a tarball in packages/ works now.
slide.ng 2.0 builds and exports several decks at once (slide-ng build a.md b.md, each into its own folder under <base><name>/). build, export, export-notes, serve and watch now pass every .md file named after the mode; a .md value of a flag (--output talk.md) is not a deck. serve.mjs gives each address the index.html of the deck folder it is in, sends <base>a to <base>a/ and lists the decks at the base. skills is passed to slide-ng like format.
slide.ng 2.0 moves the inline scripts of index.html into inline-<12 hex>.js files, so a strict Content-Security-Policy works. Their names carry a hash of their content, like main-*.js, but the old pattern only knew 8-character hashes, so they were sent with no-cache.
Say how several decks, --router-mode and a Content-Security-Policy work with the image, add a several-deck example to the compose file, and record what was checked with 2.0.0.
@erkamyaman
erkamyaman merged commit b0bcb7a into main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant