Skip to content

Upgrade Docs#79

Merged
ChrisLovering merged 14 commits into
mainfrom
upgrade-docs
May 30, 2022
Merged

Upgrade Docs#79
ChrisLovering merged 14 commits into
mainfrom
upgrade-docs

Conversation

@HassanAbouelela
Copy link
Copy Markdown
Contributor

This PR upgrades our docs in two aspects:

  • Restores release-based changelogs (ed4b2fb). They were originally removed due to not wanting to maintain a list of versions, but we ended up doing that anyways. This is nicer for users than the changelog.md file we are maintaining
  • Adds sphinx-multiversion (4c9cad2). This is the big one. I still need to get the CI working for it, but that should be much easier now. I'll probably have it only run on main when deploying to prod, so we can keep the warnings on newer builds. If you'd like to build with the new system, please refer to the updated documentation (docs/readme.md).

While reviewing the multiversion changes, the following two limitations might be important to keep in mind to understand why it's as complicated as it is:

  • multiversion tells sphinx to use the latest conf.py when building (it passes -c project/path/docs/conf.py, as opposed to -c historical_version/docs/conf.py), which means we can't assume anything about the state of the project. Things like version, commit information, etc need to be obtained through some other method.
  • When deploying docs, it's very naive and will serve whatever we give it straight. Multiversion will place each version under a folder, and leave the root empty. This won't work for us because the homepage of the docs will 404. I've included a handcrafted redirect to get around this.

Replaces the access to `discord.utils._MissingSentinel` with a simple
boolean flag. This has the benefit of behaving more nicely with our
doc generation.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Add the releases-based changelog system back, and migrate the old
changelog entries.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Adds the sphinx-multiversion package to be used for generating docs
for all versions of the project, not just the latest. This includes
all the necessary configuration to make it work cleanly.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Add a brief explanation about each item in the docs folder, to help
contributors navigate and understand what each part does.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 29, 2022

Deploy Preview for bot-core ready!

Name Link
🔨 Latest commit 5a4883b
🔍 Latest deploy log https://app.netlify.com/sites/bot-core/deploys/629508184a70af0008621de6
😎 Deploy Preview https://deploy-preview-79--bot-core.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Deleted CHANGELOG.md in favor of the changelog in the docs.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Changes the behavior of `BUILD_DOCS_FOR_HEAD` to add only the current
branch to the build whitelist, instead of all branches.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
@HassanAbouelela HassanAbouelela force-pushed the upgrade-docs branch 5 times, most recently from 17c0416 to 504d6ad Compare May 29, 2022 20:22
@HassanAbouelela
Copy link
Copy Markdown
Contributor Author

I've finally got CI working, and the PR is almost ready. If you navigate to the build right now, you won't actually see anything because that depends on the main branch being built, but that won't be possible until this is merged. I'll try to get a demo working on a fork tomorrow or something, but for now you can see the current version here https://deploy-preview-79--bot-core.netlify.app/upgrade-docs/

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Removes unnecessary `depends-on` to speed up builds.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
@HassanAbouelela
Copy link
Copy Markdown
Contributor Author

HassanAbouelela commented May 30, 2022

Alright, generated some demos on my fork. You can see the docs here:

Make sure to see the site_api docs to see the changed functions.

Co-authored-by: Chris Lovering <chris.lovering.95@gmail.com>
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
@ChrisLovering ChrisLovering merged commit 6659680 into main May 30, 2022
@ChrisLovering ChrisLovering deleted the upgrade-docs branch May 30, 2022 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants