Docsify plugin that load variables form external xml or json file
- insert script into docsify document
<script src="//unpkg.com/docsify-variables/dist/docsify-variables.min.js"></script>
- add a variablesFile property to docsify config
window.$docsify = {
variablesFile : 'variables.xml'
}
docsify-variables will replace ${<variable>} references to a value in the variablesFile
to reference a value in an xml file you can use:
- fully qualified path to the tag. eg.: ${var.foo}
- or an XPath expression. eg.: ${/var/foo} or ${//item[2]}
to reference a value in a json file you can use:
- fully qualified path to the value. eg.: ${var.foo}
- or an XPath expression. eg.: ${/var/foo} or ${//item[2]}
https://bandorko.github.io/docsify-variables/examples/xml/#/
https://bandorko.github.io/docsify-variables/examples/json/#/