Skip to content

Commit

Permalink
[chore] Vendor mkdocs fonts; update docs dependencies (#2789)
Browse files Browse the repository at this point in the history
* [chore] Update docs dependencies

* update rtd deps

* aaaa

* why can't you just be normal!

* vendor social plugin fonts
  • Loading branch information
tsmethurst authored Mar 29, 2024
1 parent 72b38c2 commit be259b1
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ shell.nix
/.idea/
/.fleet/

# ignore cache dir from mkdocs serve
/.cache
# ignore cached pngs from mkdocs serve,
# while preserving cached fonts.
/docs/.cache/plugin/social/*.png
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
version: 2

build:
os: "ubuntu-20.04"
os: ubuntu-22.04
tools:
python: "mambaforge-4.10" # https://docs.readthedocs.io/en/stable/guides/conda.html#making-builds-faster-with-mamba
python: "mambaforge-22.9" # https://docs.readthedocs.io/en/stable/guides/conda.html#making-builds-faster-with-mamba

mkdocs:
configuration: "mkdocs.yml"
Expand Down
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@ When adding a new page, you need to include it in the [`mkdocs.yml`](mkdocs.yml)

If you don't use Conda, you can read the `docs/environment.yml` to see which dependencies are required and `pip install` them manually. It's advisable to do this in a virtual environment, which you can create with something like `python3 -m venv /path-to/store-the-venv`. You can then call `/path-to/store-the-venv/bin/pip`, `/path-to/store-the-venv/bin/mkdocs` etc.

In order to upgrade dependencies, use `conda update --update-all` in the activated environment. You can then update the `environment.yml` with `conda env export --from-history -f ./docs/environment.yml`, though you'll need to fix the `channels`. Beware that `conda env export` will also drop the `pip` dependencies, so make sure to add those back.
In order to upgrade dependencies, use `conda update --update-all` in the activated environment. You can then update the `environment.yml` with:

```sh
conda env export -n gotosocial-docs --from-history --override-channels -c conda-forge -c nodefaults -f ./docs/environment.yml
```

Beware that `conda env export` will add a `prefix` entry to the environment.yml file, and drop the `pip` dependencies, so make sure to remove the prefix and add the `pip` dependencies back in.

## Development

Expand Down
Binary file added docs/.cache/plugin/social/Roboto-Black.ttf
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-BlackItalic.ttf
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-Bold.ttf
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-BoldItalic.ttf
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-Italic.ttf
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-Light.ttf
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-LightItalic.ttf
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-Medium.ttf
Binary file not shown.
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-Regular.ttf
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-Thin.ttf
Binary file not shown.
Binary file added docs/.cache/plugin/social/Roboto-ThinItalic.ttf
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ channels:
dependencies:
- cairosvg==2.7.1
- mkdocs-material-extensions==1.3.1
- mkdocs-material==9.5.8
- mkdocs-material==9.5.15
- mkdocs==1.5.3
- pillow==10.0.0
- pip==23.3.1
- python==3.11.3=h2755cc3_0_cpython
- pillow==10.2.0
- pip==24
- python==3.12
- pip:
- mkdocs-swagger-ui-tag==0.6.8
- mkdocs-swagger-ui-tag==0.6.9
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ plugins:
cards_layout_options:
background_color: "#fd6a00"
color: "#fafaff"
cache_dir: "./docs/.cache/plugin/social"
- swagger-ui-tag:
supportedSubmitMethods: []
syntaxHighlightTheme: obsidian
Expand Down

0 comments on commit be259b1

Please sign in to comment.