Nikola 5.4.3 released!
I am thrilled to announce the release of version 5.4.3 of Nikola a static website/blog generator.
The changelog is pretty long, more information at the announcement
Have fun!
I am thrilled to announce the release of version 5.4.3 of Nikola a static website/blog generator.
The changelog is pretty long, more information at the announcement
Have fun!
I think this is a first in the world of static site generators :-)
Now Nikola supports password-protected pages. How does it work?
If you add a password metadata field, then it will "Just Work". Like this:
I think this is a first in the world of static site generators :-) And the result is what you are seeing now.
How is it implemented? Nikola will encrypt the content using RC4, then wrap it in a <div>, and tack a form at the end that triggers Javascript code to decrypt it, and show it.
Is it secure? Well, I am not a cryptographer, so assume no. Specifically, while RC4 is considered secure, I am not discarding the beginning of they keystream, and the implementations I am using are not audited.
So, don't use this for anything that could get you in trouble. Have fun!
UPDATE Remember when I asked "Is it secure?" well, really, no it's not. It's not stupid in the sense that decoding what's written in the post will require at least a modicum of effort by whoever is so interested in reading what you are posting in your site, but people with crypto chops will crack it like a WEP-secured AP, mmmmkay? It's also stupidly easy to bruteforce this, so be smart about passwords.
OTOH, it's more secure than HTTP simple auth, since you can't sniff it (not that simple auth is secure) and it can hide a piece of the page, which using server-based auth can't.
I may do a more secure version eventually, but this is not it. Therefore, use for fun stuff, not to hide important/illegal stuff.
Since Nikola, my static blog/website generator is getting a substantial amount of code from others, I thought it may be a good idea to roughly document how it works internally. So, here is Nikola internals which is very much a work in progress.
Several people have migrated from Wordpress into Nikola, and here are some of their descriptions of the process:
A slideshow by kopf (hey, that's his IRC nickname ;-): Migrating from Wordpress to a static-page blog
A tutorial in german by Niko Wenselowski (who has done a lot of work to make the Wordpress importer behave): Wordpress nach Nikola umziehen
Slightly older, this post by Kushal Das: Importing your Wordpress blog into Nikola
In general, it seems to be working, but there's some work still to be done. Wordpress supports many different plugins and extensions which react to markup in their pages, and supporting that's almost an infinite task. Currently Nikola's importer handles a few of the more common. But if you try to import your blog and get less than ideal results, please file a bug and I'll do my best to fix it.
Usually the fixes are rather simple, it's just that I have never seen that specific thing ;-)
Have fun!
This has been in the master branch of Nikola for a while but only now have I tried to fully integrate it, and polish all (most) of the rough edges.
By default, Nikola comes with support for search forms using Google and Duckduckgo. Some people disapprove of them for different reasons [1] so there was a request about supporting a standalone search engine.
The best of breed of those things seems to be Tipue so that's what I supported.
To use this, you need to enable a plugin, and do some configuration changes.
The plugin is called task_localsearch
and you can find it in
the Nikola source tree
Suppose your site is in a folder called mysite
then to enable this plugin you need
to create mysite/plugins
and then copy task_localsearch.plugin
and task_localsearch
in there.
Then, in your site's conf.py
find these options and change them accordingly:
SEARCH_FORM = """ <span class="navbar-form pull-left"> <input type="text" id="tipue_search_input"> </span>""" ANALYTICS = """ <script type="text/javascript" src="/assets/js/tipuesearch_set.js"></script> <script type="text/javascript" src="/assets/js/tipuesearch.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#tipue_search_input').tipuesearch({ 'mode': 'json', 'contentLocation': '/assets/js/tipuesearch_content.json', 'showUrl': false }); }); </script> """ EXTRA_HEAD_DATA = """ <link rel="stylesheet" type="text/css" href="/assets/css/tipuesearch.css"> <div id="tipue_search_content" style="margin-left: auto; margin-right: auto; padding: 20px;"></div> """
How does it work? Here's a demo site for you to try!
I would not recommend doing this for a big site, since it may load a multi-megabyte javascript file when you search, but for small to medium sites, it may be ok.