Modify shadow asciidoctor script

This commit is contained in:
Gabriel Arazas 2023-11-03 16:04:27 +08:00
parent e45ab1803c
commit c2bcc60866
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
3 changed files with 32 additions and 2 deletions

View File

@ -10,16 +10,16 @@ let
};
asciidoctorWrappedWithCustomOptions = writeShellScriptBin "asciidoctor" ''
${lib.getBin gems}/bin/asciidoctor -T ./gems/templates $@
${lib.getBin gems}/bin/asciidoctor -T ${./templates} $@
'';
treesitterWithPlugins = (tree-sitter.withPlugins (_: tree-sitter.allGrammars));
in
mkShell {
packages = [
asciidoctorWrappedWithCustomOptions
gems
gems.wrappedRuby
asciidoctorWrappedWithCustomOptions
git
libgit2
@ -48,6 +48,7 @@ mkShell {
shellHook = ''
go version
hugo version
which asciidoctor
asciidoctor --version
chmod u+x --recursive ./bin

View File

@ -0,0 +1,23 @@
<div<%= @id && %( id="#{@id}") %> class="<%= ['admonitionblock',(attr :name),role].compact * ' ' %>">
<table>
<tr>
<td class="icon"><%
if document.attr? :icons, 'font' %>
<i class="icon-<%= attr 'name' %>" title="<%= @caption %>"></i><%
elsif document.attr? :icons %>
<svg class="icon">
<use href="<%= icon_uri(attr :name) %>#<%= attr :name %>" alt="<%= @caption %>"></use>
</svg><%
else %>
<div class="title"><%= @caption %></div><%
end %>
</td>
<td class="content"><%
if title? %>
<div class="title"><%= title %></div><%
end %>
<%= content %>
</td>
</tr>
</table>
</div>

View File

@ -0,0 +1,6 @@
<p<%= @id && %( id="#{@id}") %> <% if role %>class="<%= role %>"<% end %>><%
if title? %>
<div class="title"><%= title %></div><%
end %>
<%= content %>
</p>