aboutsummaryrefslogtreecommitdiff
path: root/src/_mixin/menu.pug
blob: 462d06f928a6d711b1237d39db5fd45b0592e851 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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