From 8790dfe05537c2b1149db10920ff55dc4787e696 Mon Sep 17 00:00:00 2001 From: timetravelCat Date: Sun, 8 Dec 2024 08:41:24 +0900 Subject: [PATCH] Add MkDocs configuration and documentation structure --- .github/workflows/docs.yml | 30 ++++++++++++++++++++++++++++ README.md | 7 +++++-- docs/index.md | 40 ++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 10 ++++++++++ 4 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 docs/index.md create mode 100644 mkdocs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..c3541ab --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,30 @@ +# https://github.com/mhausenblas/mkdocs-template?tab=readme-ov-file +# https://github.com/marketplace/actions/deploy-mkdocs + +name: Publish docs via GitHub Pages +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + build: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - name: Checkout main + uses: actions/checkout@v4 + + - name: Deploy docs + uses: mhausenblas/mkdocs-deploy-gh-pages@master + # Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CONFIG_FILE: mkdocs.yml + EXTRA_PACKAGES: build-base + # CUSTOM_DOMAIN: optionaldomain.com + # GITHUB_DOMAIN: github.myenterprise.com + # REQUIREMENTS: folder/requirements.txt diff --git a/README.md b/README.md index 92fc5fd..fea3f6a 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,8 @@ This template is designed with a primary focus on enabling individuals to set up ┃ ┣ 📜Version.h.in ┃ ┣ 📜clang-tidy.cmake ┃ ┗ 📜cppcheck.cmake + ┣ 📦docs + ┃ ┣ 📜index.md ┣ 📂include ┃ ┗ 📂ExampleProject ┃ ┃ ┗ 📜Version.h @@ -95,7 +97,8 @@ This template is designed with a primary focus on enabling individuals to set up ┣ 📜.pre-commit-config.yaml ┣ 📜CMakeLists.txt ┣ 📜LICENSE - ┗ 📜README.md + ┣ 📜README.md + ┗ 📜mkdocs.yml --- ## 🚀 Getting Started @@ -128,6 +131,6 @@ For any inquiries or support, please contact timetravelCat@gmail.com ## ✅ TODO - [ ] Automatically detect CUDA and CUDA hardware. - [ ] ROS2 branch, for ROS2-based packages. -- [ ] Project documentation template. +- [x] Project documentation template (using mkdocs). - [ ] Option for direct use of Docker image including all major features. - [x] Add CI/CD pipeline for automated testing and deployment. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..037b2b5 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,40 @@ +## Sample + +One more, finally. Or not? :) + +Now: + +``` +$ some +``` + +Look what she said: + +> This is it! + +### Subtitle + +And now this: + +- One +- Two +- Three + + +#### As well + +#### As this + +### Another + +[a link](https://aws.com) + +More? + + +Can we now have `the build`? + +NOW! + + +Not gonna work, is it? diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..5ea8e33 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,10 @@ +site_name: Test docs +site_description: "A docs test" +site_author: "timetravelCat" +docs_dir: docs/ +repo_name: "timetravelCat/UPT" +repo_url: "https://github.com/timetravelCat/UPT" +nav: + - Home: index.md +theme: + name: "material"