Nikola for 1000 pages.

26 views
Skip to first unread message

gmo...@wisc.edu

unread,
Jun 14, 2017, 7:45:50 PM6/14/17
to nikola-discuss
Hello Everyone, I am new to nikola and have decided to try it out in a spike for work. 

My goal is to host a main page that presents a table of multiple columns of water stream data. In each row (maybe 1000 examples?), the last column will hold a link that points to another page that will display charts about that specific stream. I have the main page constructed with the table, but am struggling to figure out the best way to use nikola to complete these sub-pages.

My best approach so far was to represent each linked page as a nikola "post" or "page" and write a python script to call 'newpage' from the command line. Is there a way to make this happen with nikola without an external python script? Where can I write python in nikola besides conf.py?

 Thanks in advance for any help! 

Chris Warrick

unread,
Jun 15, 2017, 5:06:40 AM6/15/17
to Nikola—Discuss
The usual place where you would write extra code is a plugin. In this
case, there are a few caveats:

* you don’t need `nikola new_page`, you can just write text files
yourself (there is no database, nothing special about `new_page` and
`new_post` — they are just helpers for humans)
* as of today, there are no features to help with creating Nikola
posts/pages with auto-generated content. You could use a PostScanner
plugin to do it, but it might be slightly hacky. A Task will fail due
to dependency calculation and post scanning happening before tasks are
executed.

(regarding recent size discussions: 1000 pages is perfectly fine)

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16
Reply all
Reply to author
Forward
0 new messages