# MkDocs-htmlextradata-plugin
*Плагин MkDocs, который вводит дополнительную переменную `extradata` в html-шаблон. Данная переменная попадает в контекст страницы, если файл .yml называется так же ка странца .md*
## Установка
Установите пакет с помощью pip или poetry:
```bash
pip install htmlextradata
or
poetry add htmlextradata
```
Включите плагин в вашем "mkdocs.yml`:
```yaml
plugins:
- search
- htmlextradata
```
или
```yaml
plugins:
- search
- htmlextradata:
data: path/to/datafiles
```
По умолчанию он будет искать в папке, где хранится ваш mkdocs.yml, и в папке docs другую папку с именем _extradata (т.е. ./docs/_extradata/mtrs.yaml), доступную в шаблоне как {{ extradata }}, если есть страница с таким именем.
Raw data
{
"_id": null,
"home_page": "https://github.com/stalexsm/mkdocs-htmlextradata-plugin",
"name": "htmlextradata",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "mkdocs,mkdocs-plugin",
"author": "Alexandr Starovoytov",
"author_email": "stalex.info@yandex.ru",
"download_url": "https://files.pythonhosted.org/packages/ba/91/e96ede5de6abdba8bd2873b1b475766577a2c80e965c60b2144350b689eb/htmlextradata-0.1.4.tar.gz",
"platform": null,
"description": "# MkDocs-htmlextradata-plugin\n\n*\u041f\u043b\u0430\u0433\u0438\u043d MkDocs, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0432\u043e\u0434\u0438\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e `extradata` \u0432 html-\u0448\u0430\u0431\u043b\u043e\u043d. \u0414\u0430\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b .yml \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u0436\u0435 \u043a\u0430 \u0441\u0442\u0440\u0430\u043d\u0446\u0430 .md*\n\n## \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\n\n\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pip \u0438\u043b\u0438 poetry:\n\n```bash\npip install htmlextradata\n\nor\n\npoetry add htmlextradata\n```\n\n\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043f\u043b\u0430\u0433\u0438\u043d \u0432 \u0432\u0430\u0448\u0435\u043c \"mkdocs.yml`:\n\n```yaml\nplugins:\n - search\n - htmlextradata\n```\n\n\u0438\u043b\u0438\n\n```yaml\nplugins:\n - search\n - htmlextradata:\n data: path/to/datafiles\n```\n\n\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435, \u0433\u0434\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u0430\u0448 mkdocs.yml, \u0438 \u0432 \u043f\u0430\u043f\u043a\u0435 docs \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c _extradata (\u0442.\u0435. ./docs/_extradata/mtrs.yaml), \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u0430\u043a {{ extradata }}, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441 \u0442\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "MkDocs Plugin",
"version": "0.1.4",
"project_urls": {
"Homepage": "https://github.com/stalexsm/mkdocs-htmlextradata-plugin",
"Repository": "https://github.com/stalexsm/mkdocs-htmlextradata-plugin"
},
"split_keywords": [
"mkdocs",
"mkdocs-plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4f89995d7eab0716677be4aff64be0e4e608d55a5c298f788c122ff7ba97fdda",
"md5": "6d93c43477a16304015ae4131c4a5bd8",
"sha256": "88e2affff76c2c15b5e4e1da9dc5df18145d04bf6393012ec6028051a793f0af"
},
"downloads": -1,
"filename": "htmlextradata-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6d93c43477a16304015ae4131c4a5bd8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 3205,
"upload_time": "2023-10-23T01:17:52",
"upload_time_iso_8601": "2023-10-23T01:17:52.312497Z",
"url": "https://files.pythonhosted.org/packages/4f/89/995d7eab0716677be4aff64be0e4e608d55a5c298f788c122ff7ba97fdda/htmlextradata-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ba91e96ede5de6abdba8bd2873b1b475766577a2c80e965c60b2144350b689eb",
"md5": "5bb4c73c5bb33519168bbafd191788e0",
"sha256": "742893707920169e09dd701b667dc75601cb74156a93f06ed7b323ac952a037e"
},
"downloads": -1,
"filename": "htmlextradata-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "5bb4c73c5bb33519168bbafd191788e0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 2754,
"upload_time": "2023-10-23T01:17:53",
"upload_time_iso_8601": "2023-10-23T01:17:53.559259Z",
"url": "https://files.pythonhosted.org/packages/ba/91/e96ede5de6abdba8bd2873b1b475766577a2c80e965c60b2144350b689eb/htmlextradata-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-23 01:17:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "stalexsm",
"github_project": "mkdocs-htmlextradata-plugin",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "htmlextradata"
}