Skip to content

[INFRA] Enable permalink urls to appear at (sub)section headings#214

Merged
yarikoptic merged 2 commits intobids-standard:masterfrom
yarikoptic:enh-permalink
Apr 29, 2019
Merged

[INFRA] Enable permalink urls to appear at (sub)section headings#214
yarikoptic merged 2 commits intobids-standard:masterfrom
yarikoptic:enh-permalink

Conversation

@yarikoptic
Copy link
Copy Markdown
Collaborator

There is no convenient way to obtain a permalink to reference a specific (sub)section
in the page ATM. Only top level section urls available in the TOC. With this permalink
those IDs, which are already in HTML anyways, become exposed so it is easy to get
permalink for any section. I chose # symbol since that is what is used in the URL to
separate out the fragment to point to that ID in the page, e.g.
image

There is no convenient way to obtain a permalink to reference a specific (sub)section
in the page ATM.  Only top level section urls available in the TOC. With this permalink
those IDs, which are already in HTML anyways, become exposed so it is easy to get
permalink for any section.  I chose # symbol since that is what is used in the URL to
separate out the fragment to point to that ID in the page
@effigies
Copy link
Copy Markdown
Collaborator

I've often seen the paragraph symbol (¶) for this purpose, but I don't know that it's any more meaningful.

Is there any way to just make the header text itself the link? That would be most intuitive to me.

@effigies
Copy link
Copy Markdown
Collaborator

But to be clear, I am very supportive of this move and have felt the lack of these links in any text.

@sappelhoff
Copy link
Copy Markdown
Member

Thanks @yarikoptic +1 for this PR. Like @effigies I would prefer if the header text could be the link.

Copy link
Copy Markdown
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at TOC Usage, it looks like you can do this with:

  • anchorlink: Set to True to cause all headers to link to themselves. Default is False.

Co-Authored-By: yarikoptic <debian@onerussian.com>
Copy link
Copy Markdown
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the build. LGTM.

@yarikoptic
Copy link
Copy Markdown
Collaborator Author

Looks great! Thanks!

@yarikoptic yarikoptic merged commit e21e619 into bids-standard:master Apr 29, 2019
@yarikoptic
Copy link
Copy Markdown
Collaborator Author

where could I find the current master build of the spec? I guess the one on https://bids-specification.readthedocs.io is the released one so doesn't have anchors yet

@effigies
Copy link
Copy Markdown
Collaborator

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants