-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- bumped mkdocs-material to 9.5.7 - bumped other docs dependencies to latest versions - bumped to new mkdocstrings python provider - rewrote doc-stubs generator based on mkdocstrings example recipe, fixed weird __init__ behavior - light/dark theme support with a toggle - new CSS, very pretty! - fixed broken absolute links - some small text changes here and there
- Loading branch information
Showing
19 changed files
with
214 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: "MkDocs Deploy" | ||
description: "Deploy docs (dev)" | ||
push: | ||
branches: | ||
- "main" | ||
|
@@ -30,9 +30,7 @@ jobs: | |
|
||
- name: Install dependencies | ||
run: | | ||
pip install git+https://github.com/squidfunk/[email protected] | ||
pip install mkdocstrings[python-legacy] httpx mkdocs-literate-nav mkdocs-gen-files mike | ||
pip install mkdocs-material==9.5.7 mkdocs-section-index==0.3.8 mkdocstrings==0.24.0 mkdocstrings-python==1.8.0 mkdocs-literate-nav==0.6.1 mkdocs-gen-files==0.5.0 mkdocs-autorefs==0.5.0 mike==2.0.0 | ||
- name: Configure Git user | ||
run: | | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: "Deploy Docs (release)" | ||
description: "Deploy docs (release)" | ||
|
||
jobs: | ||
mkdocs: | ||
|
@@ -24,8 +24,7 @@ jobs: | |
|
||
- name: Install dependencies | ||
run: | | ||
pip install git+https://github.com/squidfunk/[email protected] | ||
pip install mkdocstrings[python-legacy] httpx mkdocs-literate-nav mkdocs-gen-files mike | ||
pip install mkdocs-material==9.5.7 mkdocs-section-index==0.3.8 mkdocstrings==0.24.0 mkdocstrings-python==1.8.0 mkdocs-literate-nav==0.6.1 mkdocs-gen-files==0.5.0 mkdocs-autorefs==0.5.0 mike==2.0.0 | ||
- name: Configure Git user | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from pathlib import Path | ||
|
||
import mkdocs_gen_files | ||
|
||
nav = mkdocs_gen_files.Nav() | ||
|
||
src = Path(__file__).parent.parent.parent / "roblox" | ||
|
||
for path in sorted(src.rglob("*.py")): | ||
module_path = path.relative_to(src).with_suffix("") | ||
doc_path = path.relative_to(src).with_suffix(".md") | ||
full_doc_path = Path("reference", doc_path) | ||
|
||
parts = tuple(module_path.parts) | ||
|
||
if parts[-1] == "__init__": | ||
parts = parts[:-1] | ||
doc_path = doc_path.with_name("index.md") | ||
full_doc_path = full_doc_path.with_name("index.md") | ||
elif parts[-1] == "__main__": | ||
continue | ||
|
||
if not parts: | ||
print(f"skipping {module_path.parts}") | ||
continue | ||
|
||
nav[parts] = doc_path.as_posix() | ||
|
||
with mkdocs_gen_files.open(full_doc_path, "w") as fd: | ||
ident = ".".join(parts) | ||
fd.write(f"::: roblox.{ident}") | ||
|
||
mkdocs_gen_files.set_edit_path(full_doc_path, path) | ||
|
||
with mkdocs_gen_files.open("reference/SUMMARY.md", "w") as nav_file: | ||
nav_file.writelines(nav.build_literate_nav()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
:root { | ||
/* font-size: 125% !important; */ | ||
} | ||
|
||
[data-md-color-scheme=slate] { | ||
--md-code-bg-color: hsl(0 0% 100% / 1.5%); | ||
--md-default-bg-color: hsl(0 0% 6%); | ||
|
||
--md-footer-bg-color: hsl(0 0% 12% / 75%); | ||
--md-footer-bg-color--dark: transparent; | ||
|
||
} | ||
|
||
[data-md-color-scheme=slate] .md-header, | ||
[data-md-color-scheme=slate] .md-tabs { | ||
background: hsl(0 0% 10% / 75%); | ||
} | ||
|
||
[data-md-color-scheme=slate] .md-typeset table { | ||
--md-default-bg-color: hsl(0 0% 7.5%); | ||
--md-typeset-table-color: hsl(0 0% 95% / 3%); | ||
} | ||
|
||
[data-md-color-scheme=slate] .md-typeset details { | ||
background: hsl(0 0% 100% / 2%); | ||
} | ||
|
||
[data-md-color-scheme=default] { | ||
--md-footer-bg-color: hsl(0 0% 97%); | ||
--md-footer-bg-color--dark: transparent; | ||
--md-footer-fg-color: hsl(0 0% 0%); | ||
--md-footer-fg-color--lighter: hsl(0 0% 33%); | ||
--md-footer-fg-color--light: hsl(0 0% 0%); | ||
--md-code-bg-color: hsl(0 0% 0% / 2.33%); | ||
} | ||
|
||
[data-md-color-scheme=default] .md-header, | ||
[data-md-color-scheme=default] .md-tabs { | ||
background: hsl(0 0% 100% / 75%); | ||
} | ||
|
||
[data-md-color-scheme=default] .md-search__form { | ||
background: hsl(0 0% 0% / 5%); | ||
} | ||
|
||
[data-md-color-scheme=default] .md-search__form:hover { | ||
background: hsl(0 0% 0% / 10%); | ||
} | ||
|
||
[data-md-color-scheme=default] .md-typeset details { | ||
background: hsl(0 0% 0% / 0.5%); | ||
} | ||
|
||
.md-header, .md-tabs { | ||
backdrop-filter: blur(32px); | ||
-webkit-backdrop-filter: blur(32px); | ||
} | ||
|
||
.md-typeset table { | ||
border-radius: .3rem !important; | ||
} | ||
|
||
.md-banner strong { | ||
white-space: nowrap; | ||
} | ||
|
||
.md-banner a { | ||
color: inherit; | ||
font-size: 0.8rem; | ||
} | ||
|
||
.md-typeset .admonition, .md-typeset details { | ||
border-width: 1px; | ||
border-radius: .3rem !important; | ||
overflow: clip; | ||
} | ||
|
||
.md-typeset details { | ||
border: none; | ||
} | ||
|
||
.admonition-title { | ||
border-radius: 0rem !important; | ||
} | ||
|
||
.md-header--shadow { | ||
box-shadow: 0 0 .2rem #0000001a, 0 .2rem .4rem #0001; | ||
} | ||
|
||
.md-search__form { | ||
border-radius: .15rem !important; | ||
} | ||
[data-md-toggle=search]:checked~.md-header .md-search__form { | ||
border-bottom-left-radius: 0 !important; | ||
border-bottom-right-radius 0 !important; | ||
} | ||
|
||
.doc-contents .quote .highlight { | ||
margin: 0; | ||
margin-left: -.6rem; | ||
margin-right: -.6rem; | ||
--md-code-bg-color: transparent; | ||
} | ||
|
||
.doc-contents .quote .highlighttable { | ||
margin: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.