squidfunk / mkdocs-material

Documentation that simply works

Home Page:https://squidfunk.github.io/mkdocs-material/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make it possible to link to specific content tabs

abrennan89 opened this issue · comments

Contribution guidelines

I want to suggest an idea and checked that ...

  • ... to my best knowledge, my idea wouldn't break something for other users
  • ... the documentation does not mention anything about my idea
  • ... there are no open or closed issues that are related to my idea

Description

Exactly what it says on the title. I'm not sure what other info I can provide.

Use Cases

Would be useful for cases where a procedure is different for different platforms and someone wants to link to the procedure for a specific platform in another place in the docs.

Screenshots / Mockups

No response

Relevant discussion #3833

My main use case, when I requested this feature was that, I have a directory structure in one tab and there are other tabs in the same tab set, that represent files in the said directory structure. I could just make file names as links and clicking them would focus on the particular tab that represents that file.

Support for content tab anchor links has been added in 8fd7161 and will be included in the next Insiders release!

Features added

  • Create internal links for content tabs
  • Open content tabs in new windows
  • Copy link address from content tab

If JavaScript is disabled, the browser will at least jump to the tab container, but will not switch to the targetted content tab. This does not apply to slow connections – everything works nicely, even on bad 3G.

Demo

Ohne.Titel.mp4

You can try it on the official docs, as they're built with Insiders, e.g.:
https://squidfunk.github.io/mkdocs-material/publishing-your-site/#__tabbed_1_2

Released as part of 8.3.1+insiders-4.17.0.