-
Notifications
You must be signed in to change notification settings - Fork 218
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 #1342
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1342 +/- ##
=========================================
Coverage 74.98% 74.98%
Complexity 4189 4189
=========================================
Files 451 451
Lines 12930 12930
Branches 1331 1331
=========================================
Hits 9696 9696
Misses 2463 2463
Partials 771 771 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic! When I run this document site on my local machine, all the Java code snippets are not highlighted while highlighting works for Kotlin, JSON, and XML data. Is this something we should resolve before merging?
@seratch Nice catch! For some reason Java highlighting isn't enabled by default in Docusaurus. I've added the syntax highlighting for both Java and Groovy |
@lukegalbraithrussell Thanks for quickly resolving it! With the latest revision, the only remaining issue I found is /image/* file access error. For example, |
@seratch The pictures are now working. Those shortened |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for quickly fixing the issue! LGTM now
Summary
This PR adds a Docusaurus site. Tested that it builds properly. This is all done in the same way as the other sites site.
java-slack-sdk.mov
14,569 of those line changes are from
package-lock.json
. So it's really a +1900 changeIf you've looked at the previous PRs, it's all pretty similar, with the exception of
docs/version-config.yml
and its use in.workflows/doc-deploy
.You'll see placeholders in markdown files for version values. For example:
sdkLatestVersion
. The github workflow replaces these placeholders with the values set indocs/version-config.yml
. ThesdkLatestVersion
value is set viascripts/set_version.sh
but the other values are changed directly in the file. When a value inversion-config.yml
is changed, the site is rebuilt automatically due to the github workflow looking for changes to/docs
. I tested this all out on my personal deployed docusaurus test site.Anyway, there are about only a few files in this PR that matter for review.
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 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 for the English site.
The Japanese site unfortunately has to have slightly different slugs - they were at
/guides/ja/page
and docusaurus does/ja/guides/page
. At that point, I changed it to/ja-jp/guides/pages
to match the other sites. I've added redirects, but they may need to toggle the language once redirected.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:
custom.css
if the main site'scustom.css
is changed.Testing
You can run the site locally:
npm install
npm run start
You can build and serve on your computer to swap between english and japanese:
npm run build
npm run serve
Click around! have fun!
Category
Just docs
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.