Skip to content

FYI: Best alternative to undeveloped pydoc-markdown YAML is mkapi #7

@mcarans

Description

@mcarans

As a long time tqdm and pydoc-markdown YAML user, I thought I'd share that the best alternative I have found for the latter (now that it is no longer developed) is mkapi using its page mode.

A pydoc-markdown.yaml file that looks like this:

loaders:
  - type: python
    search_path:
      - ../src
    packages:
      - hdx.utilities
renderer:
  type: mkdocs
  output_directory: docs
  mkdocs_config:
    site_name: HDX Python Utilities
    theme: material
    repo_url: "https://github.com/OCHA-DAP/hdx-python-utilities"
  markdown:
    source_linker:
      type: github
      repo: OCHA-DAP/hdx-python-utilities
  pages:
    - title: Home
      name: index
      source: index.md
    - title: API Documentation
      children:
        - title: Downloading files
          contents:
            - hdx.utilities.downloader.*
        - title: Retrieving files
          contents:
            - hdx.utilities.retriever.*
        - title: Loading and saving JSON and YAML
          contents:
            - hdx.utilities.loader.*
            - hdx.utilities.saver.*

becomes an mkdocs.yaml like this:

site_name: HDX Python Utilities
repo_url: https://github.com/OCHA-DAP/hdx-python-utilities/
repo_name: OCHA-DAP/hdx-python-utilities
docs_dir: .
site_dir: ../site
theme:
  name: material
  highlightjs: true
plugins:
  - search
  - mkapi
nav:
  - Home: index.md
  - API Documentation:
    - Downloading files: $src/hdx.utilities.downloader.*
    - Retrieving files: $src/hdx.utilities.retriever.*
    - Loading and saving JSON and YAML:
      - Loading: $src/hdx.utilities.loader.*
      - Saving: $src/hdx.utilities.saver.*

For more info, see here. Hope this is useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions