Skip to content
Closed

test #3194

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resources/asciidoctor/lib/chunker/extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def subdoc_attrs(doc, section)
attrs['subdoc'] = true # Mark the subdoc so we don't try and chunk it
attrs['title-separator'] = ''
attrs['canonical-url'] = section.attributes['canonical-url']
attrs['current-url'] = "#{section.id}.html"
attrs.merge! find_related(section)
attrs
end
Expand Down
5 changes: 4 additions & 1 deletion resources/asciidoctor/lib/chunker/nav.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ class Nav

def initialize(doc)
body = nav_body doc

puts "current-url: #{doc.attr('current-url')}"

@header = Asciidoctor::Block.new(doc, :pass, source: <<~HTML)
<div class="navheader">
<div class="navheader" data-current-url="#{doc.attr('current-url')}">
#{body}
</div>
HTML
Expand Down