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

Docusaurs: Add index page to sample-scripts #4640

Closed
Tracked by #4396
Jwaegebaert opened this issue Mar 12, 2023 · 5 comments · Fixed by #4815
Closed
Tracked by #4396

Docusaurs: Add index page to sample-scripts #4640

Jwaegebaert opened this issue Mar 12, 2023 · 5 comments · Fixed by #4815
Assignees

Comments

@Jwaegebaert
Copy link
Contributor

Our current docs have a useful feature on the index page for script samples where all available tags are displayed for easy searching. We should include this feature in the Docusaurus version as well.

afbeelding

On Docusaurus, there is a separate page that leads to all available tags on the site. It would be great if we could show these on the index page for easy reference. The link to the separate tags page is: https://jwaegebaert.github.io/cli-microsoft365-docusaurus/tags/

Let's work on adding this feature to improve user experience and make it easier to find relevant script samples.

Note!

When making a PR for this issue, make sure you target the branch docs-migration.


Related to #4396

@Jwaegebaert
Copy link
Contributor Author

I did some research and it's not currently easy to implement.

There's no API available that we can use to retrieve all the tag data for our documents. However, there is a page called /tags that lists all the tags, and we can extract it using swizzle to get the DocTagsListPage component. We can customize it to make it look like our sample landing page, but in my opinion, this isn't a clean approach and may break when Docusaurus updates. Plus, we won't be able to add that page to the sidebar menu.

Therefore, I suggest we keep this issue open as it would be a nice feature to implement in the future, but it's not currently possible with Docusaurus.

@Jwaegebaert Jwaegebaert added not supported Not supported by the API and removed help wanted labels Apr 23, 2023
@milanholemans
Copy link
Contributor

Is it possible that we create our own react component that reads out all sample files? Then we could read the front matter tags and render our own overview. Not sure if this is possible.

Or we could do a quick fix and add an URL to the tags page instead of the overview.

@Jwaegebaert
Copy link
Contributor Author

As mentioned, I couldn't find an API that allows me to read all the front matter tags. If that was possible then we could build the tags list from scratch 😄

Or we could do a quick fix and add an URL to the tags page instead of the overview.

Not quite sure how you would do this

@milanholemans
Copy link
Contributor

milanholemans commented Apr 23, 2023

Not quite sure how you would do this

# Script samples

Be sure to check our [script samples overview](https://pnpgithuburl.com/cli-microsoft365/tags)

Easy fix 😄

@Jwaegebaert
Copy link
Contributor Author

Ow, like that. That's perfectly fine for me 😄

@Jwaegebaert Jwaegebaert added work in progress and removed not supported Not supported by the API labels Apr 24, 2023
@Jwaegebaert Jwaegebaert self-assigned this Apr 24, 2023
Jwaegebaert added a commit to Jwaegebaert/cli-microsoft365 that referenced this issue Apr 28, 2023
@milanholemans milanholemans linked a pull request Apr 28, 2023 that will close this issue
Jwaegebaert added a commit to Jwaegebaert/cli-microsoft365 that referenced this issue May 3, 2023
milanholemans pushed a commit to milanholemans/cli-microsoft365 that referenced this issue May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants