diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 00000000..e1ef2238 --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,34 @@ +name: Build and deploy Docs site to GitHub Pages + +on: + workflow_dispatch: + push: + branches: + - main + - docs + +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 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..3a76842f --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,19 @@ +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 + +extra_css: + - _stylesheets/extra.css