Logs for #nikola for 2015-12-26

12:57:37 <determinant> Hi! I'd like to add a "sticky" post functionality to my Nikola. I made it by adding a meta attribute to the sticky post and hacking the keys for sorting in function "Nikola.scan_posts". But I think it's better to create a plugin to override the default scan_posts instead of directly hacking it. Is there any good way to achieve this? Thanks!
13:01:03 <ChrisWarrick> determinant: scan_posts is now a plugin of its own, you could try working on that
13:01:41 <ChrisWarrick> determinant: Also, this might be a useful enough feature for inclusion in Nikola core -- try looking for existing issues and creating a PR for your improvement.
15:26:40 <determinant> ChrisWarrick: Yes, I can see a plugin named scan_posts, but that's not very helpful because the sorting is done in `scan_posts` function in nikola.py.
15:27:44 <determinant> ChrisWarrick: what I need to do is to modify the key used for sorting a little bit so the posts can be sorted first by a special key which indicates whether the post is sticky, then by the normal data and path name.
15:28:18 <determinant> "normal data"->"normal date"
15:29:37 <determinant> ChrisWarrick: and yeah, I suppose this "sticky" posts can be generalized to a "priority indicator", so the user can somehow pull up some posts from the history in the order they like.
15:30:27 <determinant> ChrisWarrick: and it is a useful feature :)
15:35:20 <gour> i will soon replace all php sites with Nikola and wonder whether there is need to have 'regular' webserver running on my localhost for testing Nikola sites or devserver is enough?
15:35:42 <gour> one option is to try with Caddy, but that means having Go setup which i do not need
15:36:56 <gour> otoh, if i use Hiawatha, then i have to fiddle with perms since it's installd in system's default place
15:46:35 <ChrisWarrick> gour: nikola serve is enough for local testing, but please don’t expose that on the Internet
15:46:48 <gour> ChrisWarrick: sure ;)
15:46:58 <ChrisWarrick> determinant: create an issue, make a PR
16:00:44 <determinant> ChrisWarrick: so should I directly modify the sorting code in nikola.py, or first make an issue demanding a scan_posts plugin with sorting?
17:48:27 <ChrisWarrick> determinant: both