{"repo":"fralau/mkdocs-macros-plugin","free":true,"listed":false,"github":"https://github.com/fralau/mkdocs-macros-plugin","clone":"git clone https://github.com/fralau/mkdocs-macros-plugin.git","description":"Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code.","language":"Python","stars":411,"topics":["python","mkdocs","markdown","jinja2-templates","jinja2","documentation","mkdocs-macros-plugin","automation"],"license":null,"category":"docs-static-sites","readme_excerpt":"Unleash the power of MkDocs with variables and macros :open file folder: Used by 2K repositories on Github 🥇 Listed as High-Quality Plugin mkdocs-macros-plugin is a general-purpose plugin for MkDocs that uses variables and macros (functions) to automate tasks, and produce richer and more beautiful pages. View the mkdocs-macro documentation on Read the Docs. Overview mkdocs-macros-plugin is a plugin that makes it easier for contributors of an MkDocs website to produce richer and more beautiful pages. It transforms the markdown pages into jinja2 templates that use variables , calls to macros and custom filters . You can also partially replace MkDocs plugins with mkdocs-macros modules, and pluglets (pre-installed modules). Using variables You can leverage the power of Python in markdown thanks to jinja2 by writing this : If you defined a price() function, this could translate into: The result of a macro can be HTML code : this makes macros especially useful to make custom extensions to the syntax of markdown, such as buttons, calls to email, embedding YouTube videos, etc. It is possible to use the wide range of facilities provided by Jinja2 templates such as conditions ( {% if ... %} ) and loops ( {% for ... %} ). Defining variables Regular variables can be defined in five ways: No Validity For whom Description --- --- --- ---- 1. global designer of the website in the mkdocs.yml file, under the extra heading 2. global contributor in external yaml definition files 3. global prog","default_branch":null,"files":null,"tree":[],"storefront":"/r/fralau","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fralau/mkdocs-macros-plugin/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}