Skip to content

Commit 2eb1d80

Browse files
authored
Merge pull request #1579 from liamcottle/docs
Add mkdocs for automated documentation site
2 parents e738a74 + 706b5a3 commit 2eb1d80

5 files changed

Lines changed: 91 additions & 0 deletions

File tree

.github/workflows/github-pages.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and deploy Docs site to GitHub Pages
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- docs
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
github-pages:
15+
runs-on: ubuntu-latest
16+
steps:
17+
18+
- name: Checkout Repo
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v5
23+
with:
24+
ruby-version: 3.x
25+
26+
- name: Configure Git Credentials
27+
run: |
28+
git config user.name github-actions[bot]
29+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
30+
31+
- name: Build and Deploy
32+
run: |
33+
pip install mkdocs-material
34+
mkdocs gh-deploy --force

docs/_assets/meshcore_tm.svg

Lines changed: 14 additions & 0 deletions
Loading

docs/_stylesheets/extra.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:root {
2+
--md-primary-fg-color: #1F2937;
3+
--md-primary-fg-color--light: #1F2937;
4+
--md-primary-fg-color--dark: #1F2937;
5+
--md-accent-fg-color: #1F2937;
6+
}
7+
8+
/* hide git repo version */
9+
.md-source__fact--version {
10+
display: none;
11+
}

docs/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Welcome
2+
3+
Welcome to the MeshCore documentation.
4+
5+
## Building and viewing Docs
6+
7+
```
8+
pip install mkdocs
9+
pip install mkdocs-material
10+
```
11+
12+
* `mkdocs serve` - Start the live-reloading docs server.
13+
* `mkdocs build` - Build the documentation site.

mkdocs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
site_name: MeshCore Docs
2+
site_url: https://meshcore-dev.github.io/meshcore/
3+
site_description: Documentation for the open source MeshCore firmware
4+
5+
repo_name: meshcore-dev/meshcore
6+
repo_url: https://github.com/meshcore-dev/meshcore/
7+
edit_uri: edit/main/docs/
8+
9+
theme:
10+
name: material
11+
logo: _assets/meshcore_tm.svg
12+
features:
13+
- content.action.edit
14+
- content.code.copy
15+
- search.highlight
16+
- search.suggest
17+
18+
extra_css:
19+
- _stylesheets/extra.css

0 commit comments

Comments
 (0)