Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Tag (keywortd) support #2187

Open
noraj opened this issue Feb 24, 2023 · 6 comments
Open

[Feature request] Tag (keywortd) support #2187

noraj opened this issue Feb 24, 2023 · 6 comments
Labels
a-AuthorUsability a-ReaderUsability c.Feature 🚀 d.moderate p.Medium s.UnderDiscussion The team will evaluate this issue to decide whether it is worth adding

Comments

@noraj
Copy link

noraj commented Feb 24, 2023

Please confirm that you have searched existing issues in the repo

Yes, I have searched the existing issues

Any related issues?

No response

What is the area that this feature belongs to?

Reader Usability

Is your feature request related to a problem? Please describe.

Feature idea

Adding tags (keywords) in frontmatter (meta-data) will generate a page referencing all pages containing this page.

Example:

In frontmatter you add (in YAML for example):

---
tags:
    - dev
    - python
---

So it will create an endpoint http://example.org/tags/dev and http://example.org/tags/python referencing, respectively, all pages containing the dev tag and the python tag.

Then on the page of the documentation where there is such a tags frontmatter, the page will contain some tag link #dev and #python respectively referencing the previously mentioned endpoints.

Example on my blog using Hexo:

image

Why

Imagine I want to build a hacking documentation with a tree like that (for, let's say, my OSCP exam preparation):

- Admin # Machines from the Admin network, containing a write-up for each machine
  - Machine 1 # tags: [eop,windows]
  - Machine 2 # tags: [network,linux]
  - ...
- Cheat sheets # for various topics
  - Elevation of Privilege # tags: [eop]
  - Metasploit # tags: [exploit]
  - MS SQL Server # tags: [mssql,windows]
  - Network # tags: [network]
  - PWK/OSCP Specific
  - Pivoting # tags: [pivoting,network]
  - ...
- Connectivity
  - Machines
  - PWK Lab
  - Remote desktop
  - ssh-hostkey # tags: [ssh]
- Dev # Machines from the Dev network, containing a write-up for each machine
  - Machine 1
  - Machine 2
  - ...
- Exam
  - Exam specific
  - ...
- IT # Machines from the IT network, containing a write-up for each machine
  - Machine 1
  - Machine 2
  - ...
- Public # Machines from the Public network, containing a write-up for each machine
  - Machine 1
  - Machine 2
  - ...
- Tools
  - Nmap # tags: [network,scanner]
  - John the ripper # tags: [cracking,password,hash]
  - gcc # tags: [compilation,exploit]
  - dnsrecon # tags: [osint,dns]
  - dnsenum # tags: [osint,dns]
  - cmsmap # tags: [cms,web]
  - ncat # tags: [backdoor,network,scanner]
  - recon-ng tags: [osint]
  - snmpwalk # tags: [snmp,network]
  - snmpbrute # tags: [snmp,network]
  - onesixtyone # tags: [snmp,network]
  - ...

So I want to be able to search for a keyword (tag) like snmp and see all machines write-up where I attacked snmp, all cheat sheets explaining snmp stuff, all tools I can use to exploit snmp, etc.

Without tag support this is impossible.

One could say: "But there is already the search feature parsing the content of pages" yeah but this is automatic and introduce a lot of false positive (content containing a keywork but not really about it) and false negative (content not containing the keywork but actually talking about it) when the tag feature will be manual so there will be only exact matches.

I could also provide argumentation Why this shouldn't be theme dependent or plugin based. Some big companies like Docker, Joomla, or the Mozilla foundation are using documentation with tags.

image

Describe the solution you'd like

tags in front-matter

Describe alternatives you've considered

No response

Additional context

No response

@damithc
Copy link
Contributor

damithc commented Feb 27, 2023

@noraj Thanks very much for this suggestion and the detailed explanation. We'll certainly consider it in future version of MarkBind.
If you are using MarkBind currently, do let us know more about your use case so that we have a better idea about the context of your feature request.

@noraj
Copy link
Author

noraj commented Feb 27, 2023

I'm currently using Retype especialy because it has tags supports but I'm considering switching to MarkBind because Retype is closed source and has a limited number of page in its free tier.
Use case example https://trove.raw.pm/

@tlylt tlylt added p.Medium a-AuthorUsability a-ReaderUsability s.UnderDiscussion The team will evaluate this issue to decide whether it is worth adding d.moderate labels Mar 6, 2023
@tlylt
Copy link
Contributor

tlylt commented Mar 6, 2023

Thank you @noraj for the feature request, seems reasonable and likely a desirable feature for blogs or educational websites. I have a tag functionality on my personal blog as well :)

This could be related to my previous suggestion (#1753) on making it easy to create some sort of aggregated pages via some exposed variables. At the moment, tag support is not provided by MarkBind, but (NOT IDEAL) I think it could possibly be done with some JavaScript/Nunjucks macros/boilerplate and manually writing out the tags/links. Regardless, we should find a way to provide either a plugin or at least some guidance on how this can be achieved with MarkBind conveniently.

@noraj
Copy link
Author

noraj commented Mar 6, 2023

Tags as well as categories are just a sub-division of the more general term Taxonomies. Tags and categories are just the most common and generic taxonomies. So many SSG implement taxonomies and then add some keywords, methods and frontmatter variable to have default built-in tags and categories support but the user is also able to build sooe custop categories. Some other SSG just implement generic taxonomies and it's up to the user to create tags or categories as a custom taxonomy. And some other SSG add tags and categories supports without giving the possibility to add custom taxonomies.

@noraj
Copy link
Author

noraj commented Mar 6, 2023

What about tags? People will add tags in front matter, those tags will be reflected / displayed on the page so it needs some CSS and template adjustments, and the need to create a tag archive page / endpoint (/tags) as well as a generator for tags page (listings all pages containing a tag, eg. /tag/example). The implementation of categoried is very similar.

@ang-zeyu
Copy link
Contributor

I agree with having tags in frontmatter. UI wise, would having facet search (checkboxes) be another option to dedicated pages? The search could in turn be in a dropdown/modal/dedicated page.

@KevinEyo1 KevinEyo1 self-assigned this Mar 16, 2024
@KevinEyo1 KevinEyo1 removed their assignment Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-AuthorUsability a-ReaderUsability c.Feature 🚀 d.moderate p.Medium s.UnderDiscussion The team will evaluate this issue to decide whether it is worth adding
Projects
None yet
Development

No branches or pull requests

5 participants