# vimwiki-markdown
[![PyPI version](https://badge.fury.io/py/vimwiki-markdown.svg)](https://badge.fury.io/py/vimwiki-markdown) ![PyPI downloads](https://img.shields.io/pypi/dm/vimwiki-markdown.svg)
[vimwiki](https://github.com/vimwiki/vimwiki) markdown file to html with syntax
highlighting.
## Install
```
pip install vimwiki-markdown
```
## Usage
Add the following to your `~/.vimrc`:
```vim
let g:vimwiki_list = [{
\ 'path': '~/vimwiki',
\ 'template_path': '~/vimwiki/templates/',
\ 'template_default': 'default',
\ 'syntax': 'markdown',
\ 'ext': '.md',
\ 'path_html': '~/vimwiki/site_html/',
\ 'custom_wiki2html': 'vimwiki_markdown',
\ 'template_ext': '.tpl'}]
```
## Markdown extensions
The following [markdown extensions](https://python-markdown.github.io/extensions/)
are activated by default:
- [fenced_code](https://python-markdown.github.io/extensions/fenced_code_blocks/)
- [tables](https://python-markdown.github.io/extensions/tables/)
- [CodeHilite](https://python-markdown.github.io/extensions/code_hilite/)
- [Table of Contents](https://python-markdown.github.io/extensions/toc/)
But you can add more extensions using `VIMWIKI_MARKDOWN_EXTENSIONS` environment variable:
1. Json dictionary syntax of extension with configuration
`{"toc": {"baselevel": 2 }, "nl2br": {}}`.
**Note**: `{}` configuration implies no configuration.
1. [DEPRECATED] Json list syntax of extension. `["toc", "nl2br"]`.
1. [DEPRECATED] comma separated list of extensions `toc,nl2br`.
**Warning** Deprecated formats will be remove in next major release
## Syntax highlighting
Syntax highlighting is provided by [Pygments](http://pygments.org/), which will
try to guess language by default.
You can use regular markdown indented code blocks:
```
:::python
for value range(42):
print(value)
```
Or Fenced Code Blocks
```python
for value range(42):
print(value)
```
You can also highlight line using `hl_lines` argument:
```python hl_lines="1 3"
for value range(42):
print(value)
```
Pygments can generate CSS rules for you. Just run the following command from
the command line:
```
pygmentize -S default -f html -a .codehilite > styles.css
```
If you would like to use a different theme, swap out `default` for the desired
theme. For a list of themes installed on your system, run the following
command:
```
pygmentize -L style
```
If you are lazy you can just use the one in this repository inside `css`
directory which provide the `monokai` theme.
## Environment variables
The following environment variables are available, but not mandatory:
- `VIMWIKI_TEMPLATE_PATH`: path to vimwiki HTML template
- `VIMWIKI_TEMPLATE_DEFAULT`: default HTML template name
- `VIMWIKI_TEMPLATE_EXT`: default HTML template extension
- `VIMWIKI_ROOT_PATH`: vimwiki root path
If not set `vimwiki_markdown` will use
[the default template defined in the source code](https://github.com/WnP/vimwiki_markdown/blob/master/vimwiki_markdown.py#L12-L30).
Raw data
{
"_id": null,
"home_page": "https://github.com/WnP/vimwiki_markdown/",
"name": "vimwiki-markdown",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Steeve Chailloux",
"author_email": "github.unrented556@passmail.net",
"download_url": "https://files.pythonhosted.org/packages/c7/f5/5a112edf0b3efca5d95bf791d0aefc1c0c3d825c20948bd0d0c30476716b/vimwiki-markdown-0.4.1.tar.gz",
"platform": null,
"description": "# vimwiki-markdown\n\n[![PyPI version](https://badge.fury.io/py/vimwiki-markdown.svg)](https://badge.fury.io/py/vimwiki-markdown) ![PyPI downloads](https://img.shields.io/pypi/dm/vimwiki-markdown.svg)\n\n[vimwiki](https://github.com/vimwiki/vimwiki) markdown file to html with syntax\nhighlighting.\n\n## Install\n\n```\npip install vimwiki-markdown\n```\n\n## Usage\n\nAdd the following to your `~/.vimrc`:\n\n```vim\nlet g:vimwiki_list = [{\n\t\\ 'path': '~/vimwiki',\n\t\\ 'template_path': '~/vimwiki/templates/',\n\t\\ 'template_default': 'default',\n\t\\ 'syntax': 'markdown',\n\t\\ 'ext': '.md',\n\t\\ 'path_html': '~/vimwiki/site_html/',\n\t\\ 'custom_wiki2html': 'vimwiki_markdown',\n\t\\ 'template_ext': '.tpl'}]\n```\n\n## Markdown extensions\n\nThe following [markdown extensions](https://python-markdown.github.io/extensions/)\nare activated by default:\n\n- [fenced_code](https://python-markdown.github.io/extensions/fenced_code_blocks/)\n- [tables](https://python-markdown.github.io/extensions/tables/)\n- [CodeHilite](https://python-markdown.github.io/extensions/code_hilite/)\n- [Table of Contents](https://python-markdown.github.io/extensions/toc/)\n\nBut you can add more extensions using `VIMWIKI_MARKDOWN_EXTENSIONS` environment variable:\n1. Json dictionary syntax of extension with configuration\n\t `{\"toc\": {\"baselevel\": 2 }, \"nl2br\": {}}`.\n\t **Note**: `{}` configuration implies no configuration.\n1. [DEPRECATED] Json list syntax of extension. `[\"toc\", \"nl2br\"]`.\n1. [DEPRECATED] comma separated list of extensions `toc,nl2br`.\n\n**Warning** Deprecated formats will be remove in next major release\n\n## Syntax highlighting\n\nSyntax highlighting is provided by [Pygments](http://pygments.org/), which will\ntry to guess language by default.\n\nYou can use regular markdown indented code blocks:\n\n```\n\t:::python\n\tfor value range(42):\n\t\tprint(value)\n```\n\nOr Fenced Code Blocks\n\n\t```python\n\tfor value range(42):\n\t\tprint(value)\n\t```\n\nYou can also highlight line using `hl_lines` argument:\n\n\t```python hl_lines=\"1 3\"\n\tfor value range(42):\n\t\tprint(value)\n\t```\n\nPygments can generate CSS rules for you. Just run the following command from\nthe command line:\n\n```\npygmentize -S default -f html -a .codehilite > styles.css\n```\n\nIf you would like to use a different theme, swap out `default` for the desired\ntheme. For a list of themes installed on your system, run the following\ncommand:\n\n```\npygmentize -L style\n```\n\nIf you are lazy you can just use the one in this repository inside `css`\ndirectory which provide the `monokai` theme.\n\n## Environment variables\n\nThe following environment variables are available, but not mandatory:\n\n- `VIMWIKI_TEMPLATE_PATH`: path to vimwiki HTML template\n- `VIMWIKI_TEMPLATE_DEFAULT`: default HTML template name\n- `VIMWIKI_TEMPLATE_EXT`: default HTML template extension\n- `VIMWIKI_ROOT_PATH`: vimwiki root path\n\nIf not set `vimwiki_markdown` will use\n[the default template defined in the source code](https://github.com/WnP/vimwiki_markdown/blob/master/vimwiki_markdown.py#L12-L30).\n\n\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "vimwiki-markdown: vimwiki markdown file to html with syntax highlighting.",
"version": "0.4.1",
"project_urls": {
"Homepage": "https://github.com/WnP/vimwiki_markdown/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "160b46ce2fd31edf0ad8de46a1db84fe643b89829b97055f93ffbb48601f3576",
"md5": "a53ed3d722bc8e1068aa9389e9a23ce5",
"sha256": "d951cb28a4e329ef03cd43a5604aada6215cc1438465d3e3bc6fba47e48d172f"
},
"downloads": -1,
"filename": "vimwiki_markdown-0.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a53ed3d722bc8e1068aa9389e9a23ce5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5741,
"upload_time": "2023-10-16T08:37:53",
"upload_time_iso_8601": "2023-10-16T08:37:53.531886Z",
"url": "https://files.pythonhosted.org/packages/16/0b/46ce2fd31edf0ad8de46a1db84fe643b89829b97055f93ffbb48601f3576/vimwiki_markdown-0.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c7f55a112edf0b3efca5d95bf791d0aefc1c0c3d825c20948bd0d0c30476716b",
"md5": "2e5d8fffb579bd4d6f764d9c9b8404c7",
"sha256": "84997439313a907b9c5463b180e6411b49e86117f199adf2652ad4584b2c2cde"
},
"downloads": -1,
"filename": "vimwiki-markdown-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "2e5d8fffb579bd4d6f764d9c9b8404c7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5472,
"upload_time": "2023-10-16T08:37:55",
"upload_time_iso_8601": "2023-10-16T08:37:55.288093Z",
"url": "https://files.pythonhosted.org/packages/c7/f5/5a112edf0b3efca5d95bf791d0aefc1c0c3d825c20948bd0d0c30476716b/vimwiki-markdown-0.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-16 08:37:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "WnP",
"github_project": "vimwiki_markdown",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "vimwiki-markdown"
}