Example #1
0
File: tags.py Project: Camr0n/ark
def register(rectype, tag, filepath):
    rmap.setdefault(rectype, {}).setdefault(slugify(tag), []).append(filepath)
    nmap.setdefault(rectype, {}).setdefault(slugify(tag), tag)
Example #2
0
File: tags.py Project: Camr0n/ark
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
Example #3
0
File: tags.py Project: Camr0n/ark
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
Example #4
0
def register(rectype, tag, filepath):
    rmap.setdefault(rectype, {}).setdefault(slugify(tag), []).append(filepath)
    nmap.setdefault(rectype, {}).setdefault(slugify(tag), tag)
Example #5
0
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
Example #6
0
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