Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Make it possible to link directly to headers #995

Open

Description

@casey

I prepare the reading list for SF Bitcoin Devs, and use Bitcoin Optech newsletters heavily. (Thank you!) I'll often include a link to an item, as well as a link to the Optech summary. For individual items, this works, as the HTML includes anchor tags. (for example this one).

But there isn't an easy way to get links to whole sections. For example, I'd like to include a link to this PR review club PR, but there isn't easy way to get an anchor tag from the newsletter that includes it.

It's actually possible to construct one manually, using the text of the tag, link, but it would be nice if there was a link that could be copied directly from the newsletter.

This is an incredibly minor QoL issue, so no worries if it's annoying to implement.

Activity

  1. bitschmidty commented on Jan 29, 2023

    @bitschmidty
    Contributor

    @casey thanks for hosting bitdevs and for highlighting Optech there!

    There are anchor links for the the section headers as youve also discovered. I just inspect element to get the ID when I link to those sections myself (for the Optech twitter thread newsletter summaries). Those IDs/anchor links should be static for each newsletter. I defer to others on if we want a UX element surfacing that anchor link, perhaps appending a 🔗 icon after the headers, or if we leave this as is.

    Note: For the PR Review section, you can also link to individual items in a similar way. Example: https://bitcoinops.org/en/newsletters/2022/12/07/#what-problem-does-this-pr-address

  2. harding commented on Feb 5, 2023

    @harding
    Collaborator

    If there's a not-too-ugly way to add anchor links, I'm all for it.

    An alternative is that we could make the intro paragraph link to each section. E.g., here's our intro from last week with links added:

    This week’s newsletter summarizes a proposal for serverless payjoin and describes an idea for allowing proof of payment for LN async payments. Also included is our regular section with descriptions of notable changes to popular Bitcoin infrastructure software.

  3. bittomhan commented on Oct 26, 2026

    @bittomhan
    Contributor

    Taking another look at this: the anchors themselves already work. Kramdown's auto_ids is enabled, so every section heading already carries an id:

    <h2 id="bitcoin-core-pr-review-club">
    <h2 id="notable-code-and-documentation-changes">
    

    so https://bitcoinops.org/en/newsletters/2022/12/07/#bitcoin-core-pr-review-club resolves today. What is missing is only a way for a reader to discover and copy that link.

    @harding said "if there's a not-too-ugly way to add anchor links, I'm all for it", and @bitschmidty suggested appending a 🔗 icon after the headers while deferring to others. Three options, roughly in order of invasiveness:

    1. Hover-only icon on section headings. About 20 lines of JavaScript plus a few CSS rules. No Markdown changes, nothing added to the feed, and it can be removed by deleting one file. Newsletter and topic pages currently carry no executable JavaScript at all — the only <script> in them is the JSON-LD block emitted for SEO — so this would be the first general-purpose script on content pages. That is the main argument against it.

    2. Render the icon at build time, the way auto-anchor.rb already does for list items. Consistent with the existing ● marker, but the icon would also appear inside feed.xml, which is the class of problem discussed in Fix self-linking bullets in RSS feed #399.

    3. Link the section names in the intro paragraph, as @harding suggested. Helps readers click through, but does not give them a URL to copy, and copying the link is what the original request was about.

    I am happy to put up a branch for option 1 so it can be judged visually before anything is committed. Which of these is worth pursuing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions