Skip to content

Commit

Permalink
add support for numpy docstring & beautify
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaangupta committed Oct 7, 2024
1 parent df77deb commit cc057f6
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 98 deletions.
4 changes: 1 addition & 3 deletions docs/gen_ref_pages.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
"""Generate the code reference pages."""
import os
from itertools import chain
from pathlib import Path

import mkdocs_gen_files


nav = mkdocs_gen_files.Nav()
mod_symbol = '<code class="doc-symbol doc-symbol-nav doc-symbol-module"></code>'
mod_symbol = ''

root = Path(__file__).parent.parent
src = root
Expand Down
38 changes: 35 additions & 3 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
[data-md-color-scheme="light"] {
--md-primary-fg-color: #90030C;
--md-accent-fg-color: #B31B1B;
:root {
--md-code-font: "Roboto Mono";
--md-default-fg-color: #111;
--md-default-fg-color--light: #000000d0;
--md-default-fg-color--lighter: #00000052;
--md-default-fg-color--lightest: #00000012;
--md-accent-fg-color: #38195A;
--md-accent-fg-color--hover: #E4AF68;
--md-accent-fg-color--transparent: #38195a1a;

--md-default-bg-color: #fff;
--md-default-bg-color--light: #ffffffb3;
--md-default-bg-color--lighter: #ffffff4d;
--md-default-bg-color--lightest: #ffffff1f;
--md-accent-bg-color: #fff;
--md-accent-bg-color--light: #ffffffb3;
}

[data-md-color-scheme="slate"] {
--md-hue: 210;
}

/* Indentation for API Reference. */
.md-content div.doc-contents:not(.first) {
padding-left: 25px;
border-left: .05rem solid var(--md-typeset-table-color);
}

/* Gradient banner */
.md-header {
background: linear-gradient(145deg, rgba(229,119,39,1) 3%, rgba(144,3,12,1) 31%, rgba(133,59,96,1) 51%, rgba(31,67,103,1) 79%, rgba(31,99,120,1) 94%, rgba(32,135,139,1) 100%);
}

.md-tabs {
background: none;
}
12 changes: 10 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ extra_css:

theme:
name: "material"
font:
text: Roboto
code: Roboto Mono
palette:
- media: "(prefers-color-scheme)"
- media: "(prefers-color-scheme: dark)"
toggle:
icon: material/brightness-auto
name: Switch to light mode
Expand Down Expand Up @@ -58,7 +61,12 @@ plugins:
- literate-nav:
nav_file: SUMMARY.md
- section-index
- mkdocstrings
- mkdocstrings:
handlers:
python:
options:
docstring_style: numpy


nav:
- Home: index.md
Expand Down
Loading

0 comments on commit cc057f6

Please sign in to comment.