Skip to content

Add tags anywhere? #7393

@yves-chevallier

Description

@yves-chevallier

Context

I am struggling to understand how tags work. I eventually noticed that:

  • Tags will always be displayed at the top of the page.
  • The displayed tags will reflect those listed in the meta data.
  • An hashtag symbol is automatically prepend to the tag name if defined in extra/tags/key:value
  • It is not possible do declare tags anywhere on a page.
  • It is not possible to show tags labels for the current section (heading)

Description

Allows for displaying hashtags bubbles anywhere on the page

Currently tags only displays at the top of a page. When a page has plenty of tags associated, I could be preferable to display them at the end of the page, for for say anywhere the user wants.

We could add a config that can be put either in the meta-data or in the config file:

tags:
  labels: top|bottom

To put them anywhere, why not using

<!-- material/hashtags -->

Allows for declaring inline tags anywhere in a document

My use-case was to use tags to enhance key concepts explained in each individual sections of my documentation. Therefore, tags should be declared at the top of a section, or anywhere in a section.

## H2G2

The book "The Hitchhiker's Guide to the Galaxy" by Douglas Adams is a science fiction comedy series that has been adapted into various formats, including a radio series, a TV series, a movie, and a video game. The story follows the adventures of Arthur Dent, an ordinary human who is rescued from Earth just before it is destroyed to make way for a hyperspace bypass. 

<!-- tag:mouse -->
<!-- tag:42 -->
<!-- tag:sf -->

Then it would be nice to also show hashtags labels at the top or at the end of sections where they are declared:

tags: 
  hashtags:
    scope-level: 1  # Put hashtags labels per heading h1

Related links

Use Cases

My documentation is a programming course. It has a lot of pages and programming concepts such as pointers, oop, graph, algorithm... can be used to quickly search relevant part in the documentation that treat these concepts.

Having tags only declared for a whole .md file isn't narrow enough.

Visuals

No response

Before submitting

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