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

Docs: adds Docusaurus site #1862

Merged
merged 15 commits into from
Aug 6, 2024
Merged

Docs: adds Docusaurus site #1862

merged 15 commits into from
Aug 6, 2024

Conversation

lukegalbraithrussell
Copy link
Contributor

@lukegalbraithrussell lukegalbraithrussell commented Aug 2, 2024

Requirements

Summary

This is the new Docusaurus site. Tested that it builds properly. This is all done in the same way as the Bolt sites.

This is less absurdly large then it looks! 15,000 of the changed lines are package-lock.json 😬 , and 55,000 are from the generated reference (along with like 800 files 😬 😬 ). If you ignore those, this PR is a -2,000 line change. Most of the files listed are from moving stuff around (I used git mv!).

If the github files tab is too laggy to review, I can pull out the reference pages temporarily then add them in after review. Let me know! Or let me know if you think that's too many files and we should flatten them. Demo of what the reference looks like here:

sdk-reference.mov

Anyway, there are about only a few files in this PR that matter for review. If you've looked at the previous PRs, it's all pretty similar

Maintenance files:

Site config files:

The 404 page has two files, for Docusaurus ~ reasons ~

Folder and file organization

This shares the same structure as the other sites. At large:

docs/
├── content/ (the good stuff. md and mdx files supported)
│   ├── getting-started.md
│   ├── packages/ (written .md files)
│   │   └── oauth.md
│   └── reference/
│       └── logger/ (generated reference files)
├── static/
│   ├── css/
│   │   └── custom.css (the css for everything!)
│   └── img/ (the pictures for the site)
│       ├── rory.png 
│       └── oslo.svg 
├── src/
│   └── theme (only contains the 404 page)
├── docusaurus.config.js (main config file. also where to set navbar/footer)
├── sidebar.js (manually set where the content docs are in the sidebar.)
└── typedoc.json (typedoc parameters for generating reference from src)

The default name for the content folder was docs but docs/docs was silly. I am open to other names though.

Docs pages: slugs and links

The organization of pages is purposefully kept as similar to the current layout of pages so developers don't get jarred from both a site change and page changes. Slugs are all named matching that previous organization. URLs stay the same.

All .md files were renamed (yes, I used git mv) to match the title and the slug. Everything now matches up.

All markdown reference links were also updated to be up-to-date and working. If it's a link on the site, it now works. I also stripped all the pages of any residual HTML or custom formatting. They should all be the most basic of markdown now.

Editing and managing the site

The README contains a basic docs editing guide. You don't need to worry about the site unless you're touching something inside the /docs folder.

There is a new action workflow: it does a test build on docs PRs and deploys the site on merges to main. It does so also on every release so the generated reference docs stay up-to-date

Next steps

This wouldn't be a DevRel project without some fast follows. This is what I plan on doing after all the sites are live:

  • Set up action workflow to update this custom.css if the main site's custom.css is changed.
  • General copy editing (I avoided this the best I could in this PR).

@lukegalbraithrussell lukegalbraithrussell marked this pull request as ready for review August 2, 2024 22:49
@lukegalbraithrussell lukegalbraithrussell added the docs M-T: Documentation work only label Aug 2, 2024
Copy link

@technically-tracy technically-tracy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful!

Copy link
Contributor

@filmaj filmaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks amazing!

I do have some recommended changes and follow-ups but the Files Changes tab on GitHub simply can't handle the pure unadulterated awesomeness that this PR contains, so I think I'll send a more focussed PR at a later date once this is merged.

The one question I have is how the GitHub workflow included in this PR works with the Pages settings set on this repo?

Screenshot 2024-08-06 at 9 55 53 AM

I suppose the bundled workflow supersedes this Pages deployment setting, and we can disable the Pages? 🤔

@lukegalbraithrussell
Copy link
Contributor Author

@filmaj This does supersede those settings if the GitHub workflow is ran, but it would still default to trying to build the old site on any PR where the GitHub workflow is not ran. But! Immediately after a site is live I change the Pages settings to only use this set up. It'll look like this (from the Bolt-JS repo, which was in the same situation):
image

@filmaj
Copy link
Contributor

filmaj commented Aug 6, 2024

Awesome! :shipit:

@lukegalbraithrussell lukegalbraithrussell merged commit e4d1630 into main Aug 6, 2024
30 checks passed
@lukegalbraithrussell lukegalbraithrussell deleted the luke-docs-overhaul branch August 6, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs M-T: Documentation work only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants