From 0c2da8ce1e064879b7525d1dd92ba2eca98fe170 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Wed, 28 Jan 2026 21:20:36 +1300 Subject: [PATCH 1/5] add support for mkdocs --- docs/_assets/meshcore_tm.svg | 14 ++++++++++++++ docs/_stylesheets/extra.css | 11 +++++++++++ docs/index.md | 13 +++++++++++++ mkdocs.yml | 20 ++++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 docs/_assets/meshcore_tm.svg create mode 100644 docs/_stylesheets/extra.css create mode 100644 docs/index.md create mode 100644 mkdocs.yml diff --git a/docs/_assets/meshcore_tm.svg b/docs/_assets/meshcore_tm.svg new file mode 100644 index 00000000..b7e252d9 --- /dev/null +++ b/docs/_assets/meshcore_tm.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/docs/_stylesheets/extra.css b/docs/_stylesheets/extra.css new file mode 100644 index 00000000..55d1b147 --- /dev/null +++ b/docs/_stylesheets/extra.css @@ -0,0 +1,11 @@ +:root { + --md-primary-fg-color: #1F2937; + --md-primary-fg-color--light: #1F2937; + --md-primary-fg-color--dark: #1F2937; + --md-accent-fg-color: #1F2937; +} + +/* hide git repo version */ +.md-source__fact--version { + display: none; +} diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..b4fb262b --- /dev/null +++ b/docs/index.md @@ -0,0 +1,13 @@ +# Welcome + +Welcome to the MeshCore documentation. + +## Building and viewing Docs + +``` +pip install mkdocs +pip install mkdocs-material +``` + +* `mkdocs serve` - Start the live-reloading docs server. +* `mkdocs build` - Build the documentation site. diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..9cc7b3ad --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,20 @@ +site_name: MeshCore Docs +site_url: https://meshcore-dev.github.io/meshcore/ +site_description: Documentation for the open source MeshCore firmware + +repo_name: meshcore-dev/meshcore +repo_url: https://github.com/meshcore-dev/meshcore/ +edit_uri: edit/main/docs/ + +theme: + name: material + logo: _assets/meshcore_tm.svg + features: + - content.action.edit + - content.code.copy + - search.highlight + - search.suggest + - toc.integrate + +extra_css: + - _stylesheets/extra.css From a87c0fe2d6d7b11014d874c16f9b3f41c0df2484 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Wed, 28 Jan 2026 21:25:44 +1300 Subject: [PATCH 2/5] separate table of contents --- mkdocs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 9cc7b3ad..3a76842f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -14,7 +14,6 @@ theme: - content.code.copy - search.highlight - search.suggest - - toc.integrate extra_css: - _stylesheets/extra.css From 132c8961e87cb8b165db8d43769acaacd81eca01 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Wed, 28 Jan 2026 21:37:21 +1300 Subject: [PATCH 3/5] add workflow to build and deploy docs to github pages --- .github/workflows/github-pages.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/github-pages.yml diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 00000000..b5b742f5 --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,32 @@ +name: Build and deploy Docs site to GitHub Pages + +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + github-pages: + runs-on: ubuntu-latest + steps: + + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + ruby-version: 3.x + + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + + - name: Build and Deploy + run: | + pip install mkdocs-material + mkdocs gh-deploy --force From c35c1961de3bb86c90e81e833519d35fbb238651 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Wed, 28 Jan 2026 21:39:04 +1300 Subject: [PATCH 4/5] add docs branch for testing --- .github/workflows/github-pages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index b5b742f5..a80c2098 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - docs permissions: contents: write From 706b5a39c69db2b3a9313147c2d1fa951b577a81 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Wed, 28 Jan 2026 21:44:19 +1300 Subject: [PATCH 5/5] allow manual deploy --- .github/workflows/github-pages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index a80c2098..e1ef2238 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -1,6 +1,7 @@ name: Build and deploy Docs site to GitHub Pages on: + workflow_dispatch: push: branches: - main