A Vue lexer for Pygments
Project description
A Vue lexer for Pygments (based on jsx-lexer)
Installation
$ pip install vue-lexer
Usage with Sphinx
To use within Sphinx, simply specify vue for your code-block:
.. code-block:: vue <template> <p>{{ greeting }} World!</p> </template> <script> module.exports = { data: function () { return { greeting: 'Hello' } } } </script> <style scoped> p { font-size: 2em; text-align: center; } </style>
Usage with mkdocs
First, you need to create the CSS for the highlighting:
$ pygmentize -S default -f html -a .codehilite > code/pygments.css
Then, add the following to your mkdocs.yml:
markdown_extensions:
- codehilite
extra_css: [pygments.css]
Now, you can use vue in your code blocks:
```vue <template> <p>{{ greeting }} World!</p> </template> <script> module.exports = { data: function () { return { greeting: 'Hello' } } } </script> <style scoped> p { font-size: 2em; text-align: center; } </style> ```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vue-lexer-0.0.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for vue_lexer-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80fdbc5035a2ab30ad7adb1784b7ba30b4ec867206716ee7d4d6bd1d6fcd5828 |
|
MD5 | 32ce22dec3f517569212f5cf272e5b99 |
|
BLAKE2b-256 | d366bd0a357ffcf017b4f88971836034518fc79e843da84136864419bcec79fd |