How to anchor-link to a #### Heading inside a Flexdashboard page

rmarkdown
flexdashboard
#1

I would like to ask how to link to a #### Heading inside a Flexdashboard page. Linking to a page proper is easy with (#title), yet I'm having trouble finding out about this more specific kind of anchor link. I've tried creating it as suggested here, but it didn't work.

Thank you very much indeed

0 Likes

#2

For reference, this has been also asked on github

Please in the future, try to follow cross post guideline (FAQ: Is it OK if I cross-post?)

1 Like

#3

Noted - thank you for the tip!

0 Likes

#4

Since the link you posted is not working. I would compile the document and inspect the output created. There should be an id that is generated in the html. This id might be on the div surrounding your h4 tag, but it'll have an id that is very similar to the text value.

While this is manual, it should get the job done.

Example: https://rstudio.github.io/reactlog/articles/reactlog.html#progress-bar
From file: https://github.com/rstudio/reactlog/blob/094f5ca86e22f303c038632b2e2033c5a3603e2b/vignettes/reactlog.Rmd#L240

1 Like

#5

Many thanks. I have inspected my webpage, and found the anchor with its plain name. I appended it to the end of the url after #, but it didn't work.

Due to my limited server time, I've managed to find another Flexdashboard where the same issue is visible.

Whereas the tab link works well

https://matt-dray.github.io/earl18-crosstalk/04_leaflet-flexdash-dt-crosstalk.html#information

the h4 heading link doesn't work

https://matt-dray.github.io/earl18-crosstalk/04_leaflet-flexdash-dt-crosstalk.html#interactive-table

Considering the typical, no-scrolling layout of Flexdashboards, perhaps it makes sense if only columns and rows can be linked to. I'd be glad if there were a solution, although it is really a minor issue.

0 Likes

#6

You're correct. interactive-table is within information which makes it not possible to directly link to. If it was on a single page, it should work as expected.

I do not know of a solution for this.

1 Like

#7

Thank you for confirming!

0 Likes