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

Migrate documentation to mkdocs #1810

Merged
merged 50 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
9405f96
Demolish sphinx
hypergonial Jan 20, 2024
98ab59e
Temporarily remove social as it breaks rtfd
hypergonial Jan 20, 2024
f6152a7
Add pages CD
hypergonial Jan 20, 2024
b9e1399
Remove sphinx session
hypergonial Jan 20, 2024
b0c937b
Remove edit & view buttons
hypergonial Jan 20, 2024
23a9f3f
Add favicon
hypergonial Jan 20, 2024
fda74d1
Minor fixes to page template
hypergonial Jan 21, 2024
6ffdec8
Document the top-level module
hypergonial Jan 21, 2024
9b62648
Merge branch 'hikari-py:master' into feature/docs-v3
hypergonial Jan 21, 2024
e6a2474
Fix CI
hypergonial Jan 21, 2024
7bde864
Build to public/docs
hypergonial Jan 21, 2024
5fa08ac
Adjust pages CI
hypergonial Jan 21, 2024
8ba5529
Merge dav changes
davfsa Jan 21, 2024
43adf8d
Remove docs github workflow
davfsa Jan 21, 2024
b7361a1
Simplify summary write
davfsa Jan 21, 2024
d3834a4
Revert "Simplify summary write"
davfsa Jan 21, 2024
ff54c8c
Re-add incorrectly removed pymdownx.tabbed config
davfsa Jan 21, 2024
629bac8
Fix mkdocs.yml
hypergonial Jan 21, 2024
0ed3dec
Remove mathjax
davfsa Jan 21, 2024
df4e1d1
Merge branch 'feature/docs-v3' of github.com:hypergonial/hikari into …
davfsa Jan 21, 2024
6b8aa16
Remove smooth scrolling
davfsa Jan 21, 2024
849806e
Fix issues pointed out in pr
davfsa Jan 21, 2024
a00b1cc
[Test] Remove instant navigation to properly indicate large loads
davfsa Jan 21, 2024
c0ccd6c
Remove top level hikari reference page
davfsa Jan 21, 2024
3e0aaf1
Revert "Remove top level hikari reference page"
davfsa Jan 21, 2024
e5214b6
Add missing parameters header causing page to overflow
davfsa Jan 21, 2024
564b506
Add changelog fragment
davfsa Jan 21, 2024
dc20503
Remove unnecessary gitignore
davfsa Jan 21, 2024
fe94b30
Increment line length to 80
davfsa Jan 21, 2024
5b47b30
First code-block pass
davfsa Jan 21, 2024
0d96cb8
Second code-block pass
davfsa Jan 21, 2024
efe4c3b
Third code-block pass
davfsa Jan 21, 2024
db93fd4
Fourth code-block pass
davfsa Jan 21, 2024
992466d
Admonition blocks pass
davfsa Jan 21, 2024
b13df05
Remove unnecessary dependency and enable edit button
davfsa Jan 21, 2024
547ad2b
Merge branch 'master' into feature/docs-v3
davfsa Jan 21, 2024
67fb222
Fix griffe warnings
davfsa Jan 21, 2024
7f1d88b
Fix broken admonishment
hypergonial Jan 22, 2024
0489ca6
Bump dependencies
davfsa Jan 24, 2024
0bb2c1d
Merge branch 'master' into feature/docs-v3
davfsa Jan 26, 2024
a28862b
Partial work
davfsa Jan 26, 2024
688f3bb
More migration to MkDocs (#54)
PythonTryHard Feb 25, 2024
789096d
Merge branch 'task/docs-v3-in-progress' into feature/docs-v3
davfsa Feb 25, 2024
a2e0b77
Merge branch 'master' into feature/docs-v3
davfsa Feb 25, 2024
be9b5b1
Fix failing tests
davfsa Feb 25, 2024
9193637
Properly fix failing tests
davfsa Feb 25, 2024
6091ca1
Temporarily disable mkdocs strict
davfsa Feb 25, 2024
98a9b44
Migrate hikari-specific references to MkDocs (#1)
PythonTryHard Feb 26, 2024
0878d3d
Migrate stdlib reference to MkDocs (#2)
PythonTryHard Mar 2, 2024
815e471
Finalise MkDocs migration (#3)
PythonTryHard Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,13 @@ jobs:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Setup node
uses: actions/setup-node@v4
# NOTE: This should be kept up to date with .readthedocs.yaml
python-version: 3.11

- name: Build documentation
run: |
pip install -r dev-requirements.txt
nox -s sphinx
nox -s mkdocs

- name: Upload artifacts
if: github.event_name == 'pull_request'
Expand Down
22 changes: 5 additions & 17 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,14 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
# NOTE: This should be kept up to date with .ci.yml
python: "3.11"

sphinx:
configuration: docs/conf.py
builder: dirhtml
mkdocs:
configuration: mkdocs.yml

python:
install:
- requirements: dev-requirements/sphinx.txt
- requirements: dev-requirements/mkdocs.txt
- method: pip
path: .

search:
ignore:
# Defaults
- search.html
- search/index.html
- 404.html
- 404/index.html

# Custom
- index.html
- changelog/index.html
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Python 3.8, 3.9, 3.10, 3.11 and 3.12 are currently supported.

## Installation

Install Hikari from PyPI with the following command:
Install hikari from PyPI with the following command:

```bash
python -m pip install -U hikari
Expand All @@ -35,6 +35,7 @@ py -3 -m pip install -U hikari
## Bots

Hikari provides two different default bot implementations to suit your needs:

- [GatewayBot](#gatewaybot)
- [RESTBot](#restbot)

Expand Down Expand Up @@ -194,6 +195,7 @@ bot.run(

Many other helpful options exist for you to take advantage of if you wish. Links to the respective docs can be seen
below:

- [GatewayBot.run](https://docs.hikari-py.dev/en/stable/reference/hikari/impl/gateway_bot/#hikari.impl.gateway_bot.GatewayBot.run)
- [RESTBot.run](https://docs.hikari-py.dev/en/stable/reference/hikari/impl/rest_bot/#hikari.impl.rest_bot.RESTBot.run)

Expand Down Expand Up @@ -246,14 +248,20 @@ python -m pip install -U hikari[speedups, server]

## Additional resources

You may wish to use a command framework on top of Hikari so that you can start writing a bot quickly without
You may wish to use a command framework on top of hikari so that you can start writing a bot quickly without
implementing your own command handler.

Hikari does not include a command framework by default, so you will want to pick a third party library to do it:

- [`lightbulb`](https://github.com/tandemdude/hikari-lightbulb) - a simple and easy to use command framework for Hikari.
- [`tanjun`](https://github.com/FasterSpeeding/Tanjun) - a flexible command framework designed to extend Hikari.
- [`crescent`](https://github.com/magpie-dev/hikari-crescent) - a command handler for Hikari that keeps your project neat and tidy.
- [`arc`](https://github.com/hypergonial/hikari-arc) - a bot framework with a focus on type-safety and correctness.
- [`crescent`](https://github.com/magpie-dev/hikari-crescent) - a command handler for hikari that keeps your project neat and tidy.
- [`lightbulb`](https://github.com/tandemdude/hikari-lightbulb) - a simple and easy to use command framework for hikari.
- [`tanjun`](https://github.com/FasterSpeeding/Tanjun) - a flexible command framework designed to extend hikari.

There are also third party libraries to help you manage components:

- [`miru`](https://github.com/hypergonial/hikari-miru) - A component handler for hikari, inspired by discord.py's views.
- [`flare`](https://github.com/brazier-dev/hikari-flare/) - a component manager designed to write simple interactions with persistent data.

---

Expand Down Expand Up @@ -307,7 +315,7 @@ Currently, this functionality does not yet exist.

---

## Developing Hikari
## Developing hikari

To familiarize yourself a bit with the project, we recommend reading our
[contributing manual](https://github.com/hikari-py/hikari/blob/master/CONTRIBUTING.md).
Expand Down
1 change: 1 addition & 0 deletions changes/1810.documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch documentation to mkdocs
18 changes: 18 additions & 0 deletions dev-requirements/mkdocs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
mkdocs==1.5.3
davfsa marked this conversation as resolved.
Show resolved Hide resolved

# Mkdocs Material
mkdocs-material[imaging]==9.5.14

# Docstring parsing for API reference
mkdocstrings[python]==0.24.1
griffe-inherited-docstrings==1.0.0

# Generate API reference pages dynamically
mkdocs-gen-files==0.5.0
mkdocs-literate-nav==0.6.1

# Formatting signatures
black==24.3.0

# Image viewer ext
mkdocs-glightbox==0.3.7
16 changes: 0 additions & 16 deletions dev-requirements/sphinx.txt

This file was deleted.

1 change: 0 additions & 1 deletion docs/.gitignore

This file was deleted.

47 changes: 0 additions & 47 deletions docs/_static/extra.css

This file was deleted.

17 changes: 0 additions & 17 deletions docs/_templates/numpydoc_docstring.rst

This file was deleted.

115 changes: 0 additions & 115 deletions docs/_templates/python/module.rst

This file was deleted.

12 changes: 12 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Changelog
description: Learn what the latest changes are!
hide:
- navigation
---

!!! warning
Major and minor releases also include the changes specified in prior development releases.


--8<-- "CHANGELOG.md"
11 changes: 0 additions & 11 deletions docs/changelog/index.md

This file was deleted.

Loading
Loading