예제 #1
0
파일: tags.py 프로젝트: Camr0n/ark
def register(rectype, tag, filepath):
    rmap.setdefault(rectype, {}).setdefault(slugify(tag), []).append(filepath)
    nmap.setdefault(rectype, {}).setdefault(slugify(tag), tag)
예제 #2
0
파일: tags.py 프로젝트: 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
예제 #3
0
파일: tags.py 프로젝트: 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
예제 #4
0
파일: tags.py 프로젝트: wannaphong/ark
def register(rectype, tag, filepath):
    rmap.setdefault(rectype, {}).setdefault(slugify(tag), []).append(filepath)
    nmap.setdefault(rectype, {}).setdefault(slugify(tag), tag)
예제 #5
0
파일: tags.py 프로젝트: wannaphong/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
예제 #6
0
파일: tags.py 프로젝트: wannaphong/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