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 #1537

Merged
merged 8 commits into from
Aug 6, 2024
Merged

Docs: adds Docusaurus site #1537

merged 8 commits into from
Aug 6, 2024

Conversation

lukegalbraithrussell
Copy link
Contributor

@lukegalbraithrussell lukegalbraithrussell commented Aug 3, 2024

Summary

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

python-slack-sdk.mov

This removes the Sphynx builds entirely and moves docs from .rst to .md. The legacy slackclient v2 docs are now in a legacy folder viewable on the same site. The docs folder is now the source files, and the build file is only created during the build process and not stored.

The generated reference docs go in in /docs/static now instead of /docs -- just like the bolt-python site.

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/mdx files supported)
│   ├── rtm.md
│   └── oauth.md
├── static/
│   ├── api_docs/ (generated reference docs)
│   │   └── slack_sdk/
│   │   │   └── index.html
│   ├── 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.)

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

Testing

You can run the site locally:

npm install

npm run start

The reference docs won't work that way though. You'll need to build the site to replicate prod:

npm run build

npm run serve

Click around! have fun!

Category

  • /docs-src (Documents, have you run ./scripts/docs.sh?) (I updated this template too!)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

Copy link

codecov bot commented Aug 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.01%. Comparing base (5a68e6a) to head (67168d6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1537      +/-   ##
==========================================
+ Coverage   84.96%   85.01%   +0.04%     
==========================================
  Files         113      113              
  Lines       12498    12498              
==========================================
+ Hits        10619    10625       +6     
+ Misses       1879     1873       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

Checked on my local machine; this is AMAZING. Left a minor comment you can quickly resolve.

docs/docusaurus.config.js Outdated Show resolved Hide resolved
Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

Looks good 💯

@@ -1,10 +1,6 @@
# general things to ignore
build/
dist/
docs/_sources/
Copy link
Contributor

Choose a reason for hiding this comment

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

The lords work 🙏

Co-authored-by: Kazuhiro Sera <[email protected]>
@lukegalbraithrussell lukegalbraithrussell merged commit 54f8e72 into main Aug 6, 2024
14 checks passed
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.

4 participants