Repository navigation
build: install @slide-ng/core 2.0.0 and support its several-deck builds - #2
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).slide-ng build a.md b.md, each deck in<out>/<name>/, served under<base><name>/).build,export,export-notes,serveandwatchnow pass every .md file named after the mode; a flag's .md value (--output talk.md) is not taken for a deck.devstill runs one deck.<base>aredirects to<base>a/, and the base lists the decks.inline-<hash>.jsfiles, so a strict Content-Security-Policy works. serve.mjs now caches them like the other hashed files.skillsis passed to slide-ng likeformat.--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 andskills).bash tests/commit-msg.test.sh: 14 passed.shellcheck -x entrypoint.sh tests/*.sh .githooks/commit-msg(0.11.0) andhadolint Dockerfile(2.15.1): pass.docker compose config: parses.SLIDE_NG_SOURCE=packages/slide-ng-core-2.0.0.tgz;slide-ng --versionprints 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.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,devwith a password,servewith--read-only --tmpfs /tmp --cap-drop ALL, anddocker compose --profile build run --rm build. All worked.watchwith a read-only root.Checklist
bash tests/entrypoint.test.shandbash tests/commit-msg.test.shpass.shellcheck -xandhadolintpass.dev, compose ports on127.0.0.1.