示例#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