-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Setup mkdocs with mkdocs-material theme
This changes the framework used to generate the klipper3d site. Signed-off-by: Damien Martin <damlobster@gmail.com>
- Loading branch information
1 parent
0a5752d
commit a209dc2
Showing
9 changed files
with
169 additions
and
160 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: klipper3d deploy | ||
on: | ||
push: | ||
branches: | ||
- docs-mkdocs | ||
paths: | ||
- docs/** | ||
- mkdocs.yml | ||
- .github/workflows/klipper3d-deploy.yaml | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('docs/_klipper3d/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: pip install -r docs/_klipper3d/requirements.txt | ||
- name: Build and deploy klipper3d | ||
run: | | ||
mkdocs gh-deploy --force --remote-branch gh-pages --verbose |
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,15 @@ | ||
[data-md-color-scheme="slate"] { | ||
--md-primary-fg-color: hsla(var(--md-hue),15%,12%,1); | ||
--md-default-bg-color: hsla(var(--md-hue),17%,17%,1); | ||
--md-typeset-a-color: steelblue; | ||
--md-accent-fg-color: lightblue; | ||
} | ||
|
||
img { | ||
background-color: white; | ||
} | ||
|
||
.center-image { | ||
margin: 0 auto; | ||
display: block; | ||
} |
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,3 @@ | ||
|
||
def rewrite_github_links(markdown: str, page, config, files): | ||
return markdown.replace('](../', f"]({config['repo_url']}blob/master/") |
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,5 @@ | ||
mkdocs==1.2.2 | ||
mkdocs-material==7.2.0 | ||
mkdocs-section-index==0.3.1 | ||
mkdocs-simple-hooks==0.1.3 | ||
mkdocs-exclude==1.0.2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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,117 @@ | ||
site_name: Klipper documentation | ||
theme: | ||
name: material | ||
palette: | ||
- media: "(prefers-color-scheme: light)" | ||
scheme: default | ||
primary: white | ||
accent: blue | ||
toggle: | ||
icon: material/lightbulb | ||
name: Switch to dark mode | ||
- media: "(prefers-color-scheme: dark)" | ||
scheme: slate | ||
primary: grey | ||
accent: light blue | ||
toggle: | ||
icon: material/lightbulb-outline | ||
name: Switch to light mode | ||
# primary: white | ||
# accent: blue | ||
logo: img/klipper.svg | ||
favicon: img/favicon.ico | ||
icon: | ||
repo: fontawesome/brands/github | ||
features: | ||
- navigation.instant | ||
- navigation.tabs | ||
#- navigation.expand | ||
- navigation.top | ||
# if enabled, the TOC doesn't work for some pages | ||
# - toc.integrate | ||
- search.suggest | ||
- search.highlight | ||
- search.share | ||
extra_css: | ||
- _klipper3d/css/extra.css | ||
repo_url: https://github.com/KevinOConnor/klipper | ||
repo_name: KevinOConnor/klipper | ||
edit_uri: blob/master/docs/ | ||
plugins: | ||
- search | ||
- section-index | ||
- mkdocs-simple-hooks: | ||
hooks: | ||
on_page_markdown: "docs._klipper3d.mkdocs_hooks:rewrite_github_links" | ||
- exclude: | ||
glob: | ||
- README.md | ||
markdown_extensions: | ||
- toc: | ||
permalink: True | ||
toc_depth: 6 | ||
#- pymdownx.snippets | ||
- attr_list | ||
extra: | ||
analytics: | ||
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/#site-search-tracking | ||
provider: google | ||
property: UA-131268251-1 | ||
# version: | ||
# provider: mike | ||
nav: | ||
- Overview: | ||
- Overview.md | ||
- Features.md | ||
- FAQ.md | ||
- Releases.md | ||
- Config_Changes.md | ||
- Contact.md | ||
- Configuration and Tuning: | ||
- Installation.md | ||
- Configuration reference: | ||
- Config_Reference.md | ||
- Rotation_Distance.md | ||
- Config_checks.md | ||
- Bed level: | ||
- Bed_Level.md | ||
- Delta_Calibrate.md | ||
- Probe_Calibrate.md | ||
- BLTouch.md | ||
- Manual_Level.md | ||
- Bed_Mesh.md | ||
- Endstop_Phase.md | ||
- Resonance compensation: | ||
- Resonance_Compensation.md | ||
- Measuring_Resonances.md | ||
- Pressure_Advance.md | ||
- Slicers.md | ||
- Command templates: | ||
- Command_Templates.md | ||
- Status_Reference.md | ||
- TMC_Drivers.md | ||
- skew_correction.md | ||
- Using_PWM_Tools.md | ||
- G-Codes.md | ||
- Developer documentation: | ||
- Code_Overview.md | ||
- Kinematics.md | ||
- Protocol.md | ||
- API_Server.md | ||
- MCU_Commands.md | ||
- CANBUS_protocol.md | ||
- Debugging.md | ||
- Benchmarks.md | ||
- CONTRIBUTING.md | ||
- Packaging.md | ||
- Device specific documents: | ||
- Example_Configs.md | ||
- SDCard_Updates.md | ||
- RPi_microcontroller.md | ||
- beaglebone.md | ||
- Bootloaders.md | ||
- CANBUS.md | ||
- TSL1401CL_Filament_Width_Sensor.md | ||
- HallFilamentWidthSensor.md | ||
|
||
|