mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
docs/site: add Asciidoctor templates for custom wrapper
This commit is contained in:
parent
8f3709b335
commit
fc9b172c7d
23
docs/assets/templates/asciidoctor/admonition.html.erb
Normal file
23
docs/assets/templates/asciidoctor/admonition.html.erb
Normal 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>
|
6
docs/assets/templates/asciidoctor/paragraph.html.erb
Normal file
6
docs/assets/templates/asciidoctor/paragraph.html.erb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<p<%= @id && %( id="#{@id}") %> <% if role %>class="<%= role %>"<% end %>><%
|
||||||
|
if title? %>
|
||||||
|
<div class="title"><%= title %></div><%
|
||||||
|
end %>
|
||||||
|
<%= content %>
|
||||||
|
</p>
|
@ -3,6 +3,10 @@
|
|||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
asciidoctorWrapper = writeShellScriptBin "asciidoctor" ''
|
||||||
|
${lib.getBin gems}/bin/asciidoctor -T ${./assets/templates/asciidoctor}
|
||||||
|
'';
|
||||||
|
|
||||||
gems = bundlerEnv {
|
gems = bundlerEnv {
|
||||||
name = "nixos-config-project-docs";
|
name = "nixos-config-project-docs";
|
||||||
ruby = ruby_3_1;
|
ruby = ruby_3_1;
|
||||||
@ -15,6 +19,7 @@ mkShell {
|
|||||||
gems.wrappedRuby
|
gems.wrappedRuby
|
||||||
bundix
|
bundix
|
||||||
|
|
||||||
|
asciidoctorWrapper
|
||||||
hugo
|
hugo
|
||||||
go
|
go
|
||||||
nodePackages.prettier
|
nodePackages.prettier
|
||||||
|
Loading…
Reference in New Issue
Block a user