Skip to content

Configuration

To configure apidescribed one can use yaml just after apidescribed: directive:

 ::: apidescribed: mkdocs_apidescribed.config
     debug: true
     categorize: false
     only: 
         - DEFAULT_CONFIG
     location:
         mode: module

All available configuration options are listed below:

DEFAULT_CONFIG

mkdocs_apidescribed.config
DEFAULT_CONFIG = {
    'debug': False,  # show traceback
    'skip': False,  # do not describe (allows instructions to be ignored)
    'format': 'auto',  # docstrings format (sphinx, google, numpy)

    'heading_base': 2,  # headings base level
    'autolinks': True,  # automatically create hyperlinks
    'categorize': True,  # show symbol types (categories) titles

    'location': {
        # signature block title options
        # hidden - do not show the block
        # module - show module "path"
        # file - show filepath
        'mode': 'hidden',
        'line': False,  # show line number of source file
    },
    'icons': {
        'attr': ':material-alpha:',  # for attributes
        'func': ':material-function:',  # for functions
        'cls': ':material-delta:',  # for classes
        'property': ':material-alpha-p-box-outline:',  # for class properties
        'classmethod': ':material-alpha-c-box-outline:',  # for class methods
        'staticmethod': ':material-alpha-s-box-outline:',  # for static methods
        'inherited': ':material-subdirectory-arrow-left:',  # for class inherited items
        'clsbases': ':material-alpha-b-box:',  # for base classes
        'raises': ':material-lightning-bolt:',  # for descriptions of raised exceptions
        'returns': ':material-arrow-right-thin:',  # for descriptions of returned value
    },

    'undocumented': False,  # describe items without docstrings
    'inherited': True,  # describe inherited items (e.g. from parent classes)
    'types': [
        # symbol types to describe (order respected)
        'attributes',
        'functions',
        'classes',
    ],
    'ignore': [
        # patterns of symbol names to ignore
        '_*',
    ],
    'only': [
        # symbol names to describe (others will be ignored)
    ],
}

Default configuration for mkdocs-apidescribed.