Replies: 1 comment 2 replies
-
|
Hi! To create vento components, just create a <ul>
{{ for link of links }}
<li><a href="{{ link.url }}">{{ link.text }}</a></li>
{{ /for }}
</ul>To use the component, remember to pass the data: {{ comp.menu({ links: [...] }) }} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm having a bit of trouble implementing components in Vento using the Lume docs. I'm trying to do this purely with Vento/Front Matter/YAML without any JS.
I can import a menu component using the
{{ include "_components/menu.vto" }}syntax but with many components this is tedious and doesn't read well. But when trying to use the component syntax e.g.{{ comp Menu }}{{ \comp}}OR{{ comp.menu() }}I receive errors that the variable is undefined.I'm also not sure about how to write the component file in Vento. For example, if I want to create a component called Menu, where in the file
menu.vtoshould I be naming the component? Or is it based on the file name. Both the Lume and Vento documentation is a bit ambiguous about this.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions