Skip to content

Commit

Permalink
Add docs style overrides and fix notebook rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Jun 5, 2024
1 parent 0db82f4 commit e8dd48f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/.pages
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
nav:
- index.md
- reference.md
- "Example notebook": examples/client_example.ipynb
- changelog.md
- "Summary": index.md
- "API Reference": reference.md
- "Example notebook": examples/client_example
- "Changelog": changelog.md
32 changes: 32 additions & 0 deletions docs/css/reference.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
div.doc-contents:not(.first) {
padding-left: 25px;
border-left: 4px solid rgba(230, 230, 230, 0.5);
margin-bottom: 80px;
}

.jupyter-wrapper {
--jp-code-font-family-default: 'Iosevka Web', monospace;
}

pre {
font-family: 'Iosevka Web', monospace;
}

td code {
word-break: normal !important;
}

code {
max-height: 20em;
}

.md-grid {
max-width: 70rem;
}

:root {
--md-text-font: "Figtree", sans-serif;
--md-code-font: "Iosevka Web", monospace;
--jp-code-font-family-default: 'Iosevka Web', monospace;
--jp-code-font-family: 'Iosevka Web', monospace;
}
21 changes: 21 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% extends "base.html" %}

{% block extrahead %}
<link href="https://pvinis.github.io/iosevka-webfont/3.4.1/iosevka.css" rel="stylesheet" />

<style>
:root {
--jp-code-font-family-default: 'Iosevka Web', monospace;
--md-text-font: "Figtree", sans-serif;
--md-code-font: "Iosevka Web", monospace;
--jp-code-font-family-default: 'Iosevka Web', monospace;
--jp-code-font-family: 'Iosevka Web', monospace;
}

.jp-OutputArea-output pre {
font-family: 'Iosevka Web', monospace !important;
font-size: 0.8em;
}

</style>
{% endblock %}
11 changes: 7 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: datalab-api
site_description: Documentation for the datalab Python API
site_name: datalab Python API
site_description: Documentation for the *datalab* Python API
site_url: https://datalab-api.readthedocs.io

theme:
Expand All @@ -25,10 +25,10 @@ theme:
name: Switch to light mode
primary: amber
accent: brown
custom_dir: docs/overrides

font:
text: Figtree
code: Iosevka Web
features:
- content.code.copy

Expand All @@ -40,7 +40,7 @@ docs_dir: "./docs"
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/the-grey-group
link: https://github.com/datalab-org

markdown_extensions:
- admonition
Expand Down Expand Up @@ -99,6 +99,9 @@ plugins:
execute: false
allow_errors: false
include_requirejs: true
include_source: true
#- privacy:
# enabled: true

watch:
- src

0 comments on commit e8dd48f

Please sign in to comment.