[pmg-devel] [PATCH pmg-docs 1/2] fix #6656: asciidoc: add anchor links for paragraphs with ids

Christoph Heiss c.heiss at proxmox.com
Wed Aug 13 12:06:35 CEST 2025


Fixes [0]. 

All paragraphs with have `id` tags will now have an anchor (shown on
hover) besides their title, thus making these sections easily linkable
somewhere else.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=6656
[1] https://lore.proxmox.com/pve-devel/20250812095637.444463-1-c.heiss@proxmox.com/T/#u

Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
 asciidoc/pmg-docs.css  | 3 ++-
 asciidoc/pmg-html.conf | 7 +++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/asciidoc/pmg-docs.css b/asciidoc/pmg-docs.css
index 756b10d..92f4ef8 100644
--- a/asciidoc/pmg-docs.css
+++ b/asciidoc/pmg-docs.css
@@ -58,7 +58,8 @@ h2:hover > a.headerlink,
 h3:hover > a.headerlink,
 h4:hover > a.headerlink,
 h5:hover > a.headerlink,
-h6:hover > a.headerlink {
+h6:hover > a.headerlink,
+div[class="paragraph"][id]:hover a.headerlink {
   visibility: visible;
 }
 
diff --git a/asciidoc/pmg-html.conf b/asciidoc/pmg-html.conf
index 40dae57..6bb5671 100644
--- a/asciidoc/pmg-html.conf
+++ b/asciidoc/pmg-html.conf
@@ -311,9 +311,12 @@ endif::deprecated-quotes[]
 {thumbnail#}{float at right: style="padding\: 0 0 0 10px;float\:right;"}
 {thumbnail#}{big%}{float%} style="padding: 0 0 0 10px;float:right;"
 {thumbnail#}></a>
-{title?<div class="title">{title}</div>}<p>
+{title? <div class="title">{title}</div>}
+<p>
 |
-</p></div>
+{id? <a class="headerlink" href="#{id}" title="Permalink to this heading"></a>}
+</p>
+</div>
 
 [admonitionparagraph]
 template::[admonitionblock]
-- 
2.50.1





More information about the pmg-devel mailing list