Prism syntax highlighting for Magento templates
Several quick start options are available:
- Download the latest release.
- Clone the repo:
git clone https://github.com/GordonLesti/prism-magento-template.git
. - Install with npm:
npm install prism-magento-template
. - Install with Bower:
bower install prism-magento-template
.
Include script (unless you are packaging scripts somehow else) after loading prism.js
:
<script src="/path/to/prism-magentotemplate.min.js"></script>
Just add the class language-magentotemplate
to the code
element that contains the Magento template content.
<pre><code class="language-magentotemplate">{{block
class='Magento\\Framework\\View\\Element\\Template'
area='frontend'
template='Magento_Sales::email/shipment/track.phtml'
shipment=$shipment
order=$order}}</code></pre>
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email info@gordonlesti.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.