{ "info": { "author": "Sascha Cowley", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Filters", "Topic :: Text Processing :: Markup :: HTML" ], "description": "# Headdown: Downgrade Headings\n\nAutomatically demote those pesky headings!\n\n## What?\n\nThis is a plugin for [Python-Markdown][pmd] to automatically downgrade headings by a given number of levels. This is useful when, for example, using a static site generator, such as [Pelican][pelican].\n\n## Why?\n\nI didn't want to have to write standalone markdown files whose structure was dictated by the constraints of my website; nor did I want to sacrifice the structure of my website because of my markdown files. A number of [3rd party Python-Markdown extensions][3ppmdx] already exist to do this ([here][p1] and [here][p2]), but I was unable to get them to work with Python-Markdown 3.\n\n## How?\n\nJust add `mdx_headdown` to your `markdown` `extensions` and feel the magic.\n\nYou can optionally provide an `offset` parameter, which tells `headdown` by how many levels to downgrade all headings. The default is `1`.\n\nNote\n: This value will be converted to an integer and absolutised. Failure to provide a numeric option may lead to unexpected results.\n\nFor example, if using with [Pelican][pelican], your [configuration][pelicanconf] might look something like this:\n\n```python\n...\nMARKDOWN = {\n 'extensions': ['mdx_headdown',],\n 'extension_configs': {\n 'mdx_headdown': {\n 'offset': 2,\n },\n },\n}\n...\n```\n\n## Credit\n\nThanks are owed to the author of [mdx_downheader][p2], whose code I examined for inspiration; and the contributers to the [default python-markdown extensions][pmdx], whose code I examined to get a better idea of what the [manual][pmdapi] was talking about.\n\nThis project is copyright 2018 by Sascha Cowley under the [MIT License](licence.txt).\n\n\n[pmd]: https://python-markdown.github.io/\n[pelican]: https://getpelican.com/\n[p1]: https://code.google.com/archive/p/markdown-downheader/\n[p2]: https://github.com/cprieto/mdx_downheader\n[pmdx]: https://python-markdown.github.io/extensions/\n[pmdapi]: https://python-markdown.github.io/extensions/\n[pelicanconf]: http://docs.getpelican.com/en/stable/settings.html\n[3ppmdx]: https://github.com/Python-Markdown/markdown/wiki/third-party-extensions\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SaschaCowley/Markdown-Headdown", "keywords": "markdown headings downgrade demote lower", "license": "", "maintainer": "", "maintainer_email": "", "name": "markdown-headdown", "package_url": "https://pypi.org/project/markdown-headdown/", "platform": "", "project_url": "https://pypi.org/project/markdown-headdown/", "project_urls": { "Homepage": "https://github.com/SaschaCowley/Markdown-Headdown" }, "release_url": "https://pypi.org/project/markdown-headdown/0.1.3/", "requires_dist": [ "markdown" ], "requires_python": "", "summary": "A Python-Markdown extension to downgrade headings", "version": "0.1.3" }, "last_serial": 4471572, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "d24ef83f314f644d522c9d1f767cd5b9", "sha256": "30d819d719e53e9b06d060b30fda2cb5753a76a762de279eedbd638840733c82" }, "downloads": -1, "filename": "markdown_headdown-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d24ef83f314f644d522c9d1f767cd5b9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4226, "upload_time": "2018-11-10T01:58:02", "url": "https://files.pythonhosted.org/packages/61/f4/2766f7219c96f124b7ea53e6cae8090f325a7525212b51b5d9aa4b9b7caa/markdown_headdown-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6a1e7e431c6c237013ec78141e0949fa", "sha256": "ced7f86b3014297e0d20306744f01911a3da3ff01ad014900f22c250d5e07dec" }, "downloads": -1, "filename": "markdown-headdown-0.1.3.tar.gz", "has_sig": false, "md5_digest": "6a1e7e431c6c237013ec78141e0949fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3183, "upload_time": "2018-11-10T01:58:04", "url": "https://files.pythonhosted.org/packages/7a/d0/ddaeb580e9d6a5327511e35de23fc23439a9de8fa920dff50fb60e2da1e3/markdown-headdown-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d24ef83f314f644d522c9d1f767cd5b9", "sha256": "30d819d719e53e9b06d060b30fda2cb5753a76a762de279eedbd638840733c82" }, "downloads": -1, "filename": "markdown_headdown-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d24ef83f314f644d522c9d1f767cd5b9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4226, "upload_time": "2018-11-10T01:58:02", "url": "https://files.pythonhosted.org/packages/61/f4/2766f7219c96f124b7ea53e6cae8090f325a7525212b51b5d9aa4b9b7caa/markdown_headdown-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6a1e7e431c6c237013ec78141e0949fa", "sha256": "ced7f86b3014297e0d20306744f01911a3da3ff01ad014900f22c250d5e07dec" }, "downloads": -1, "filename": "markdown-headdown-0.1.3.tar.gz", "has_sig": false, "md5_digest": "6a1e7e431c6c237013ec78141e0949fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3183, "upload_time": "2018-11-10T01:58:04", "url": "https://files.pythonhosted.org/packages/7a/d0/ddaeb580e9d6a5327511e35de23fc23439a9de8fa920dff50fb60e2da1e3/markdown-headdown-0.1.3.tar.gz" } ] }