Minicode
is Grav plugin.
This plugin add Twig filter {{ | minicode }}
. The filter is output tiny html (or other text) inside a document from text file.
And the filter can use on Templates too. You can output codes of site global. (ex: Sidebars, Ads, New product information...)
Installing Minicode
plugin can only manual install now. Download this plugin and extracting all plugin files to
user/plugins/minicode
{{ 'filename.txt' | minicode }}
- Create directory user/minicodes if nothing. (This name is default. You can change directory name in plugin's config)
- Write a tiny html (or other text) to file. (ex: minicode1.html)
- The file put into user/minicodes directory. (ex: user/minicodes/minicode1.html)
- Write twig tag in page content or theme file. (ex:
{{ 'minicode1.html' | minicode }}
) - Preview the site.
!Caution!
This plugin RAW output from file. Please check Broken HTML tags and Security risk before upload.
Copyright (c) 2016 Takefumi Ota.
Licensed for use under the terms of the MIT.
Please tell my mistakes about English if any. :-p