1
0
Fork 0
forked from Deuxfleurs/site
deuxfleurs-website/src/_mixin/menu.pug

13 lines
439 B
Text

mixin menu(o)
ul
each val in o.children
- if (val.type == 'folder' && val.tags.includes('document'))
li
- if (val.tags.includes('has_index'))
a(href=val.url)= val.nice_name
- else
span= val.nice_name
+menu(val)
- else if (val.type == 'file' && val.tags.includes('document') && !val.tags.includes('is_index'))
li
a(href=val.url)= val.nice_name