def build_theme(use_theme): # setup blog setup() # write conf file with given theme writer.write_conf_file(theme=use_theme) # load content lorem = load_content() # create posts post.create("This is a post", datetime.date(2010, 10, 1)).write(tags="tag #1, tag #2", content=lorem) post.create("This is another post", datetime.date(2010, 11, 2)).write(tags="tag #1", content=lorem) post.create("This is yet another post", datetime.date(2010, 12, 3)).write(tags="tag #2", content=lorem) # create pages page.create("First page").write() page.create("Second page").write() # build cmdline.build()
def build_theme(use_theme): # setup blog setup() # write conf file with given theme writer.write_conf_file(theme=use_theme) # load content lorem = load_content() # create posts post.create("This is a post", datetime.date(2010, 10, 1)).write( tags="tag #1, tag #2", content=lorem) post.create("This is another post", datetime.date(2010, 11, 2)).write( tags="tag #1", content=lorem) post.create("This is yet another post", datetime.date(2010, 12, 3)).write( tags="tag #2", content=lorem) # create pages page.create("First page").write() page.create("Second page").write() # build cmdline.build()
def hook_extension(ext): writer.write_conf_file(extensions=["tinkerer.ext.blog", ext])