Docusaurus: [v2] tags to doc same as tags to blog

Created on 11 Sep 2020  Â·  19Comments  Â·  Source: facebook/docusaurus

🚀 Feature

Request for copying feature of /tags from /blog/tags towards /doc/tags


Basically require a way to categorize the docs in groups and refer them in sidebar and also on the uri path of /doc/tags similar as how we have for /blog/tags


thanks to @slorber for guidance to create this request

starter feature good first issue hacktoberfest help wanted

All 19 comments

I can volunteer but new to the project code.

can @slorber or anyone give this issue a starting point where I need to look to understand existing tags functionality.

it can help anyone willing to contribute to this issue.

thanks!

I would really love to see tagging capability in the docs. This has been one of the top requested feature from my docs site's tech writers and ux team.

I imagine we could use the front-matter data at the top to contain an array of values that will be considered as "tags" for the corresponding page.

Having the this tagging feature will open other opportunities in addition to what is mentioned above. For example: allow us to be able to filter search results based on tags. Algolia search has the capability to do that. What's missing in Docusaurus currently is a way to be able to tag individual pages.

I want to volunteer if you do this

If anyone have interest in contribute, I can help.

You'll need to create a new component in the theme for docs tags: https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx

The logic of the route tags is here. You'll probably need an equivalent in docusaurus-content-docs

Hi

Will be back from holidays on Monday 28.

We have 2 volunteers so I suggest the first one work on it 😉 I guess the
idea is to make it consistent with the blog comp and try to share some
theme code.

Le mar. 22 sept. 2020 à 20:00, Fanny notifications@github.com a écrit :

If anyone have interest in contribute I can help.

You'll need to create a new component in the theme for docs tags:
https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx

The logic of the route tags here
https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-plugin-content-blog/src/index.ts#L151.
You'll probably need an equivalent in docusaurus-content-docs

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/docusaurus/issues/3434#issuecomment-696915466,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFW6PSZHDDMJYTKJHRQWQLSHDXMVANCNFSM4RGP2K7Q
.

Hi,

@isaac-philip are you working on the tags feature? If not @Mac-Kett seems interested to work on it.

sorry didn't see the latest messages till being mentioned now.

please proceed as I see people have messaged to guide and take up 😊

sounds great, thanks!

Thanks,

@Mac-Kett still interested to work on this?

It seems like both volunteers won’t answer, can i take this one? It looks so challenging for me but I think I’ll do it with your help.

Yes @JuanVqz thanks ;)

does anyone can help me guide me on how to create the route I saw how the blog tags create the route as @fanny pointed up but the doc file it's kind of different. (I'm assuming this is the correct file)

@JuanVqz this is how the plugin creates the tags page: https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-plugin-content-blog/src/index.ts#L324

As the feature is shared between docs and blog, try to factorize a bit the UI code (as long as it's possible)

maybe I need more experience to do this, I'll let another person do this task

Thanks for trying @JuanVqz :)

Do we have another candidate?

I will take a try on this today.

@isaac-philip are you still interested to work on this? because we might want to implement this soon and can assign this to someone else otherwise

lerna ERR! yarn run build exited 1 in '@docusaurus/theme-classic'
lerna ERR! yarn run build stdout:
$ tsc --noEmit && yarn babel && yarn prettier
src/theme/DocTagsListPage/index.tsx(12,1): error TS6133: 'Props' is declared but its value is never read.
src/theme/DocTagsListPage/index.tsx(20,33): error TS2709: Cannot use namespace 'Props' as a type.
info Visit https://yarnpkg.com/en/docs/cli/

As per the commit I have added the code to plugin and theme,
errors mean can't go forward to run and verify.

the plugin-content of the docs I copied similar from the one for the blog and would need some refactor too,
specifically what is the alternative to blogPost as I have kept docTag

@isaac-philip I can't help much if there is no PR.

If you open a PR (even draft), I can see the real code, the actual netlify error, I can comment on the PR, and might as well commit to your branch to fix issues (if you grant me permission, which is the case by default)

@slorber done the needful.
Thanks for the help again!

Please guide for what is needed to be amended, plz commit too as required, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MoogyG picture MoogyG  Â·  3Comments

ericnakagawa picture ericnakagawa  Â·  3Comments

azu picture azu  Â·  3Comments

lex111 picture lex111  Â·  3Comments

ericnakagawa picture ericnakagawa  Â·  3Comments