Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[staging] asciidoctor: add revealjs support #104404

Merged
merged 1 commit into from Dec 5, 2020

Conversation

bjornfor
Copy link
Contributor

This allows creating HTML presentations with
asciidoctor-revealjs presentation.adoc.

NOTE: The generated HTML file implicitly depend on reveal.js (and I see
no good way to bundle it with Nix). Either provide reveal.js in a local
path next to the generated HTML file[1], or override the revealjsdir
attribute, for example by pointing to an URL (can also be a path):

asciidoctor-revealjs -a revealjsdir=https://cdn.jsdelivr.net/npm/reveal.js@3.9.2 [..]

Implementation details:

  1. Added "gem 'asciidoctor-revealjs' to the Gemfile.
  2. Ran "nix-shell -p bundler --run 'bundle lock --update'"
    from pkgs/tools/typesetting/asciidoctor/.
  3. Hand edited Gemfile.lock to remove all but the asciidoctor-revealjs
    changes. (Rationale: allow backporting to release-20.09.)
  4. Finish off with "nix-shell -p bundix --run 'bundix'".

[1] Of course Nix can help with that, but that's external to the
asciidoctor-revealjs program.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after). Result: 323.0M -> 329.6M.
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@jonringer
Copy link
Contributor

since this change causes over 500 rebuilds, do you mind targeting the staging branch

git rebase --onto=staging HEAD~1
git push .. ... --force

then change the base branch in the github PR from master -> staging

See https://nixos.org/nixpkgs/manual/#submitting-changes-staging-branch for more details on staging branch

This allows creating HTML presentations with
`asciidoctor-revealjs presentation.adoc`.

NOTE: The generated HTML file implicitly depend on reveal.js (and I see
no good way to bundle it with Nix). Either provide reveal.js in a local
path next to the generated HTML file[1], or override the revealjsdir
attribute, for example by pointing to an URL (can also be a path):

  asciidoctor-revealjs -a revealjsdir=https://cdn.jsdelivr.net/npm/reveal.js@3.9.2 presentation.adoc

Implementation details:
1. Added "gem 'asciidoctor-revealjs'" to the Gemfile.
2. Ran "nix-shell -p bundler --run 'bundle lock --update'"
   from pkgs/tools/typesetting/asciidoctor/.
3. Hand edited Gemfile.lock to remove all but the asciidoctor-revealjs
   changes. (Rationale: allow backporting to release-20.09.)
4. Finish off with "nix-shell -p bundix --run 'bundix'".

[1] Of course Nix can help with _that_, but that's external to the
asciidoctor-revealjs program.
@bjornfor
Copy link
Contributor Author

since this change causes over 500 rebuilds, do you mind targeting the staging branch

Done. (Wow, I didn't expect this to be a mass-rebuild.)

@jonringer
Copy link
Contributor

it's used to generate docs for a lot of packages

@jonringer jonringer changed the title asciidoctor: add revealjs support [staging] asciidoctor: add revealjs support Nov 20, 2020
@bjornfor bjornfor merged commit 8f13d3c into NixOS:staging Dec 5, 2020
@bjornfor bjornfor deleted the asciidoctor-revealjs branch December 5, 2020 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants