Commit Graph

42 Commits

Author SHA1 Message Date
Tom Christie
0e65d662fd Pin codespell dependancie 2024-06-19 15:43:23 +01:00
Oleh Prypin
59a295f5f9 Merge pull request #3493 from waylan/2248
Update mkdocs theme to bootstrap 5.3 and add support for dark mode.
2024-04-12 21:38:53 +02:00
Oleh Prypin
1451fb3f2c Babel setuptools frontend is still used in the install hook 2024-04-09 16:38:35 +02:00
Oleh Prypin
fc153b27fc Babel no longer needs an install workaround 2024-04-09 16:03:10 +02:00
Waylan Limberg
351b87939d Update mkdocs theme to Bootstrap/Bootswatch 5.3.2
Javascript has been updated to Bootstrap version 5.3.2 and CSS has been
updated to the the Bootswatch Cerulean theme version 5.3.2. Adding support
for a dark mode to the mkdocs theme is now possible.

All local colors (in base.css, extra.css, etc.) are now defined using
Bootstrap variables so that any future color modes (such as dark mode)
will be consistent.

Admonition styles have also been fully fleshed out with all colors being
Bootstrap colors (via variables) rather than our own custom colors.

Note that while Bootstrap version 5 dropped a dependency on jQuery, the
mkdocs theme is still making use of jQuery at this time. However, future
changes could remove the need for this dependency.

Co-authored-by: Oleh Prypin <oleh@pryp.in>
2024-03-16 15:16:34 +01:00
Oleh Prypin
94544bdc6b Drop CSSLint as it's an abandoned project 2024-03-16 14:43:27 +01:00
Oleh Prypin
672eba5b9f Follow Python-Markdown approach for getting the title from the first H1
This partly reverts changes in commit e755aaed7e as some of that functionality will be deprecated.
Several more edge cases are taken into account now.

Co-authored-by: Waylan Limberg <waylan.limberg@icloud.com>
2024-02-24 12:33:48 +01:00
Oleh Prypin
e755aaed7e Strip all HTML when getting the title from the first H1 tag (#3564)
Not stripping it was a bug, and also inconsistent with how ToC titles are extracted.
2024-02-08 19:17:16 +01:00
Oleh Prypin
d6fcc56a3e Set up automatic fixes for PRs using pre-commit-ci-lite (#3561)
If a pull request has applicable Ruff fixes or needs re-formatting with Black/isort, these will be automatically pushed to the pull request via https://pre-commit.ci/lite.html

Versions of these formatter tools are already pinned since commit c9cf11b941, so unexpected unrelated changes from just updating these tools will not happen.

Note that the actual pre-commit tool is not used, and there are no plans for that.
2024-01-29 22:31:12 +01:00
Oleh Prypin
c9cf11b941 Pin versions of black, isort, ruff 2024-01-26 21:13:01 +01:00
Oleh Prypin
15bd2d5ea0 Exclude tests from the wheel distribution (#3522) 2023-12-17 17:00:48 +01:00
Oleh Prypin
9cd0cf4e17 Fix hatch environment 'docs' to use the local mkdocs checkout (#3518) 2023-12-14 22:14:55 +01:00
Oleh Prypin
9e443d2120 For validation, pick up anchors also from raw HTML (#3505) 2023-12-11 23:49:10 +01:00
Oleh Prypin
4ad0dd16b2 Use hatch-mkdocs and hatch-pip-compile for docs deps 2023-12-03 13:11:33 +01:00
Oleh Prypin
35fb2c7203 Move code to external mkdocs-get-deps dependency (#3477)
The "get-deps" command will still be provided inside MkDocs like before (and is not deprecated at all) but is now implemented in a separate repository and can be used directly from there as well.

This separation of code was done because obtaining just the "get-deps" part with very few dependencies can be useful: one can run it in a main environment but then install actual MkDocs with dependencies in a virtual environment.
2023-11-21 21:03:41 +01:00
Oleh Prypin
0a4f3240d1 Use projects' own type annotations, stubs no longer needed 2023-11-02 00:02:29 +01:00
Oleh Prypin
f31caca339 mypy: Stop ignoring missing imports 2023-10-29 10:49:15 +01:00
Oleh Prypin
3e0949a332 Merge pull request #3430 from mkdocs/ruffdocs
Apply more rules from ruff, esp. for docstrings
2023-10-20 15:31:30 +02:00
Oleh Prypin
125f36f943 Enable more ruff rules 2023-10-16 22:42:10 +02:00
Oleh Prypin
4710d73999 Apply rules to docstrings 2023-10-16 22:41:10 +02:00
Oleh Prypin
e2a9576b24 Drop Python 3.7, officially support Python 3.12 2023-10-16 22:39:14 +02:00
Oleh Prypin
828f4685f2 Fix unittest invocation on Windows, don't apply coverage by default
-Tests actually weren't being run on Windows!
2023-10-16 22:32:28 +02:00
Oleh Prypin
cc76672d55 Workaround: babel depends on setuptools without declaring it
https://github.com/python-babel/babel/issues/1031
2023-10-16 22:32:28 +02:00
Oleh Prypin
347c3a91dd Apply automatic fixes from ruff, show diff in CI 2023-09-11 00:02:51 +02:00
Oleh Prypin
b0915b4697 Switch to "ruff" linter, enable many of its rules (#3368)
Co-authored-by: Ultrabug <ultrabug@ultrabug.net>
2023-09-04 10:02:38 +02:00
Oleh Prypin
80254454d2 Revert "Check types against older Click that still has correct types"
This reverts commit 21c618a1c6.
2023-07-18 23:22:25 +02:00
Oleh Prypin
fad2926760 Update Hatch matrix specification, properly add Python 3.11 2023-07-07 15:17:40 +02:00
Oleh Prypin
21c618a1c6 Check types against older Click that still has correct types
https://github.com/pallets/click/issues/2558
2023-07-07 14:27:18 +02:00
Oleh Prypin
b162c5e824 Docs: automatically generate the list of locales (#3272) 2023-06-23 09:35:26 +02:00
Oleh Prypin
9394d4b168 Merge remote-tracking branch 'origin/master' into mjs 2023-06-18 19:18:22 +02:00
Oleh Prypin
9d56fa21d9 Merge remote-tracking branch 'origin/master' into ignore 2023-06-09 20:18:54 +02:00
Oleh Prypin
395daa05fb Merge remote-tracking branch 'origin/master' into getdeps 2023-06-04 23:24:58 +02:00
Oleh Prypin
32d8c3a986 Expand config.extra_javascript to support type, async, defer
The top-level template object `extra_javascript` gets soft-deprecated because it still reports only a list of plain strings.

Themes need to take action and pick up the new config keys from `config.extra_javascript` instead.
2023-06-04 00:37:41 +02:00
Oleh Prypin
41c6ee2de7 Enforce that imports are under if TYPE_CHECKING if possible (#3236) 2023-06-03 15:51:18 +02:00
Oleh Prypin
67e0e4e052 New exclude_docs config: gitignore-like patterns of files to exclude
These files will not be picked up into the `Files` collection and as such, also the final built site.

Also adds the ability to *un*-ignore the files that MkDocs forcibly ignores.
2023-05-28 23:10:25 +02:00
Oleh Prypin
562d5e14c1 Un-pin upper version of Python-Markdown (#3222)
Reverts commit dd7986ff7b
2023-05-18 18:44:44 +02:00
Oleh Prypin
36205e30dd New get-deps command: infer PyPI depedencies from mkdocs.yml
The user story is that the following command should let you "just build" any MkDocs site:

    pip install $(mkdocs get-deps) && mkdocs build

This cross-references 2 files:

* mkdocs.yml - `theme`, `plugins`, `markdown_extensions`
* projects.yaml - a registry of all popular MkDocs-related projects and which entry points they provide - downloaded on the fly

-and prints the names of Python packages from PyPI that need to be installed to build the current MkDocs project
2023-05-01 19:02:22 +02:00
Oleh Prypin
c576f07d30 Declare support for Python 3.11 (#3020) 2022-10-29 14:48:00 +02:00
Oleh Prypin
b2083d07f5 Add CLI reference page, auto-generated from Click (#2996) 2022-10-08 11:17:05 +02:00
Oleh Prypin
aa10190a55 Migrate from Tox to Hatch as test runner (#2991) 2022-10-07 23:18:05 +02:00
Oleh Prypin
65c24c21f0 Integrate Babel build steps as a Hatch hook (#2992) 2022-10-07 18:07:35 +02:00
Oleh Prypin
30cdac47a9 Switch to pyproject.toml and Hatch build (#2988) 2022-10-07 00:42:48 +02:00