diff --git a/gems/templates/admonition.html.erb b/gems/templates/admonition.html.erb new file mode 100644 index 0000000..4788308 --- /dev/null +++ b/gems/templates/admonition.html.erb @@ -0,0 +1,23 @@ + class="<%= ['admonitionblock',(attr :name),role].compact * ' ' %>"> + + + + + +
<% + if document.attr? :icons, 'font' %> + <% + elsif document.attr? :icons %> + + + <% + else %> +
<%= @caption %>
<% + end %> +
<% + if title? %> +
<%= title %>
<% + end %> + <%= content %> +
+ diff --git a/gems/templates/paragraph.html.erb b/gems/templates/paragraph.html.erb new file mode 100644 index 0000000..e548e55 --- /dev/null +++ b/gems/templates/paragraph.html.erb @@ -0,0 +1,6 @@ + <% if role %>class="<%= role %>"<% end %>><% +if title? %> +
<%= title %>
<% +end %> +<%= content %> +

diff --git a/shell.nix b/shell.nix index 0ed3d97..ed9571f 100644 --- a/shell.nix +++ b/shell.nix @@ -8,6 +8,10 @@ let ruby = ruby_3_1; gemset = ./gemset.nix; }; + + asciidoctorWrappedWithCustomOptions = writeShellScriptBin "asciidoctor" '' + ${lib.getBin localGem.env}/bin/asciidoctor -T ./gems/templates $@ + ''; in mkShell { buildInputs = [ @@ -16,6 +20,8 @@ mkShell { ]; packages = [ + asciidoctorWrappedWithCustomOptions + git go hugo