[pve-devel] [PATCH docs 4/5] fix #6656: asciidoc: add anchor links for paragraphs with ids

Christoph Heiss c.heiss at proxmox.com
Tue Aug 12 11:56:28 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

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

diff --git a/asciidoc/pve-docs.css b/asciidoc/pve-docs.css
index a35f762..f584b16 100644
--- a/asciidoc/pve-docs.css
+++ b/asciidoc/pve-docs.css
@@ -89,7 +89,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/pve-html.conf b/asciidoc/pve-html.conf
index f42accd..8c28c01 100644
--- a/asciidoc/pve-html.conf
+++ b/asciidoc/pve-html.conf
@@ -308,9 +308,12 @@ endif::deprecated-quotes[]
 {thumbnail#}{float at right: style="padding\: 0 0 0 10px;float\:right;"}
 {thumbnail#}{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 pve-devel mailing list