Skip to content

Commit

Permalink
examples: antora-simple: init
Browse files Browse the repository at this point in the history
  • Loading branch information
trueNAHO committed Oct 2, 2024
1 parent 55010f8 commit 45e924f
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 0 deletions.
146 changes: 146 additions & 0 deletions examples/antora-simple/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions examples/antora-simple/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
description = "Simple example based on Antora's structure";
inputs.asciidoctor-nix.url = "path:../..";

outputs = inputs:
builtins.removeAttrs inputs.asciidoctor-nix [
"_type"
"inputs"
"lastModified"
"lastModifiedDate"
"lib"
"narHash"
"outPath"
"outputs"
"packages"
"sourceInfo"
]
// inputs.asciidoctor-nix.inputs.flake-utils.lib.eachDefaultSystem (
system: {
packages =
inputs.asciidoctor-nix.inputs.nixpkgs.legacyPackages.${system}.lib.attrsets.unionOfDisjoint
(
inputs.asciidoctor-nix.lib.${system}.packages {
inputFile = "pages/index.adoc";
src = ./src;
}
)
(inputs.asciidoctor-nix.packages.${system} or {});
}
);
}
22 changes: 22 additions & 0 deletions examples/antora-simple/src/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
= asciidoctor.nix
:sectnums:

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+1]

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+2]

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+1]

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+2]

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+1]

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+2]

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+1]

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+2]

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+1]

include::{root}/partials/lorem_ipsum.adoc[leveloffset=+2]
8 changes: 8 additions & 0 deletions examples/antora-simple/src/partials/lorem_ipsum.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
= Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"mathematical-format=svg"
"plantuml-format=svg"
"reproducible"
"root=${src}"
]
++ (
lib.optional
Expand Down

0 comments on commit 45e924f

Please sign in to comment.