Skip to content

Commit 93e0ce4

Browse files
authored
Fix fonts on documentation site (#87)
* fix: Fix regular Suisse font, add medium and semibold fonts * docs: Update README * fix: Use medium (instead of semibold) for coloraxis title * docs: Update README
1 parent 2ef9c8f commit 93e0ce4

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,7 @@ build-and-publish: build
5858
poetry publish \
5959
--username __token__ \
6060
--password ${POETRY_PYPI_TOKEN_PYPI}
61+
62+
.PHONY: preview-docs
63+
preview-docs:
64+
poetry run mkdocs serve

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,25 @@ pytest -k barplots --output-dirpath ./test-outputs
6161

6262
Some of the documentation is in the form of Jupyter notebooks. The inline graphical outputs of these notebooks are part of the documentation, so these notebooks are committed to the repo with their outputs included. It is therefore important to keep the notebook outputs up-to-date by re-running all of the notebooks when changes are made to the package.
6363

64-
Run the makefile command `execute-all-notebooks` to execute all the notebooks. This 1) ensures that the notebooks execute without errors and 2) updates their outputs in-place. Then, commit any modified notebooks to the repo.
64+
Run the following command to execute all the notebooks:
65+
66+
```sh
67+
make execute-all-notebooks
68+
```
69+
70+
This 1) ensures that the notebooks execute without errors and 2) updates their outputs in-place. Then, commit any modified notebooks to the repo.
71+
72+
## Updating the documentation site
73+
74+
We use [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) to build the documentation site. Everything can be found in the [`docs/`](docs/) directory.
75+
76+
You can use the following command to preview your changes as you make them:
77+
78+
```sh
79+
make preview-docs
80+
```
81+
82+
Additionally, this repo has a [GitHub Actions workflow](.github/workflows/deploy-mkdocs-site.yml) for building the documentation site and publishing it to GitHub Pages. It's triggered on pushes to main.
6583

6684
## Publishing a new version of the package on PyPI
6785

arcadia_pycolor/style_defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
ticks="outside",
204204
tickfont=dict(family=MONOSPACE_FONT_PLOTLY, size=MONOSPACE_FONT_SIZE),
205205
title=dict(
206-
font=dict(family=f"{DEFAULT_FONT_PLOTLY}-SemiBold", size=BASE_FONT_SIZE),
206+
font=dict(family=f"{DEFAULT_FONT_PLOTLY}-Medium", size=BASE_FONT_SIZE),
207207
side="right",
208208
),
209209
),

docs/stylesheets/extra.css

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
@font-face {
2-
font-family: "SuisseIntl-Regular";
2+
font-family: "SuisseIntl";
33
src: url("https://www.arcadiascience.com/fonts/SuisseIntl-Regular.woff2")
44
format("woff2");
55
font-weight: normal;
66
font-style: normal;
77
}
88

9+
@font-face {
10+
font-family: "SuisseIntl-Medium";
11+
src: url("https://www.arcadiascience.com/fonts/SuisseIntl-Medium.woff2")
12+
format("woff2");
13+
font-weight: normal;
14+
font-style: normal;
15+
}
16+
17+
@font-face {
18+
font-family: "SuisseIntl-SemiBold";
19+
src: url("https://www.arcadiascience.com/fonts/SuisseIntl-SemiBold.woff2")
20+
format("woff2");
21+
font-weight: normal;
22+
font-style: normal;
23+
}
24+
925
@font-face {
1026
font-family: "SuisseIntl-Thin";
1127
src: url("https://www.arcadiascience.com/fonts/SuisseIntl-Thin.woff2")
@@ -48,7 +64,7 @@
4864

4965
:root {
5066
/* Fonts. */
51-
--md-text-font: "SuisseIntl-Regular", Roboto, Helvetica, Arial, sans-serif;
67+
--md-text-font: "SuisseIntl", Roboto, Helvetica, Arial, sans-serif;
5268
--md-code-font: "SuisseIntlMono", "Roboto Mono", "Liberation Mono", monospace;
5369

5470
/* Primary color shades. */

0 commit comments

Comments
 (0)