def register(rectype, tag, filepath): rmap.setdefault(rectype, {}).setdefault(slugify(tag), []).append(filepath) nmap.setdefault(rectype, {}).setdefault(slugify(tag), tag)
def add_tag_classes(classes, page): if page.get('is_tag_index'): classes.append('tag-index') classes.append('tag-index-%s' % slugify(page['tag'])) return classes
def slugs(rectype, tag, *append): slugs = ark.site.slugs(rectype) slugs.append(ark.site.typeconfig(rectype, 'tag_slug')) slugs.append(slugify(tag)) slugs.extend(append) return slugs