diff --git a/.github/workflows/gendoc.yml b/.github/workflows/gendoc.yml new file mode 100644 index 00000000..0e38f116 --- /dev/null +++ b/.github/workflows/gendoc.yml @@ -0,0 +1,36 @@ +name: gendoc + +on: + push: + branches: [ gendoc ] + tags: + - '*' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + gendoc: + name: Generate documentation + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - 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 : Install dependencies + run: sudo apt-get install -y git cmake build-essential doxygen graphviz python3-dev mkdocs mkdocs-material + + - name: Generate documentation + run: cd docs && make all + + - uses: actions/upload-artifact@v4 + with: + name: site + path: ./site/* + + - name: Deploy documentation + run: cd docs && make deploy diff --git a/README.md b/README.md index 8e4e4b73..4cdf5458 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ This is a collection of [GTSAM](https://gtsam.org/) factors and optimizers for r Tested on Ubuntu 22.04 / 24.04 and CUDA 12.2, and NVIDIA Jetson Orin with **GTSAM 4.2a9**. -[![Build](https://github.com/koide3/gtsam_points/actions/workflows/build.yml/badge.svg)](https://github.com/koide3/gtsam_points/actions/workflows/build.yml) + +[![Doc](https://img.shields.io/badge/API_list-Doxygen-blue)](https://koide3.github.io/gtsam_points/doc_cpp/index.html) [![Build](https://github.com/koide3/gtsam_points/actions/workflows/build.yml/badge.svg)](https://github.com/koide3/gtsam_points/actions/workflows/build.yml) ## Factors diff --git a/docs/Doxyfile b/docs/Doxyfile index 1e219094..bc987c20 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -1184,7 +1184,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = html +HTML_OUTPUT = doc_cpp # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..32ea0cdd --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,22 @@ +.PHONY: help +help: + @echo "make cpp|all" + +.PHONY: cpp +cpp: + @echo "Building C++ documentation..." + doxygen Doxyfile doc_cpp + +.PHONY: mkdocs +mkdocs: + @echo "Building MkDocs documentation..." + cd .. && mkdocs build + +.PHONY: all +all: cpp mkdocs + @echo "All documentation built." + +.PHONY: deploy +deploy: + @echo "Deploying documentation..." + cd .. && mkdocs gh-deploy --force diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..ec5bade9 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,5 @@ +# gtsam_points + +## Documentation + +- [C++](doc_cpp/index.html) diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..58f3ef1d --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,41 @@ +site_name: "gtsam_points" +site_author: k.koide +repo_url: https://github.com/koide3/gtsam_points +site_url: https://github.com/koide3/gtsam_points +site_description: "gtsam_points: A collection of GTSAM factors and optimizers for point-cloud-based SLAM" + +theme: + name: material + palette: + primary: indigo + front: + text: Roboto + +use_directory_urls: false + +markdown_extensions: + - meta + - attr_list + - admonition + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences + +copyright: Copyright © 2024 Kenji Koide +extra: + social: + - icon: material/home + link: https://staff.aist.go.jp/k.koide/ + - icon: fontawesome/brands/github + link: https://github.com/koide3/gtsam_points + - icon: fontawesome/brands/twitter + link: https://twitter.com/k_koide3 + +extra_css: + - "css/custom.css" + - "https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" + +nav: + - 'index.md'