erez-o / docsforge

Modern C/C++ documentation generator for open source projects.
https://docsforge.com/
27 stars 1 forks source link

Flexible position of the "public api" #10

Open erez-o opened 4 years ago

erez-o commented 4 years ago

From discord:

Instead of having a single section "Public API" for the API documentation, would it be possible to have multiple, user defined sections? That way I could create one of the public API, one for modules (perhaps even include modules from other repos), and one section for internals

Solution: Extend the yaml configuration file:

sidebar:
  Documentation:
  - Readme: README.md
  - Quickstart: docs/Quickstart.md
  - Manual: Manual.md

  Public API:
  - autodocSettings1
  - autodocSettings2

autodocSettings:
  C API:
    baseUrl: api-c
    language: c
    ...
  C++ API:
    baseUrl: api-cpp
    language: cpp
    ...

Or another example:

sidebar:
  Documentation:
  - Readme: README.md
  - Quickstart: docs/Quickstart.md
  - Manual: Manual.md

  Public API:
  - General API:
    - autodocSettings1
    - autodocSettings2
  - Modules API:
    - autodocSettings3
    - autodocSettings4

autodocSettings:
  C API:
    baseUrl: api-c
    language: c
    ...
  C++ API:
    baseUrl: api-cpp
    language: cpp
    ...
  Module1 API:
    baseUrl: api-c
    language: c
    ...
  Module2 API:
    baseUrl: api-cpp
    language: cpp
    ...

Or another example:

sidebar:
  Documentation:
  - Readme: README.md
  - Quickstart: docs/Quickstart.md
  - Manual: Manual.md

  General API:
    - autodocSettings1
    - autodocSettings2
  Modules API:
    - autodocSettings3
    - autodocSettings4