# hdoc **Repository Path**: uchihahanzo/hdoc ## Basic Information - **Project Name**: hdoc - **Description**: No description available - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-11-17 - **Last Updated**: 2023-11-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

hdoc logo

hdoc: the modern documentation tool for C++

See [hdoc.io](https://hdoc.io/) for more details. Usage documentation is hosted at [hdoc.io/docs](https://hdoc.io/docs). ## An important notice about this repository The contents of this repository are a subset of a private repository where hdoc's development takes place. ## Overview and features * **Autogenerated API documentation.** hdoc generated API documentation for every function, record, enum, and namespace in your codebase. * **Integrated Markdown pages.** hdoc converts your Markdown pages into a website and puts it next to your API docs. All of your documentation is in one place. * **Instant codebase search.** Instant search-as-you-type lookup of symbols throughout your entire codebase. * **Easy CI integration.** Your documentation is never out of date if you build it with your code. All you need to do is add hdoc to your build job. * **Advanced C++ parser.** hdoc understands the newest C++ features with its advanced LLVM/Clang-based parser. * **Clean, fast output.** hdoc outputs fully static HTML with no required Javascript, ensuring your users never have to wait. ## Quick start ### Linux hdoc depends on LLVM/Clang and OpenSSL, and all other dependencies are vendored in `subprojects/`. hdoc also comes with a Nix Flake which sets up a development environment for you with all of the needed dependencies, and should work on all Linux distributions. Follow the instructions below to build hdoc. ```sh # Build hdoc meson build # Configure the build directory ninja -C build # Compile hdoc binaries and tests ./build/hdoc --verbose # Run hdoc over itself, saving the HTML documentation to ./hdoc-output/ ``` More instructions for using hdoc can be found at [hdoc.io/docs](https://hdoc.io/docs). ### Windows (Unofficial Support) Windows support for hdoc is unofficial and was contributed by [@yqs112358](https://github.com/yqs112358/). Windows is unofficially supported as the hdoc team does not use it for development. hdoc is not tested on Windows and no guarantee is made for its functionality there. However, the following instructions for compiling hdoc on Windows. `MSYS2` and `MinGW-w64-x86_64-gcc` must be installed in order to compile hdoc on Windows. Once the prerequisites have been installed, follow the instructions below to build hdoc: ```sh # Install dependent packages for MinGW pacman -S groff pacman -S unzip pacman -S mingw-w64-x86_64-meson pacman -S mingw-w64-x86_64-cmake pacman -S mingw-w64-x86_64-clang pacman -S mingw-w64-x86_64-clang-analyzer pacman -S mingw-w64-x86_64-clang-tools-extra # Set PATH export PATH=/mingw64/bin:/mingw64/lib:$PATH # You can also add this line into ~/.bashrc # Build hdoc meson build # Configure the build directory ninja -C build # Compile hdoc binaries and tests ./build/hdoc --verbose # Run hdoc over itself, saving the HTML documentation to ./hdoc-output/ ``` Reportedly, `hdoc-online.exe` does not currently work on Windows due to a linking problem. However, `hdoc.exe` should work. ## Running tests hdoc has a suite of unit and integration tests, which can be run using the instructions below. ```sh # Assumes you've already built hdoc cd build # Running indexing tests, unit tests, and JSON serialization/deserialization tests ./hdoc-tests # Running integration tests cd ../tests/integration_tests ./clone-corpus-repos.sh # Pull testing repos from GitHub ./test.sh # Run hdoc over testing repos ``` ## Repository structure ``` hdoc ├── assets # Static HTML/CSS/Favicons used in the generated HTML docs ├── schemas # JSON schema for hdoc's JSON payload output ├── site # Source code for hdoc.io and hdoc's documentation ├── src # C++ source code │   ├── frontend # Parses configuration file and CLI arguments │   ├── indexer # Parses a codebase and extracts documentation from it into an index │   ├── serde # Serialization/Deserialization of hdoc's index into HTML and other formats │   ├── support # Ancillary code used to parallelize indexing │   └── types # Types used by hdoc ├── subprojects # Vendored dependencies └── tests # Testing code    ├── index-tests # Unit tests of hdoc's indexing functionality    ├── integration-tests # Integration testing scripts    ├── json-tests # Tests for JSON serialization and deserialization    └── unit-tests # Unit tests for a small portion of hdoc's codebase ``` ## Attribution hdoc relies on several open source software projects. We thank all of the contributors to these projects for their work. These are listed below in alphabetical order: - [argparse](https://github.com/p-ranav/argparse) - [Bulma](https://bulma.io/) - [Clang](https://clang.llvm.org/) - [cmark-gfm](https://github.com/github/cmark-gfm) - [cpp-httplib](https://github.com/yhirose/cpp-httplib) - [CTML](https://github.com/tinfoilboy/CTML) - [doctest](https://github.com/onqtam/doctest) - [highlight.js](https://github.com/highlightjs/highlight.js) - [KaTeX](https://github.com/KaTeX/KaTeX) - [LLVM](https://llvm.org/) - [minisearch](https://github.com/lucaong/minisearch) - [rapidjson](https://github.com/Tencent/rapidjson) - [spdlog](https://github.com/gabime/spdlog) - [toml++](https://marzer.github.io/tomlplusplus/) More information, including licenses, can be found at [hdoc.io/oss](https://hdoc.io/oss/). ## License hdoc is available under the AGPLv3 license, or a custom commercial license. For more information about commercial licensing, reach out to [contact@hdoc.io](mailto:contact@hdoc.io).