Closed ppipada closed 4 years ago
Sure, you can access elements by index: {{tags.0}}
or {{tags.1}}
etc..
Or you can iterate over array:
{{#tags}}
Hey, {{.}}
{{/tags}}
Thanks a lot. This helps !!
Suggestions:
Observation:
{{.}}
syntax. What is needed is add the string in single quotes ('').
E.g: if the frontmatter is
tags: [t1, t-2, t3]
rendering for t-2 breaks. Solution is to do:
tags: [t1, 't-2', t3]
I could add a pull request if you could please guide me on where to add this in docs.
This is not in docs, because it is mustache usage information, not related directly to plugin functionality... Maybe you should create a blog post about your founding...
Got it. Thanks.
Reference blog post: https://ppipada.github.io/post/markdown/2020-04-29-docsify-mustache/
I am trying to use an array of values from frontmatter using this plugin. Is there a way I can get the value one at a time?
E.g:
When I access that in md file as
{{tags}}
it comes ast1,t2,t3
. Is there a way I can access each individual value and do something with it? E.g: associate a url with each value.