Skip to content

header_links position and content #831

@veganstraightedge

Description

@veganstraightedge

Hi @gettalong 👋🏻 Long time listener, first time caller. Love the gem.

Exploring header_links today, I have two questions:

  1. Is there a way to specify what the content of the header_link's <a> will be?

    # something like this:
    header_links: { content: '@' }, 
  2. Is there a way to specify putting the header_link's <a> after the heading tag's content?

    # something like this:
    header_links: { position: :end }, 

Currently

header_links: true, 
# Introduction
<h1 id='introduction'>
  <a href='#introduction'>
  Introduction
</h1>

Requested

header_links: { content: '@', position: :end }, 
# Introduction
<h1 id='introduction'>
  Introduction
  <a href='#introduction'>
</h1>

Defaults

  • content — default to '', as it is now
  • position — default to :start, as it is now

Attribute names

I'm indifferent to before/after, start/end, etc. And position, order, etc.

I used position and content just for demonstration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions