{ "info": { "author": "Sergey Kanunnikov", "author_email": "sergey.kanunnikov@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Documentation", "Topic :: Utilities" ], "description": "# \u0421ustomIDs\n\nCustomIDs is a preprocessor that allows to define custom identifiers (IDs) for headings in Markdown source by using Pandoc-style syntax in projects built with MkDocs or another backend that provides HTML output. These IDs may be used in hyperlinks that refer to a specific part of a page.\n\n## Installation\n\n```bash\n$ pip install foliantcontrib.customids\n```\n\n## Usage\n\nTo enable the preprocessor, add `customids` to `preprocessors` section in the project config:\n\n```yaml\npreprocessors:\n - customids\n```\n\nThe preprocessor supports the following options:\n\n```yaml\n - customids:\n stylesheet_path: !path customids.css\n targets:\n - pre\n - mkdocs\n - site\n - ghp\n```\n\n`stylesheet_path`\n: Path to the CSS stylesheet file. This stylesheet should define rules for `.custom_id_anchor_container`, `.custom_id_anchor_container_level_N`, `.custom_id_anchor`, and `.custom_id_anchor_level_N` classes. Here `N` is the heading level (`1` to `6`). Default path is `customids.css`. If stylesheet file does not exist, default built-in stylesheet will be used.\n\n`targets`\n: Allowed targets for the preprocessor. If not specified (by default), the preprocessor applies to all targets.\n\nCustom ID may be specified after a heading content at the same line. Examples of Markdown syntax:\n\n```markdown\n# First Heading {#custom_id_for_first_heading}\n\nA paragraph.\n\n## Second Heading {#custom_id_for_second_heading}\n\nSome another paragraph.\n```\n\nThis Markdown source will be finally transformed into the HTML code:\n\n```html\n
A paragraph.
\n\nSome another paragraph.
\n```\n\n(Note that CustomIDs preprocessor does not convert Markdown syntax into HTML; it only inserts HTML tags `