language = current.path[1] version = current.path[2] title = "Some Version" if language == 'js' if version == "latest" title = 'Javascript ' + jsLatest if language == 'dart' if version == "latest" title = 'Dart ' + dartLatest filter = /(\.html$)/ replace = /(\.html$)|(^index\.html$)/ mixin tree(head, tail) for val, key in head if key !== '.git' && key !== '_data' if key == '_contents' each file in val if filter.test(file) && !/^404\.html/.test(file) - file = file.replace(replace, ""); li: a(href="#{ tail + file }")= tail + file else mixin tree(val, tail + key + "/") h1 Sitemap ol mixin tree(public, "/") h2.hero-subtitle.text-subhead button(md-button ng-click="showVersionMenu($event)") #{title}