Stream: IG creation
Topic: Link to here
Grahame Grieve (Feb 10 2021 at 02:30):
@Lloyd McKenzie the IG template is bringing up a 'link to here' link that's some hack of the heading text.
here's an example, courtesy of @John Moehrke : http://build.fhir.org/ig/IHE/ITI.MHD/branches/master/StructureDefinition-IHE.MHD.Minimal.DocumentReference-mappings.html#mappings-for-xds-and-mhd-mapping-xds
This is a reference to the section by the text of the header. the IG publisher doesn't know anything about this, and so if an editor right clicks on the link, and pastes that into their markdown somewhere, the IG publisher will complain, because there's no matching anchor.
The 'link to here' links used to use the anchors, not some made up text. So this is new so far as I know. Is the algorithm documented anywhere?
Lloyd McKenzie (Feb 10 2021 at 02:53):
The "hack of the heading text" sounds like what markdown creates as ids for headings (which is one of the many things I hate about markdown). Is this a markdown-authored IG? Are the ids no longer being assigned to markdown generated text? Is the same problem manifesting in other markdown-authored IGs? I haven't touched the templates in over half a year, though there have been a few pull requests from others. None that jump out as likely culprits though...
Grahame Grieve (Feb 10 2021 at 02:55):
something is generating the id on the fly, because the id is not in the html source. So it's not from markdown
Lloyd McKenzie (Feb 10 2021 at 02:59):
The process the template uses for HTML pages that don't have preceding <name/> elements is to embed a name that is the hierarchical section number. It definitely isn't driven by the section heading. @Jose Costa Teixeira, does the IHE template override this or do something different?
Jose Costa Teixeira (Feb 10 2021 at 07:27):
IHE template does not do anything on the pages
Jose Costa Teixeira (Feb 10 2021 at 07:37):
where is the "link to here"?
Jose Costa Teixeira (Feb 10 2021 at 08:02):
@Grahame Grieve image.png
if you mean this link, it is created in the java renderer
Jose Costa Teixeira (Feb 10 2021 at 08:12):
Grahame Grieve (Feb 10 2021 at 20:31):
no, it's this link I'm talking about:
Grahame Grieve (Feb 10 2021 at 20:35):
Grahame Grieve (Feb 10 2021 at 20:35):
I can't get it to actually display, courtesy of using an apple keyboard without a print screen key.
Jose Costa Teixeira (Feb 10 2021 at 20:50):
this?
Jose Costa Teixeira (Feb 10 2021 at 20:50):
John Moehrke (Feb 10 2021 at 20:57):
yes, I found that in my structure definition mapping page, and pasted (without the root) into my markdown.
John Moehrke (Feb 10 2021 at 20:58):
see the top of this thread
Jose Costa Teixeira (Feb 10 2021 at 21:01):
so the issue is not the link appearing, but the fact that this url will cause an issue in the publisher?
http://build.fhir.org/ig/IHE/ITI.MHD/branches/master/index.html#organization-of-this-guide
John Moehrke (Feb 10 2021 at 21:02):
in my view, that is the problem. everything is functioning properly, but the IG build flags this as an error.
Grahame Grieve (Feb 10 2021 at 21:02):
how does it appear? It's not in the generated html
John Moehrke (Feb 10 2021 at 21:03):
magic?
Jose Costa Teixeira (Feb 10 2021 at 21:03):
it's here:
Jose Costa Teixeira (Feb 10 2021 at 21:04):
https://github.com/HL7/ig-template-base/blob/master/includes/fragment-pageend.html#L32:L38
Jose Costa Teixeira (Feb 10 2021 at 21:05):
(If I remember correctly.)
This is a function that generates anchors for every header
Jose Costa Teixeira (Feb 10 2021 at 21:06):
I'm trying to confirm by checking the library behind the links
Jose Costa Teixeira (Feb 10 2021 at 21:07):
this is the library
https://github.com/HL7/ig-template-base/blob/8747a729c635bb7ca8f3940a4a9902ffe9fe2acb/includes/fragment-pageend.html#L64-L66
Jose Costa Teixeira (Feb 10 2021 at 21:10):
( please someone confirm, I'm not friends with javascript)
Eric Haas (Feb 11 2021 at 00:38):
that kebab case id ( e.g. 'organization-of-this-guide') is a feature of Jekyll out of the box. among other things is allows for the page TOC generation. Docs here: https://jekyllrb.com/docs/configuration/markdown/
Eric Haas (Feb 11 2021 at 00:39):
and yes it fine works within a page but sadly across pages there is an issue with the ig-publisher validator.
Lloyd McKenzie (Feb 11 2021 at 01:12):
Fixed ids that don't change when you alter the phrasing of the title are better...
John Moehrke (Feb 11 2021 at 01:14):
I don't disagree @Lloyd McKenzie , but I am using what I got. it works, it is easy. Tell how to do it differently. I want to be able to point the narrative at the specific mapping.
John Moehrke (Feb 11 2021 at 01:14):
especially useful because my IG mapping is listed last on the page, not first.
Grahame Grieve (Feb 11 2021 at 01:31):
ok. sorted next release
Lloyd McKenzie (Feb 11 2021 at 01:40):
@John Moehrke It's not terribly easy to do in markdown.
Eric Haas (Feb 11 2021 at 20:09):
Grahame Grieve said:
ok. sorted next release
what exactly is sorted, can we use jekyll generated ids now as anchors without getting dinged by the validator?
Grahame Grieve (Feb 11 2021 at 20:18):
they're not jekyll generated. They are generated in the browser. But yes, you can use them
Last updated: Apr 12 2022 at 19:14 UTC