The Wayback Machine - https://web.archive.org/web/20210626171925/https://github.com/facebook/docusaurus/issues/3434
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

[v2] tags to doc same as tags to blog #3434

Open
isaac-philip opened this issue Sep 11, 2020 · 23 comments
Open

[v2] tags to doc same as tags to blog #3434

isaac-philip opened this issue Sep 11, 2020 · 23 comments

Comments

@isaac-philip
Copy link

@isaac-philip isaac-philip commented Sep 11, 2020

🚀 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

@isaac-philip
Copy link
Author

@isaac-philip isaac-philip commented Sep 12, 2020

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!

@amimas
Copy link

@amimas amimas commented Sep 17, 2020

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.

@Mac-Kett
Copy link

@Mac-Kett Mac-Kett commented Sep 19, 2020

I want to volunteer if you do this

@fanny
Copy link
Contributor

@fanny fanny commented Sep 22, 2020

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

@slorber
Copy link
Collaborator

@slorber slorber commented Sep 23, 2020

@slorber
Copy link
Collaborator

@slorber slorber commented Sep 29, 2020

Hi,

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

@isaac-philip
Copy link
Author

@isaac-philip isaac-philip commented Sep 29, 2020

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!

@slorber
Copy link
Collaborator

@slorber slorber commented Sep 29, 2020

Thanks,

@Mac-Kett still interested to work on this?

@JuanVqz
Copy link

@JuanVqz JuanVqz commented Oct 6, 2020

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.

@slorber
Copy link
Collaborator

@slorber slorber commented Oct 6, 2020

Yes @JuanVqz thanks ;)

@JuanVqz JuanVqz mentioned this issue Oct 7, 2020
1 of 2 tasks
@JuanVqz
Copy link

@JuanVqz JuanVqz commented Oct 7, 2020

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)

@slorber
Copy link
Collaborator

@slorber slorber commented Oct 8, 2020

@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)

@JuanVqz
Copy link

@JuanVqz JuanVqz commented Oct 8, 2020

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

@slorber
Copy link
Collaborator

@slorber slorber commented Oct 9, 2020

Thanks for trying @JuanVqz :)

Do we have another candidate?

@isaac-philip
Copy link
Author

@isaac-philip isaac-philip commented Oct 11, 2020

I will take a try on this today.

@slorber
Copy link
Collaborator

@slorber slorber commented Oct 22, 2020

@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

isaac-philip added a commit to isaac-philip/docusaurus that referenced this issue Oct 24, 2020
- Addition of plugin-content-docs

- Addition of DocTagsListPage in `docusaurus-theme-classic`

! Error exists for this commit towards the theme aspect and help required.

Commit towards facebook#3434
@isaac-philip
Copy link
Author

@isaac-philip isaac-philip commented Oct 24, 2020

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 added a commit to isaac-philip/docusaurus that referenced this issue Oct 24, 2020
- Addition of plugin-content-docs

- Addition of DocTagsListPage in `docusaurus-theme-classic`

! Error exists for this commit towards the theme aspect and help required.

Commit towards facebook#3434
@slorber
Copy link
Collaborator

@slorber slorber commented Oct 26, 2020

@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)

@isaac-philip
Copy link
Author

@isaac-philip isaac-philip commented Oct 27, 2020

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

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

@sacha-l
Copy link

@sacha-l sacha-l commented May 17, 2021

Hi @isaac-philip - any updates on this feature? :)

@isaac-philip
Copy link
Author

@isaac-philip isaac-philip commented May 18, 2021

Hello @sacha-l , apologies have been away for quite sometime.

Give me till tomorrow to get back to this with some commits else we can pass it to anyone interested.

@slorber
Copy link
Collaborator

@slorber slorber commented May 19, 2021

@isaac-philip do you mind if I assign this to @nam-hle ?

Edit: let's keep it assigned to @isaac-philip for now

@isaac-philip
Copy link
Author

@isaac-philip isaac-philip commented May 27, 2021

just updating that have pushed a commit, still WIP but should be ready for a review soon!

took some time to get my head around the architecture of docusaurus & functionality, so thanks for the patience!

couldn't do without the earlier commits of slorber!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment