eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.46k stars 314 forks source link

Page generation via plugins #189

Open targi opened 9 years ago

targi commented 9 years ago

I've been evaluating Cactus, as well as other static site generators, to use for my personal blog.

One thing I need is the ability to generate pages from post metadata. I want to use tags (see also #138); I also want to generate multiple archive pages with URLs like /archive/2015.html, /archive/2014.html and so on. I don't want to add them manually, I'd like them to be built from the list of posts, say, via a plugin.

Among the competition, Jekyll has support for this, but I'd rather prefer writing Python code than Ruby code.

I've taken a cursory look, and I believe plugins in Cactus cannot add new pages, and Site.pages() method looks for .html files to build the list of pages, and this is hard-coded. I might be able to hack _page_cache, but I don't believe this is a good solution.

Are there plans to support page creation from within a plugin? Or maybe I'm missing something, and there is a proper way to do this?