docsforge icon indicating copy to clipboard operation
docsforge copied to clipboard

Flexible position of the "public api"

Open erez-o opened this issue 5 years ago • 0 comments

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

erez-o avatar Jun 17 '20 06:06 erez-o