%global _empty_manifest_terminate_build 0
Name: python-mkdocs-include-markdown-plugin
Version: 4.0.4
Release: 1
Summary: Mkdocs Markdown includer plugin.
License: Apache Software License
URL: https://pypi.org/project/mkdocs-include-markdown-plugin/
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d0/f0/42ed4496d1ff557fdb09c7c44561d5445e548c043996f8c8a4aa36d80688/mkdocs_include_markdown_plugin-4.0.4.tar.gz
BuildArch: noarch
%description
# mkdocs-include-markdown-plugin
Mkdocs Markdown includer plugin.
[![PyPI][pypi-version-badge-link]][pypi-link]
[![Tests][tests-image]][tests-link]
[![Coverage status][coverage-image]][coverage-link]
> Read this document in other languages:
>
> - [Español][es-readme-link]
> - [Français][fr-readme-link]
## Installation
```bash
pip install mkdocs-include-markdown-plugin
```
## Documentation
### Setup
Enable the plugin in your `mkdocs.yml`:
```yaml
plugins:
- include-markdown
```
> Make sure that you define `include-markdown` before other plugins that could
> conflict, like [`mkdocs-macros-plugin`][mkdocs-macros-plugin-link].
### Configuration
The global behaviour of the plugin can be customized in the configuration.
- # **opening_tag** and
**closing_tag**: The default opening and closing tags. By default are
`{%` and `%}`.
The rest of the options will define the default values passed to arguments
of directives and are documented in the [reference](#reference).
```yaml
plugins:
- include-markdown:
opening_tag: "{!"
closing_tag: "!}"
encoding: ascii
preserve_includer_indent: false
dedent: true
trailing_newlines: false
comments: false
```
### Reference
This plugin provides two directives, one to include Markdown files and another
to include files of any type.
Paths of included files can be absolute or relative to the path of the file
that includes them. This argument also accept globs, in which case certain
paths can be ignored using the `exclude` argument.
File paths to include and string arguments can be wrapped by double `"` or
single `'` quotes, which can be escaped prepending them a `\` character as
`\"` and `\'`.
The arguments **start** and **end** may contain usual (Python-style) escape
sequences like `\n` to match against newlines.
#### **`include-markdown`**
Includes Markdown files content, optionally using two delimiters to filter the
content to include.
- #
**start**: Delimiter that marks the beginning of the content to include.
- #
**end**: Delimiter that marks the end of the content to include.
- #
**preserve-includer-indent** (_true_): When this option is enabled (default),
every line of the content to include is indented with the same number of
spaces used to indent the includer `{% %}` template. Possible values are
`true` and `false`.
- #
**dedent** (_false_): If enabled, the included content will be dedented.
- #
**exclude**: Specify with a glob which files should be ignored. Only useful
when passing globs to include multiple files.
- #
**trailing-newlines** (_true_): When this option is disabled, the trailing newlines
found in the content to include are stripped. Possible values are `true` and `false`.
- #
**encoding** (_utf-8_): Specify the encoding of the included file.
If not defined `utf-8` will be used.
- #
**rewrite-relative-urls** (_true_): When this option is enabled (default),
Markdown links and images in the content that are specified by a relative URL
are rewritten to work correctly in their new location. Possible values are
`true` and `false`.
- #
**comments** (_true_): When this option is enabled (default), the content to
include is wrapped by `` and ``
comments which help to identify that the content has been included. Possible
values are `true` and `false`.
- #
**heading-offset** (0): Increases or decreases the Markdown headings depth
by this number. Only supports number sign (`#`) heading syntax. Accepts
negative values to drop leading `#` characters.
##### Examples
```jinja
{%
include-markdown "../README.md"
start=""
end=""
%}
```
```jinja
{%
include-markdown 'docs/includes/header.md'
start=''
end=''
rewrite-relative-urls=false
comments=false
%}
```
```jinja
{%
include-markdown "docs/includes/header.md"
heading-offset=1
%}
```
```jinja
{%
include-markdown "../LICENSE*"
start=""
end=''
exclude="../LICENSE*.rst"
%}
```
```jinja
{% include-markdown '/escap\'ed/single-quotes/in/file\'/name.md' %}
```
#### **`include`**
Includes the content of a file or a group of files.
- #
**start**: Delimiter that marks the beginning of the content to include.
- #
**end**: Delimiter that marks the end of the content to include.
- #
**preserve-includer-indent** (_true_): When this option is enabled (default),
every line of the content to include is indented with the same number of
spaces used to indent the includer `{% %}` template. Possible values are
`true` and `false`.
- #
**dedent** (_false_): If enabled, the included content will be dedented.
- #
**exclude**: Specify with a glob which files should be ignored. Only useful
when passing globs to include multiple files.
- #
**trailing-newlines** (_true_): When this option is disabled, the trailing newlines
found in the content to include are stripped. Possible values are `true` and `false`.
- #
**encoding** (_utf-8_): Specify the encoding of the included file.
If not defined `utf-8` will be used.
##### Examples
```jinja
~~~yaml
{% include "../examples/github-minimal.yml" %}
~~~
```
```jinja
{%
include "../examples.md"
start="~~~yaml"
end="~~~\n"
%}
```
```jinja
{%
include '../LICENSE*'
exclude='../LICENSE*.rst'
%}
```
## Acknowledgment
- Joe Rickerby and contributors for
[giving me the permissions][cibuildwheel-470] to separate this plugin from the
documentation of [cibuildwheel][cibuildwheel-repo-link].
[pypi-link]: https://pypi.org/project/mkdocs-include-markdown-plugin
[pypi-version-badge-link]: https://img.shields.io/pypi/v/mkdocs-include-markdown-plugin?logo=pypi&logoColor=white
[tests-image]: https://img.shields.io/github/actions/workflow/status/mondeja/mkdocs-include-markdown-plugin/ci.yml?branch=master&logo=github&label=tests
[tests-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/actions?query=workflow%3ACI
[coverage-image]: https://img.shields.io/codecov/c/github/mondeja/mkdocs-include-markdown-plugin?logo=codecov&logoColor=white
[coverage-link]: https://app.codecov.io/gh/mondeja/mkdocs-include-markdown-plugin
[cibuildwheel-470]: https://github.com/joerick/cibuildwheel/issues/470
[cibuildwheel-repo-link]: https://github.com/joerick/cibuildwheel
[mkdocs-macros-plugin-link]: https://mkdocs-macros-plugin.readthedocs.io
[es-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/es/README.md
[fr-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/fr/README.md
%package -n python3-mkdocs-include-markdown-plugin
Summary: Mkdocs Markdown includer plugin.
Provides: python-mkdocs-include-markdown-plugin
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-mkdocs-include-markdown-plugin
# mkdocs-include-markdown-plugin
Mkdocs Markdown includer plugin.
[![PyPI][pypi-version-badge-link]][pypi-link]
[![Tests][tests-image]][tests-link]
[![Coverage status][coverage-image]][coverage-link]
> Read this document in other languages:
>
> - [Español][es-readme-link]
> - [Français][fr-readme-link]
## Installation
```bash
pip install mkdocs-include-markdown-plugin
```
## Documentation
### Setup
Enable the plugin in your `mkdocs.yml`:
```yaml
plugins:
- include-markdown
```
> Make sure that you define `include-markdown` before other plugins that could
> conflict, like [`mkdocs-macros-plugin`][mkdocs-macros-plugin-link].
### Configuration
The global behaviour of the plugin can be customized in the configuration.
- # **opening_tag** and
**closing_tag**: The default opening and closing tags. By default are
`{%` and `%}`.
The rest of the options will define the default values passed to arguments
of directives and are documented in the [reference](#reference).
```yaml
plugins:
- include-markdown:
opening_tag: "{!"
closing_tag: "!}"
encoding: ascii
preserve_includer_indent: false
dedent: true
trailing_newlines: false
comments: false
```
### Reference
This plugin provides two directives, one to include Markdown files and another
to include files of any type.
Paths of included files can be absolute or relative to the path of the file
that includes them. This argument also accept globs, in which case certain
paths can be ignored using the `exclude` argument.
File paths to include and string arguments can be wrapped by double `"` or
single `'` quotes, which can be escaped prepending them a `\` character as
`\"` and `\'`.
The arguments **start** and **end** may contain usual (Python-style) escape
sequences like `\n` to match against newlines.
#### **`include-markdown`**
Includes Markdown files content, optionally using two delimiters to filter the
content to include.
- #
**start**: Delimiter that marks the beginning of the content to include.
- #
**end**: Delimiter that marks the end of the content to include.
- #
**preserve-includer-indent** (_true_): When this option is enabled (default),
every line of the content to include is indented with the same number of
spaces used to indent the includer `{% %}` template. Possible values are
`true` and `false`.
- #
**dedent** (_false_): If enabled, the included content will be dedented.
- #
**exclude**: Specify with a glob which files should be ignored. Only useful
when passing globs to include multiple files.
- #
**trailing-newlines** (_true_): When this option is disabled, the trailing newlines
found in the content to include are stripped. Possible values are `true` and `false`.
- #
**encoding** (_utf-8_): Specify the encoding of the included file.
If not defined `utf-8` will be used.
- #
**rewrite-relative-urls** (_true_): When this option is enabled (default),
Markdown links and images in the content that are specified by a relative URL
are rewritten to work correctly in their new location. Possible values are
`true` and `false`.
- #
**comments** (_true_): When this option is enabled (default), the content to
include is wrapped by `` and ``
comments which help to identify that the content has been included. Possible
values are `true` and `false`.
- #
**heading-offset** (0): Increases or decreases the Markdown headings depth
by this number. Only supports number sign (`#`) heading syntax. Accepts
negative values to drop leading `#` characters.
##### Examples
```jinja
{%
include-markdown "../README.md"
start=""
end=""
%}
```
```jinja
{%
include-markdown 'docs/includes/header.md'
start=''
end=''
rewrite-relative-urls=false
comments=false
%}
```
```jinja
{%
include-markdown "docs/includes/header.md"
heading-offset=1
%}
```
```jinja
{%
include-markdown "../LICENSE*"
start=""
end=''
exclude="../LICENSE*.rst"
%}
```
```jinja
{% include-markdown '/escap\'ed/single-quotes/in/file\'/name.md' %}
```
#### **`include`**
Includes the content of a file or a group of files.
- #
**start**: Delimiter that marks the beginning of the content to include.
- #
**end**: Delimiter that marks the end of the content to include.
- #
**preserve-includer-indent** (_true_): When this option is enabled (default),
every line of the content to include is indented with the same number of
spaces used to indent the includer `{% %}` template. Possible values are
`true` and `false`.
- #
**dedent** (_false_): If enabled, the included content will be dedented.
- #
**exclude**: Specify with a glob which files should be ignored. Only useful
when passing globs to include multiple files.
- #
**trailing-newlines** (_true_): When this option is disabled, the trailing newlines
found in the content to include are stripped. Possible values are `true` and `false`.
- #
**encoding** (_utf-8_): Specify the encoding of the included file.
If not defined `utf-8` will be used.
##### Examples
```jinja
~~~yaml
{% include "../examples/github-minimal.yml" %}
~~~
```
```jinja
{%
include "../examples.md"
start="~~~yaml"
end="~~~\n"
%}
```
```jinja
{%
include '../LICENSE*'
exclude='../LICENSE*.rst'
%}
```
## Acknowledgment
- Joe Rickerby and contributors for
[giving me the permissions][cibuildwheel-470] to separate this plugin from the
documentation of [cibuildwheel][cibuildwheel-repo-link].
[pypi-link]: https://pypi.org/project/mkdocs-include-markdown-plugin
[pypi-version-badge-link]: https://img.shields.io/pypi/v/mkdocs-include-markdown-plugin?logo=pypi&logoColor=white
[tests-image]: https://img.shields.io/github/actions/workflow/status/mondeja/mkdocs-include-markdown-plugin/ci.yml?branch=master&logo=github&label=tests
[tests-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/actions?query=workflow%3ACI
[coverage-image]: https://img.shields.io/codecov/c/github/mondeja/mkdocs-include-markdown-plugin?logo=codecov&logoColor=white
[coverage-link]: https://app.codecov.io/gh/mondeja/mkdocs-include-markdown-plugin
[cibuildwheel-470]: https://github.com/joerick/cibuildwheel/issues/470
[cibuildwheel-repo-link]: https://github.com/joerick/cibuildwheel
[mkdocs-macros-plugin-link]: https://mkdocs-macros-plugin.readthedocs.io
[es-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/es/README.md
[fr-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/fr/README.md
%package help
Summary: Development documents and examples for mkdocs-include-markdown-plugin
Provides: python3-mkdocs-include-markdown-plugin-doc
%description help
# mkdocs-include-markdown-plugin
Mkdocs Markdown includer plugin.
[![PyPI][pypi-version-badge-link]][pypi-link]
[![Tests][tests-image]][tests-link]
[![Coverage status][coverage-image]][coverage-link]
> Read this document in other languages:
>
> - [Español][es-readme-link]
> - [Français][fr-readme-link]
## Installation
```bash
pip install mkdocs-include-markdown-plugin
```
## Documentation
### Setup
Enable the plugin in your `mkdocs.yml`:
```yaml
plugins:
- include-markdown
```
> Make sure that you define `include-markdown` before other plugins that could
> conflict, like [`mkdocs-macros-plugin`][mkdocs-macros-plugin-link].
### Configuration
The global behaviour of the plugin can be customized in the configuration.
- # **opening_tag** and
**closing_tag**: The default opening and closing tags. By default are
`{%` and `%}`.
The rest of the options will define the default values passed to arguments
of directives and are documented in the [reference](#reference).
```yaml
plugins:
- include-markdown:
opening_tag: "{!"
closing_tag: "!}"
encoding: ascii
preserve_includer_indent: false
dedent: true
trailing_newlines: false
comments: false
```
### Reference
This plugin provides two directives, one to include Markdown files and another
to include files of any type.
Paths of included files can be absolute or relative to the path of the file
that includes them. This argument also accept globs, in which case certain
paths can be ignored using the `exclude` argument.
File paths to include and string arguments can be wrapped by double `"` or
single `'` quotes, which can be escaped prepending them a `\` character as
`\"` and `\'`.
The arguments **start** and **end** may contain usual (Python-style) escape
sequences like `\n` to match against newlines.
#### **`include-markdown`**
Includes Markdown files content, optionally using two delimiters to filter the
content to include.
- #
**start**: Delimiter that marks the beginning of the content to include.
- #
**end**: Delimiter that marks the end of the content to include.
- #
**preserve-includer-indent** (_true_): When this option is enabled (default),
every line of the content to include is indented with the same number of
spaces used to indent the includer `{% %}` template. Possible values are
`true` and `false`.
- #
**dedent** (_false_): If enabled, the included content will be dedented.
- #
**exclude**: Specify with a glob which files should be ignored. Only useful
when passing globs to include multiple files.
- #
**trailing-newlines** (_true_): When this option is disabled, the trailing newlines
found in the content to include are stripped. Possible values are `true` and `false`.
- #
**encoding** (_utf-8_): Specify the encoding of the included file.
If not defined `utf-8` will be used.
- #
**rewrite-relative-urls** (_true_): When this option is enabled (default),
Markdown links and images in the content that are specified by a relative URL
are rewritten to work correctly in their new location. Possible values are
`true` and `false`.
- #
**comments** (_true_): When this option is enabled (default), the content to
include is wrapped by `` and ``
comments which help to identify that the content has been included. Possible
values are `true` and `false`.
- #
**heading-offset** (0): Increases or decreases the Markdown headings depth
by this number. Only supports number sign (`#`) heading syntax. Accepts
negative values to drop leading `#` characters.
##### Examples
```jinja
{%
include-markdown "../README.md"
start=""
end=""
%}
```
```jinja
{%
include-markdown 'docs/includes/header.md'
start=''
end=''
rewrite-relative-urls=false
comments=false
%}
```
```jinja
{%
include-markdown "docs/includes/header.md"
heading-offset=1
%}
```
```jinja
{%
include-markdown "../LICENSE*"
start=""
end=''
exclude="../LICENSE*.rst"
%}
```
```jinja
{% include-markdown '/escap\'ed/single-quotes/in/file\'/name.md' %}
```
#### **`include`**
Includes the content of a file or a group of files.
- #
**start**: Delimiter that marks the beginning of the content to include.
- #
**end**: Delimiter that marks the end of the content to include.
- #
**preserve-includer-indent** (_true_): When this option is enabled (default),
every line of the content to include is indented with the same number of
spaces used to indent the includer `{% %}` template. Possible values are
`true` and `false`.
- #
**dedent** (_false_): If enabled, the included content will be dedented.
- #
**exclude**: Specify with a glob which files should be ignored. Only useful
when passing globs to include multiple files.
- #
**trailing-newlines** (_true_): When this option is disabled, the trailing newlines
found in the content to include are stripped. Possible values are `true` and `false`.
- #
**encoding** (_utf-8_): Specify the encoding of the included file.
If not defined `utf-8` will be used.
##### Examples
```jinja
~~~yaml
{% include "../examples/github-minimal.yml" %}
~~~
```
```jinja
{%
include "../examples.md"
start="~~~yaml"
end="~~~\n"
%}
```
```jinja
{%
include '../LICENSE*'
exclude='../LICENSE*.rst'
%}
```
## Acknowledgment
- Joe Rickerby and contributors for
[giving me the permissions][cibuildwheel-470] to separate this plugin from the
documentation of [cibuildwheel][cibuildwheel-repo-link].
[pypi-link]: https://pypi.org/project/mkdocs-include-markdown-plugin
[pypi-version-badge-link]: https://img.shields.io/pypi/v/mkdocs-include-markdown-plugin?logo=pypi&logoColor=white
[tests-image]: https://img.shields.io/github/actions/workflow/status/mondeja/mkdocs-include-markdown-plugin/ci.yml?branch=master&logo=github&label=tests
[tests-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/actions?query=workflow%3ACI
[coverage-image]: https://img.shields.io/codecov/c/github/mondeja/mkdocs-include-markdown-plugin?logo=codecov&logoColor=white
[coverage-link]: https://app.codecov.io/gh/mondeja/mkdocs-include-markdown-plugin
[cibuildwheel-470]: https://github.com/joerick/cibuildwheel/issues/470
[cibuildwheel-repo-link]: https://github.com/joerick/cibuildwheel
[mkdocs-macros-plugin-link]: https://mkdocs-macros-plugin.readthedocs.io
[es-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/es/README.md
[fr-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/fr/README.md
%prep
%autosetup -n mkdocs-include-markdown-plugin-4.0.4
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-mkdocs-include-markdown-plugin -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Sun Apr 23 2023 Python_Bot - 4.0.4-1
- Package Spec generated