-
Notifications
You must be signed in to change notification settings - Fork 145
refactor(docs): split monolithic api reference into multiple files #722
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
Merged
onerandomusername
merged 199 commits into
DisnakeDev:master
from
elenakrittik:split-up-docs
Apr 8, 2023
Merged
Changes from 194 commits
Commits
Show all changes
199 commits
Select commit
Hold shift + click to select a range
74aa538
first prototype
elenakrittik a27fa3e
I love to resolve merge conflicts (no.)
elenakrittik e27dfda
Fix 'undefined label' errors (probably..)
elenakrittik bcd4f59
Fix another error
elenakrittik bc50961
random commit message
elenakrittik cf38fd7
'undefined label' finale, i guess?
elenakrittik 9d6cc04
apply fixes
elenakrittik 280daa7
Align classes' markers with their grouping in current api.rst
elenakrittik 26bd9e4
Merge latest changes
elenakrittik ffbc600
Apply fix (if any lol)
elenakrittik 52361f2
Split up ext.commands docs
elenakrittik 7bf4e17
Merge branch 'master' into split-up-docs
elenakrittik fe788e5
Add small changelog
elenakrittik 84734b0
Merge branch 'master' of https://github.com/DisnakeDev/disnake into s…
elenakrittik 1e7d028
Renamed links
elenakrittik 703fb8e
Finale??
elenakrittik ddeafa4
Add missing Range, String etc.
elenakrittik 3550ff5
fix sidebar labels
elenakrittik 424e3d8
apply fix
elenakrittik 3be8e90
pypypyyypy
elenakrittik 01c3540
chore: add SphinxExtensionMeta to fulltoc
onerandomusername 7a59c62
fix: indent the created toc
onerandomusername 33c4d19
Merge branch 'master' of https://github.com/DisnakeDev/disnake into s…
elenakrittik afdccf1
Merge branch 'split-up-docs' of https://github.com/ItsAleph/disnake i…
elenakrittik d2f08fb
You want it, you got it.
elenakrittik 0189d3f
Add related events links at the bottom of pages
elenakrittik a9c5fcf
.-.
elenakrittik 5a63685
Merge latest changes
elenakrittik da76c15
fix
elenakrittik f4ad1b9
fix fix fix ...
elenakrittik 428f69c
:confetti: Redirects draft!
elenakrittik abcf74c
:shiny: Redirects!
elenakrittik 4cc42e0
Changelog, no-script and no invalid urls
elenakrittik d804ac6
fuck javascript
elenakrittik f2a2a67
Merge branch 'master' of https://github.com/DisnakeDev/disnake into s…
elenakrittik 03cade4
Merge branch 'split-up-docs' of https://github.com/ItsAleph/disnake i…
elenakrittik 123686a
smol nit
elenakrittik 41e9e59
Merge branch 'master' of https://github.com/DisnakeDev/disnake into s…
elenakrittik b142a4e
Auto-scroll & auto-collapse
elenakrittik e1ff6ed
thanks read the docs
elenakrittik 61fa255
thanks shared namespace
elenakrittik 25e39ae
chore: define redirects as safe for parallel reads
onerandomusername 3383c5b
Merge branch 'master' of https://github.com/DisnakeDev/disnake into s…
elenakrittik 80b4693
Lts
elenakrittik 667e1f8
test1
elenakrittik 19f8aa2
test1
elenakrittik 67cae53
testestestestest
elenakrittik 6fa8d23
Holy rubbery duck
elenakrittik b535770
gg
elenakrittik 95d8608
gg
elenakrittik 4394eb5
gg
elenakrittik 2aacbeb
gg
elenakrittik c484892
test
elenakrittik f781385
test
elenakrittik 46d8d92
test
elenakrittik f6861fb
ItsNotMyFault:tm:
elenakrittik 1922835
i told you
elenakrittik b6a1de0
Merge branch 'master' of https://github.com/DisnakeDev/disnake into s…
elenakrittik 1109633
D
elenakrittik f6cce1c
chore: use proper typehint for docs ext setup()
onerandomusername 8819ed2
Merge latest changes
elenakrittik 51bfdb7
revert ignoring readthedocs banner
onerandomusername 76ae555
Merge latest changes
elenakrittik 102dea1
lmfao what
elenakrittik 791ba2b
:mmwhereismynose:
elenakrittik 50b9626
Merge branch 'master' into split-up-docs
onerandomusername a09a6bf
chore(docs): fix plurals in doc section titles
Sharp-Eyes 23a48d4
Only load redirects on api.html and ext/commands/api.html
elenakrittik 4850d57
Merge latest changes
elenakrittik 06f0d53
Fix lint
elenakrittik cf8f2e1
Update docs/api/automod.rst
elenakrittik 7da7407
Update docs/extensions/fulltoc.py
elenakrittik d15ddd7
if you read this you are cool
elenakrittik 48fc5a9
try
elenakrittik 52050fb
mhmh
elenakrittik e7ca779
Update disnake/message.py
elenakrittik 748eed7
Update docs/_static/api_redirect.js
elenakrittik a3480cb
Update docs/_static/api_redirect.js
elenakrittik e4eb739
Update docs/extensions/fulltoc.py
elenakrittik 148a144
Update docs/extensions/fulltoc.py
elenakrittik 9684a5a
Update docs/_static/scroll_sidebar.js
elenakrittik c78d88a
Update docs/discord.rst
elenakrittik aaf975b
Update docs/extensions/redirects.py
elenakrittik 4cf7450
p
elenakrittik d8070db
w
elenakrittik cc8c113
d
elenakrittik 59fc9e0
r
elenakrittik 8375080
u
elenakrittik 755b12c
y
elenakrittik 97c2d13
Update docs/_templates/layout.html
elenakrittik c31be52
Update docs/api.rst
elenakrittik 8ae8ae8
Update docs/ext/commands/api.rst
elenakrittik 0327c91
Update docs/ext/commands/api.rst
elenakrittik 3c66250
Update docs/api.rst
elenakrittik 5b04604
Update changelog/392.doc.rst
elenakrittik c209608
500m
elenakrittik 4ea6d47
1000m
elenakrittik 8961517
1500m
elenakrittik d4e99da
1501m
elenakrittik 98b380e
1502m
elenakrittik 2659a72
1503m
elenakrittik 97718e8
fix: reformat and resolve all related event links
onerandomusername 3d5663c
fix: correct broken references missed in last commit
onerandomusername 79ba841
Update docs/extensions/redirects.py
elenakrittik dc34db6
chore: remove unused import
onerandomusername accf507
Merge branch 'master' of https://github.com/DisnakeDev/disnake into s…
elenakrittik 15e3347
The summit?
elenakrittik 6b5a509
The summit!
elenakrittik 37e164b
add short desc to abc.rst
elenakrittik 72282e3
fix danny's skill issue
elenakrittik 5ac7772
change related events in ext cmds
elenakrittik 56114f0
Merge latest changes
elenakrittik 6c7f622
imagine being dumb
elenakrittik d595ae5
Resolves merge conflicts
elenakrittik 779e66d
Merge latest changes
elenakrittik c4027ca
chore: merge the glossary back into the main api/index.rst
onerandomusername 629d587
Merge branch 'split-up-docs' of https://github.com/ItsAleph/disnake i…
elenakrittik 129cfe3
Stuff
elenakrittik fc855ee
fix
elenakrittik f473872
Merge branch 'master' into split-up-docs
onerandomusername 3ce5092
fix
elenakrittik c75d8ac
chore: data classes -> Data Classes
onerandomusername e0a708a
feat: sort discord models and dataclasses in the documentation
onerandomusername c294845
chore: update subfile names
onerandomusername ad880de
chore: reorder extensions
onerandomusername 3196dc5
nit: shorten bar under voice
onerandomusername 2273ef0
Merge branch 'master' into split-up-docs
onerandomusername b2142dd
fix: add back missing :inherited-members: for Activity classes
onerandomusername 63f0e7e
fix: apply missed doc changes from #698
onerandomusername a403e90
chore: undoc original_message
onerandomusername bb3e931
nit: trim prefix
onerandomusername a6a7749
fix search
onerandomusername b704b99
update ext/commands toc
onerandomusername 38d1094
chore: seperate api redirect into a template
onerandomusername 2923cd2
chore: remove scroll_sidebar.js
onerandomusername b18f2b8
chore: delet the duplicated text
onerandomusername 701eee6
Merge branch 'master' into split-up-docs
onerandomusername 8f41342
fix up legacy api.rst pages
onerandomusername 8d00c66
remove regular command references
onerandomusername fae74e3
captials
onerandomusername 210b9e8
chore: update link to use a role
onerandomusername 548909d
rewrite enums tldr
onerandomusername eda3e85
reverse discord models and dataclass defintions
onerandomusername ed6b01f
simplify integration description
onerandomusername bfc1e1d
remove the extra newlines not deleted as part of b18f2b84748354d9881e…
onerandomusername a58a9ac
Merge branch 'master' into split-up-docs
onerandomusername 6ff6143
Apply suggestions from code review
onerandomusername da4fbbd
fix: recategorise objects to their correct category
onerandomusername dc3d232
Merge branch 'master' into split-up-docs
onerandomusername 729fcb9
fix: move spotify to discord models
onerandomusername 6a7b792
Partial revert "remove the extra newlines not deleted as part of b18f…
onerandomusername acc9563
Merge branch 'master' into split-up-docs
onerandomusername d11e3d2
Merge branch 'master' into split-up-docs
onerandomusername 8e5cd69
no new lines in roles description
onerandomusername 38634f4
Apply suggestions from code review
onerandomusername 8af7ec0
Merge branch 'master' into split-up-docs
onerandomusername b945d5d
Merge branch 'master' into split-up-docs
onerandomusername 97c1aa0
Merge branch 'master' into split-up-docs
onerandomusername 5750ffc
Merge branch 'master' into split-up-docs
onerandomusername aec4a13
Merge branch 'master' into split-up-docs
onerandomusername 708c72c
fix: update page descriptions
shiftinv d7d5f3a
chore: slightly simplify sidebar code
shiftinv 14f4435
fix: switch around some data classes/discord models
shiftinv c526378
chore: remove "related events" links
shiftinv 92bafea
docs: mention `wait_for` on events page
shiftinv 07d0e97
fix: remove nonstandard "Raw Events" section
shiftinv 1e5ef46
chore: move `on_x_error` events below non-error events
shiftinv 1c528ed
refactor: move cogs to their own reference page
shiftinv 0a08602
refactor: make redirect handler more generic
shiftinv dd8ef93
feat: redirect immediately instead of waiting for dom load
shiftinv acdc92b
fix: assert source asset path exists in redirects extension
shiftinv 4f4d0ff
refactor(docs): move redirect mapping in extension to separate function
shiftinv 69e2c39
chore(docs): more consistent page label/anchor names
shiftinv 5a2ae4c
fix(docs): fix event docs link in `Client.event`
shiftinv 9f481b7
docs: improve docstrings/comments in fulltoc ext
shiftinv 0805da7
chore: s/pagename/docname/
shiftinv ce5e194
chore: move `includehidden` parameter
shiftinv ae45e97
chore: remove presumably unnecessary call to `env.resolve_references`
shiftinv 627c038
chore(docs): update event order
shiftinv 8e3190b
fix(docs): add missing event links on api pages
shiftinv 48c99b7
chore(docs): move `VoiceState` from members to voice
shiftinv cd0af27
fix(docs): move ui decorators to end of page
shiftinv ad2ed27
fix(docs): add missing `:decorator:` directives to autofunctions
shiftinv fdf9919
chore(docs/ui): keep old select order
shiftinv 8f4b69f
Merge remote-tracking branch 'upstream/master'
shiftinv a5dfdab
fix(docs): fix sidebar scroll being offset
shiftinv 15c9a0c
refactor: move sidebar scrolling into `Sidebar` class
shiftinv 449900f
fix(docs): resync contents with master branch
shiftinv 60c4593
docs: swap some Discord Model/Data Class categorizations
shiftinv e98ac21
fix(docs): move classes into correct files
shiftinv e056b39
fix(docs): add missing enum headers
shiftinv 4af42ff
chore: add missing parentheses
shiftinv a1ff22f
Merge remote-tracking branch 'upstream/master'
shiftinv d536e73
fix: set robots noindex on api redirect pages
shiftinv d242072
update the changelog
onerandomusername 4545571
docs(changelog): link to index pages
shiftinv ed784d6
changelog: retitle the api references
onerandomusername a64ba22
Merge branch 'master' into split-up-docs
onerandomusername d2f3135
readd a period
onerandomusername File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Split up documentation into multiple files. | ||
| - Main ``disnake`` API reference is now under ``api/``. | ||
| - ``disnake.ext.commands`` API reference is now under ``ext/commands/api/``. | ||
| - ``disnake.ext.tasks`` is considered small enough to leave it as-is, and is not changed. | ||
| - Legacy ``api.html`` and ``ext/commands/api.html`` pages are deprecated and exist only to serve as redirects. | ||
| - - Links with pre-existing anchors will be redirected to their appropriate page. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // SPDX-License-Identifier: MIT | ||
|
|
||
| "use strict"; | ||
|
|
||
| const redirects_map = {{ redirect_data }}; | ||
|
|
||
| (() => { | ||
| let url = new URL(document.location.href); | ||
|
|
||
| if (!url.pathname.endsWith("/api.html")) return; | ||
|
|
||
| // URL_ROOT is relative to `url`, and points to e.g. `<host>/en/latest/` | ||
| const root = new URL(DOCUMENTATION_OPTIONS.URL_ROOT, url); | ||
| if (!root.pathname.endsWith("/")) root.pathname += "/"; | ||
|
|
||
| const targetPath = redirects_map[url.hash.slice(1)]; | ||
|
|
||
| let newUrl = null; | ||
| if (targetPath) { | ||
| // Get current path relative to documentation root | ||
| // `/en/latest/xyz/api.html` => `xyz/api/` | ||
| let expectedPrefix = url.pathname.slice(root.pathname.length).replace(/\.html$/, "/"); | ||
|
|
||
| // The target path (`xyz/api/events.html`) should start with `xyz/api/` | ||
| if (targetPath.startsWith(expectedPrefix)) { | ||
| newUrl = new URL(targetPath, root); | ||
| newUrl.hash = url.hash; | ||
| } | ||
| } | ||
|
|
||
| // If it's still unset, the #hash is unknown or the target doesn't match the current section; | ||
| // in that case, just redirect to the relevant index page. | ||
| if (newUrl === null) { | ||
| newUrl = new URL(url); | ||
| newUrl.pathname = newUrl.pathname.replace(/\/api.html$/, "/api/index.html"); | ||
| newUrl.hash = ""; | ||
| } | ||
|
|
||
| console.log(`Redirecting to ${newUrl.href}`); | ||
| window.location.replace(newUrl); | ||
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.