示例#1
0
文件: news.go 项目: fd/simplex
func Generate(tx *static.Tx) {
	var (
		articles *static.C
	)

	articles = tx.Coll("articles", &Article{})
	articles = articles.Select(published).Sort(by_publish_date)

	generate_index_pages(articles)
	generate_article_pages(articles)
}
示例#2
0
文件: terminator.go 项目: fd/simplex
func terminator_for_tx(tx *static.Tx) *terminator {
	return tx.RegisterTerminator("router", &terminator{}).(*terminator)
}