sphinx-mdinclude
================
Sphinx extension for including or writing pages in Markdown format.
[![version](https://img.shields.io/pypi/v/sphinx-mdinclude.svg)](https://pypi.python.org/pypi/sphinx-mdinclude)
[![documentation](https://img.shields.io/badge/docs-latest-success)](https://sphinx-mdinclude.readthedocs.io)
[![changelog](https://img.shields.io/badge/change-log-blue)](https://sphinx-mdinclude.omnilidb.dev/en/latest/changelog.html)
[![license](https://img.shields.io/pypi/l/sphinx-mdinclude.svg)](https://github.com/omnilib/sphinx-mdinclude/blob/main/LICENSE)
sphinx-mdinclude is a simple Sphinx extension that enables including Markdown documents
from within reStructuredText. It provides the `.. mdinclude::` directive, and
automatically converts the content of Markdown documents to reStructuredText format.
sphinx-mdinclude is a fork of [m2r](https://github.com/miyakogi/m2r) and
[m2r2](https://github.com/crossnox/m2r2), focused only on providing a Sphinx extension.
## Features
* Basic markdown and some extensions (see below)
* inline/block-level raw html
* fenced-code block
* tables
* footnotes (``[^1]``)
* Inline- and Block-level rst markups
* single- and multi-line directives (`.. directive::`)
* inline-roles (``:code:`print(1)` ...``)
* ref-link (``see `ref`_``)
* footnotes (``[#fn]_``)
* math extension inspired by [recommonmark](https://recommonmark.readthedocs.io/en/latest/index.html)
* Sphinx extension
* add markdown support for sphinx
* ``mdinclude`` directive to include markdown from md or rst files
* option to parse relative links into ref and doc directives (``md_parse_relative_links``)
## Restrictions
* In the rst's directives, markdown is not available. Please write in rst.
* Column alignment of tables is not supported. (rst does not support this feature)
* Heading with overline-and-underline is not supported.
* Heading with underline is OK
* Rst heading marks are currently hard-coded and unchangeable.
* H1: `=`, H2: `-`, H3: `^`, H4: `~`, H5: `"`, H6: `#`
## Installation
Python 3.6 or newer is required.
```
pip install sphinx-mdinclude
```
## Usage
In your Sphinx `conf.py`, add the following lines:
```python
extensions = [
...,
'sphinx_mdinclude',
]
```
Markdown files with the `.md` extension will be loaded and used by Sphinx, similar to
any other `.rst` files.
To include Markdown files within other files, use the `.. mdinclude:: <filename>`
directive. This applies the conversion from Markdown to reStructuredText format.
## License
`sphinx-mdinclude` is copyright Hiroyuki Takagi, CrossNox, and [Amethyst Reese][],
and licensed under the MIT license. I am providing code in this repository to you
under an open source license. This is my personal repository; the license you receive
to my code is from me and not from my employer. See the [LICENSE][] file for details.
[Amethyst Reese]: https://noswap.com
[LICENSE]: https://github.com/omnilib/sphinx-mdinclude/blob/main/LICENSE
Raw data
{
"_id": null,
"home_page": null,
"name": "sphinx_mdinclude",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Amethyst Reese <amy@noswap.com>",
"keywords": "Markdown, reStructuredText, sphinx-extension",
"author": null,
"author_email": "Hiroyuki Takagi <miyako.dev@gmail.com>, CrossNox <ijmermet+m2r2@gmail.com>, Amethyst Reese <amy@noswap.com>",
"download_url": "https://files.pythonhosted.org/packages/82/7c/458b0259c20ac24c2994ba4bed005814e52bb78cf905183cdebf79928f96/sphinx_mdinclude-0.6.0.tar.gz",
"platform": null,
"description": "sphinx-mdinclude\n================\n\nSphinx extension for including or writing pages in Markdown format.\n\n[![version](https://img.shields.io/pypi/v/sphinx-mdinclude.svg)](https://pypi.python.org/pypi/sphinx-mdinclude)\n[![documentation](https://img.shields.io/badge/docs-latest-success)](https://sphinx-mdinclude.readthedocs.io)\n[![changelog](https://img.shields.io/badge/change-log-blue)](https://sphinx-mdinclude.omnilidb.dev/en/latest/changelog.html)\n[![license](https://img.shields.io/pypi/l/sphinx-mdinclude.svg)](https://github.com/omnilib/sphinx-mdinclude/blob/main/LICENSE)\n\n\nsphinx-mdinclude is a simple Sphinx extension that enables including Markdown documents\nfrom within reStructuredText. It provides the `.. mdinclude::` directive, and\nautomatically converts the content of Markdown documents to reStructuredText format.\n\nsphinx-mdinclude is a fork of [m2r](https://github.com/miyakogi/m2r) and\n[m2r2](https://github.com/crossnox/m2r2), focused only on providing a Sphinx extension.\n\n## Features\n\n* Basic markdown and some extensions (see below)\n * inline/block-level raw html\n * fenced-code block\n * tables\n * footnotes (``[^1]``)\n* Inline- and Block-level rst markups\n * single- and multi-line directives (`.. directive::`)\n * inline-roles (``:code:`print(1)` ...``)\n * ref-link (``see `ref`_``)\n * footnotes (``[#fn]_``)\n * math extension inspired by [recommonmark](https://recommonmark.readthedocs.io/en/latest/index.html)\n* Sphinx extension\n * add markdown support for sphinx\n * ``mdinclude`` directive to include markdown from md or rst files\n * option to parse relative links into ref and doc directives (``md_parse_relative_links``)\n\n## Restrictions\n\n* In the rst's directives, markdown is not available. Please write in rst.\n* Column alignment of tables is not supported. (rst does not support this feature)\n* Heading with overline-and-underline is not supported.\n * Heading with underline is OK\n* Rst heading marks are currently hard-coded and unchangeable.\n * H1: `=`, H2: `-`, H3: `^`, H4: `~`, H5: `\"`, H6: `#`\n\n## Installation\n\nPython 3.6 or newer is required.\n\n```\npip install sphinx-mdinclude\n```\n\n## Usage\n\nIn your Sphinx `conf.py`, add the following lines:\n\n```python\nextensions = [\n ...,\n 'sphinx_mdinclude',\n]\n```\n\nMarkdown files with the `.md` extension will be loaded and used by Sphinx, similar to\nany other `.rst` files.\n\nTo include Markdown files within other files, use the `.. mdinclude:: <filename>`\ndirective. This applies the conversion from Markdown to reStructuredText format.\n\n## License\n\n`sphinx-mdinclude` is copyright Hiroyuki Takagi, CrossNox, and [Amethyst Reese][],\nand licensed under the MIT license. I am providing code in this repository to you\nunder an open source license. This is my personal repository; the license you receive\nto my code is from me and not from my employer. See the [LICENSE][] file for details.\n\n[Amethyst Reese]: https://noswap.com\n[LICENSE]: https://github.com/omnilib/sphinx-mdinclude/blob/main/LICENSE\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Markdown extension for Sphinx",
"version": "0.6.0",
"project_urls": {
"Github": "https://github.com/omnilib/sphinx-mdinclude"
},
"split_keywords": [
"markdown",
" restructuredtext",
" sphinx-extension"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "6c67a2002954682cad0ab8fd16f9c8d3325d490c3a8ffd5bad91f7eb1610f5e5",
"md5": "d53665f7a4875566207c10ab41251527",
"sha256": "764b6aeee28002b9d02060758266761a2c724805594d264b19e6ceeaa3bad393"
},
"downloads": -1,
"filename": "sphinx_mdinclude-0.6.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d53665f7a4875566207c10ab41251527",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 16813,
"upload_time": "2024-04-22T04:20:31",
"upload_time_iso_8601": "2024-04-22T04:20:31.495095Z",
"url": "https://files.pythonhosted.org/packages/6c/67/a2002954682cad0ab8fd16f9c8d3325d490c3a8ffd5bad91f7eb1610f5e5/sphinx_mdinclude-0.6.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "827c458b0259c20ac24c2994ba4bed005814e52bb78cf905183cdebf79928f96",
"md5": "9efe5d1e9fe283b17b52e971bab37d7a",
"sha256": "b1cb4dfa22ce17ca20e90e34d4349d8a97c5052709d9c4eed051cdabb615b20b"
},
"downloads": -1,
"filename": "sphinx_mdinclude-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "9efe5d1e9fe283b17b52e971bab37d7a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 64962,
"upload_time": "2024-04-22T04:20:34",
"upload_time_iso_8601": "2024-04-22T04:20:34.612380Z",
"url": "https://files.pythonhosted.org/packages/82/7c/458b0259c20ac24c2994ba4bed005814e52bb78cf905183cdebf79928f96/sphinx_mdinclude-0.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-22 04:20:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "omnilib",
"github_project": "sphinx-mdinclude",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sphinx_mdinclude"
}