all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-docs 1/2] fix #6656: asciidoc: add anchor links for paragraphs with ids
Date: Wed, 13 Aug 2025 12:06:35 +0200	[thread overview]
Message-ID: <20250813100639.368876-2-c.heiss@proxmox.com> (raw)
In-Reply-To: <20250813100639.368876-1-c.heiss@proxmox.com>

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@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@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



_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel


  reply	other threads:[~2025-08-13 10:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 10:06 [pmg-devel] [PATCH pmg-docs 0/2] " Christoph Heiss
2025-08-13 10:06 ` Christoph Heiss [this message]
2025-08-13 10:06 ` [pmg-devel] [PATCH pmg-docs 2/2] update generated cli synopsis files Christoph Heiss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250813100639.368876-2-c.heiss@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal