-
Notifications
You must be signed in to change notification settings - Fork 328
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
Migrate the docs SSG to Docusaurus #4396
Comments
@pnp/cli-for-microsoft-365-maintainers What would be the best way to start working on this? |
Are we looking into splitting the work or will one person do it all? If the latter, then we treat it as any other PR. If the former, then we need to think about the best way forward to be able to integrate everyone's work and preview in the meantime. While we could create a separate branch in the upstream, where multiple folks would submit PRs to, we'd need to pay attention to sync it regularly with main to avoid conflicts, and also adjust the GitHub workflow so that it doesn't build docs from it when merging PRs. |
Btw, I just found out that MkDocs uses Lunr for its search. Seems like there's a Docusaurus plugin as well https://www.npmjs.com/package/docusaurus-lunr-search which we could consider using instead of standing up Azure Cognitive Search. |
It will be best to split it up I think. Mainly, because it's a lot of work that needs to be done. We can look into automating several tasks but some tasks will be achieved quicker by doing it manually than by creating an automation process. My main concern at the moment is keeping our new docs up to date with our current ones during this process. With this I mean, when somebody updates the docs how we'll reflect this change in our current work? Anyway could be to create an issue for this specific task and that we, the maintainers, update it after we have merged some new PRs with related changes to the docs.
Isn't this a bit similar to |
I think this is no different than working on a new major version and each time we merge something to main, we need to merge it to the next major version branch too and resolve any conflicts. The benefit here is that we can do this as fast as we can without any heads up because our docs are not an API.
Not quite. When using Lunr, the search index is compiled into a JSON file that's deployed along the docs. When searching for things, the search is executed against the index without any third party service. It might be not as advanced as Azure Cognitive Search, but it's certainly 0-maintenance which in our case is a big pre. |
That's a good plan, one thing we lose with this approach is the ability to preview our changes live. Then we just have to pull the changes from the branch and work from there, which shouldn't be a problem. Then, if it's alright, I'll set up a branch where we can work on Docusaurus. I think it will be best to protect this branch so we can review the PRs coming in.
Well, that's perfect for our use case. We should definitely start with Lunr then! I'll look into creating a script for all the docs pages. This script should cover the following:
These points will be the biggest tasks to do manually, so looking into scripting will save us a lot of time here. I'll create a separate issue for this task. Here we can discuss what tasks need to be done by the script to each '*.md' file. |
We should also look for the indent we use right now for our option descriptions. I kinda like it that way. |
yeah, using the dt/dd syntax is very useful, especially when rendering in the console. If we can keep the formatting for the web, it would be awesome |
@pnp/cli-for-microsoft-365-maintainers, I've been tinkering with sorting out which tasks to focus on first. The idea is that once we finish everything that falls under the |
Shouldn't the Lunr search engine be listed under high prio? |
I've put it into low prio because we're looking into working with Mendable. It could be a bit of waste if we put in all the work to implement Lunr, and then a few weeks later we throw it all out. |
Added an extra high prio: |
Moved search engine task to |
Added another high prio If I'm not mistaken this hasn't been implemented yet right @Jwaegebaert? |
Is SEO also something we should configure? https://docusaurus.io/docs/seo |
Good catch. GA should definitely be implemented. Maybe we should also look to update to GA4 because they are looking into deprecating the version we use. The SEO out-of-the-box should be fine. But it wouldn't hurt to do some research into this 😄 |
As this has already been migrated it should be safe to close this epic. |
Issues
High Prio
sample-scripts
#4640--help
print to accommodate different syntaxes #4673 Ready to go! Still need to write the tests 😅sidebar.js
to manually ordercmd
folder content #4743High Prio After Deploy
Low Prio
Docusaurs: Validate the double npm package approach #4744go to top
button is hidden by mendable button #4806Docusaurs: Add GitHub stats counter to the navbar #4880Info:
For our docs, we will be changing the current Python-based SSG to a JavaScript one, Docusaurus to be more specific. This has been concluded from our recent discussion #4283 (comment).
Docusaurus comes with a bunch of out-of-box features that align well with our current docs setup. Pages are written in MarkDown, layered navigation, table of content for each page, and much more. We currently have a PoC running where you can look at the new UI/UX.
PoC
Regarding the PoC, an example of our docs is available at https://jwaegebaert.github.io/cli-microsoft365-docusaurus/
I've built it with version 6.1 and the source code is available in the repo https://github.com/Jwaegebaert/cli-microsoft365-docusaurus.
There are a few things to keep in mind when looking through the PoC.
ToDo
The text was updated successfully, but these errors were encountered: