Skip to main content

A markdown extension for python documentation

Project description

jetblack-markdown

Markdown extensions for automatic document generation (read the docs).

Markdown Extension

A markdown extension is provided for automatically documenting python code.

Modules are referred to as follows:

# A Top Level Module

@[jetblack_markdown]

# A Package

@[jetblack_markdown.autodoc]

# A function

@[jetblack_markdown.autodoc:makeExtension]

# A class

@[jetblack_markdown.autodoc.metadata:PropertyDescriptor]

mkdocs integration

This site was generated using mkdocs and the following config:

site_name: jetblack-markdown

docs_dir: documentation
site_dir: docs

markdown_extensions:
  - admonition
  - codehilite
  - jetblack_markdown.autodoc:
      class_from_init: true
      ignore_dunder: true
      ignore_private: true
      ignore_all: false
      prefer_docstring: true
      template_folder: null

extra_css:
    - css/custom.css

Configuration

There are some configuration parameters.

  • class_from_init (bool, optional): If True use the docstring from the __init__ function for classes. Defaults to True.
  • ignore_dunder (bool, optional): If True ignore __XXX__ functions. Defaults to True.
  • ignore_private (bool, optional): If True ignore methods (those prefixed _XXX). Defaults to True.
  • ignore_all (bool): If True ignore the __all__ member.
  • prefer_docstring (bool): If true prefer the docstring.
  • template_folder(Optional[str], optional): Specify a custom template folder. The template "main.jinja2" will be rendered passing an obj parameter which is a jetblack.markdown.metadata.Descriptor

Customizing

All the rendering is done with jinja2 templates. Start by copying the current templates from jetblack_markdown/templates and specify the template_folder in the mkdocs.yml.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jetblack-markdown-1.1.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

jetblack_markdown-1.1.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file jetblack-markdown-1.1.0.tar.gz.

File metadata

  • Download URL: jetblack-markdown-1.1.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.6 Darwin/21.6.0

File hashes

Hashes for jetblack-markdown-1.1.0.tar.gz
Algorithm Hash digest
SHA256 dcd4a8a8a7a3177e478aca9655a7d5eadbf4677063406b4d6e52661f191f665d
MD5 7454bbeae824e131935031c21056ba7b
BLAKE2b-256 bb1a60c28c0ff5a5ae60a772954bc840e9a6e1bed9c61ebabd3d8e532def33fd

See more details on using hashes here.

File details

Details for the file jetblack_markdown-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jetblack_markdown-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbc134e02913bc2801dcf6c9e63d8e9f7dcff6d9c8df02c666b2c434dc303e13
MD5 557cee370913639a2195b37e3bf1b443
BLAKE2b-256 c3321ba07dbef48f30d6da1e544c1ab7703e9e05f94dd4ec82e343a2ca5ba4c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page