Posts about nikola

Changes in this blog

I have made a few changes in how this blog is generated and what features are enabled.

Similarity Plugin

I have enabled the similarity plugin and disabled the equivalent feature provided by Disqus. In general, it seems this plugin produces more whimsical connections which is a big plus. It may lead you to discover very random things I wrote. I know it reminded me of things I did not remember writing!

Continuous Import

I have enabled the continuous import plugin which will automatically merge some other aspects of my online presence with this blog. Currently it has support for goodreads (which I already mentioned before) and youtube (which I have not), so you will see short book reviews and random videos I make.

Examples: goodreads and youtube

This plugin can theoretically support anything that provides a RSS/Atom feed and lets you apply custom templates to the content so you end up with pretty posts in all cases. If you are interested in using it for some other service, feel free to ask me about it.

Front Page

For the first time ever, the front page of this site is no longer the blog, but a landing page.

Theme

At some point in the future I may switch to a more customized theme, but that's not in any specific roadmap, it will happen when it happens. In the meantime, this is now using the Lumen bootswatch and am experimenting with using FlowType for a more readable automatic font size.

Nikola v7 finally out!

I am thrilled to announce version 7 of Nikola, a static site and blog generator is out, with a bazillion features and bugfixes (see below).

You can get it at all the usual places, and here's the release announcement

Here's the new features, the bugfixes list would make the post too long :-)

  • Added UNSLUGIFY_TITLES option for making titles fetched via the filename regexp prettier (Issue #1282)
  • New dependencies: natsort (natural sorting in galleries) and dateutil (replaces pytz)
  • Nikola.commands are now the user-friendly wrappers from console (Issue #1177)
  • Add a github_deploy command to deploy to GitHub pages (Issue #1208)
  • Remove tidy filter (it was broken due to tidy being ancient) (Issue #1164)
  • Added GENERATE_RSS setting to allow disabling RSS in Nikola (Issue #1236)
  • Link listings raw sources if COPY_SOURCES is True (Issue #1214)
  • Much more powerful nikola plugin command (Issue #1189)
  • More powerful console mode allows access to all nikola commands (Issue #830)
  • New `ROBOTS_EXCLUSIONS` option listing resources to exclude from sitemap and include in new generated /robots.txt (Issue #804)
  • Generate sitemapindex containing RSS and sitemap files (Issue #804)
  • Support hooks in templates, for use by plugins (Issue #896)
  • Use readline if available (Issue #1238)
  • Replaced READ_MORE_LINK with INDEX_READ_MORE_LINK and RSS_READ_MORE_LINK (Issue #1222)
  • Added reading_time, remaining_reading_time, paragraph_count, remaining_paragraph_count tags for READ_MORE_LINK (Issue #1220)
  • Add canonical link in listings.
  • Added support for new meta files that are the same format as 1-file metadata, allowing for greater flexibility (Issue #954)
  • Colorbox is now internationalized (Issue #1205)
  • Added LOGO_URL and SHOW_BLOG_TITLE=True settings to facilitate showing off logos (Issue #1122)
  • Create automatic story index pages for subfolders, too (Issue #793)
  • New Slovak translation by Tomáš Prékop
  • Created a MarkdownExtension plugin class (Issue #1175)
  • The base theme produces properly sectioned and semantic HTML5 (Issues #1123, #1137)
  • The base theme comes with a new stylish look by default (Issue #1137)
  • The base theme supports Right-to-Left by using ::dir(rtl) CSS4 rules and <html dir="rtl"> tags where valid (Issue #1146)
  • Bootstrap 2 updated to 2.3.2 (via Issue #1137)
  • Added FORCE_ISO8601 setting that currently makes new_post use ISO 8601 dates (via Issue #1156)
  • Added support for TZ specified in post date (Issue #1118)
  • Make nikola init ask about the site’s settings (Issue #1080)
  • Use natural sorting for files and folders list in listings and galleries (Issue #1144)
  • Added invariance testing (Issue #672)
  • Plugins can inject templates in the system (Issue #1139)
  • nikola import_wordpress now has a --qtranslate option, to parse posts in the qtranslate wordpress plugin format and turn them into multilingual Nikola posts (Issue #1072)
  • nikola console allows for interpreter choice via -b, -i, -p; moreover, support for bpython is not deprecated anymore (Issue #1126)
  • retired tag for posts has been replaced with private (via Issue #686)
  • Changed the default TRANSLATIONS_PATTERN to "{path}.{lang}.{ext}". (Issues #990, #829)
  • Backwards compatibility with v5 is broken. Added backwards-incompatible changes. (Issue #829)
  • Added a CONTENT_FOOTER_FORMATS config option. It is used to format the CONTENT_FOOTER variable properly, for compatibility with the Translatable Settings feature. The variable takes a dict, the keys of which are languages, and values are (args, kwargs). (Issue #1112)
  • Certain settings are now translatable. As of now, the settings are: BLOG_AUTHOR, BLOG_TITLE, BLOG_DESCRIPTION, LICENSE, CONTENT_FOOTER, SOCIAL_BUTTONS_CODE, SEARCH_FORM, BODY_END, EXTRA_HEAD_DATA, NAVIGATION_LINKS, READ_MORE_LINK (the up-to-date list is available in SITE.TRANSLATABLE_SETTINGS) (Issues #851, #1057, #1061, #1112)
  • New Post.author() returns meta 'author' or BLOG_AUTHOR (Issue #1117)
  • Ship base-jinja, bootstrap-jinja, bootstrap3-jinja with Nikola (Issue #1104)
  • Invert HIDE_SOURCELINK and HIDE_UNTRANSLATED_POSTS into SHOW_SOURCELINK and SHOW_UNTRANSLATED_POSTS (Issue #1076)
  • Remove old messages left over for backwards compatibility: (Issues #829, #1105)
    • "More posts about", replaced by "More posts about %s"
    • "Posted", replaced by "Posted:"
    • "Also available in", replaced by "Also available in:"
  • Remove old "sl_SI", "tr_TR" locale aliases (use "sl" and "tr") (Issue #829, #1105)
  • New option RSS_PLAIN to optionally strip HTML from RSS feeds (Issue #1107)
  • Support content key in compilers' create_post (Issue #1098)
  • Use setuptools’ extras feature. Use pip install nikola[extras] to install Nikola with extras (requirements-extras.txt, formerly requirements-full.txt -- note the name change!) (Issue #1089)

Nikola Logo Contest!

So you have design skills? Want to make a little money while doing a good thing? Then join the contest! there is a 200 US dollars guaranteed prize, and the contest will be judged by a group of Nikola developers.

Some guidance:

  • The name Nikola comes from Nikola Tesla, so think concepts connected to that
    • The Wardenclyffe tower
    • Tesla Coils
    • Lightning
    • Electricity
    • Early 20th century
  • I hope the logo works well in a variety of formats so, keep it simple. B/W is good.
  • A drawing without the word Nikola is good, but a good design with the word in it could be good also.

The contest lasts a week, you have 4 days for the qualifying round.

And remember: it has to be better than these

Nikola is now more compatible with Sphinx

Sometimes, you need to use the same text in more than one place. For example, you may want to use fragments of your software manuals in your software's site.

If you are part of the Python-verse then it's likely that your docs are written using Sphinx. Ǹikola and Sphinx share roots in reStructuredText so they are already compatible in many important ways.

However, Sphinx adds a whole bunch of extensions to reStructuredText and Sphinx users use them. So, what's a dev to do? He'll write code. So I wrote a nikola plugin which adds support for a large chunk of the Sphinx-specific markup.

How big a chunk? Quite big since it adds support for over 35 extensions, roles and directives (no, toctree is not one of them yet).

This way, you may be able to enjoy a good documentation-specific tool and a (if I may say so myself) good website tool from common sources.

Enjoy!

Preview of Nikola Webapp

I have already made a few attempts at turning Nikola, a static site and blog generator into a webapp, with varied success. One of the bigger problems was, I think, one of scale. I was thinking of something to replace http://wordpress.com ... something where everyone could host his own blog in very low cost infrastructure.

But then again... why not try to replace all those self-hosted wordpress instances out there? So, here's the webapp plugin!

It's very early stages, no support for pages, only supports markdown, no configuration changes, and you can't even really delete things. But hey, you can post, which is 95% of the usage this will get.

UPDATE: if you are running Nikola from github master, you can install this using the plugins repo: http://plugins.getnikola.com/#webapp and it supports a lot more than on the video above.

Trivial Nikola Deployment Using Pancake.io and Backlift

So, you want to publish a site and want to do it now? As in, really right now? And for free? And you are a Nikola user.

If you are a Dropbox user, open an account at Pancake.io Then set your OUTPUT_DIR to something like /home/yourname/Dropbox/Apps/Pancake.io and build. That's it. No deploy step.

Or open an account at Backlift and set OUTPUT_DIR to /home/yourname/Dropbox/Backlift/foo where foo is your site's name as configured in Backlift. Build. No deploy step.

Or open an account on DropPages.com or KISSr or Site44.com or just use a Dropbox public folder.

Each of these services has advantages and disadvantages, from lame URLs to costing money, but hey, for a quick thing they are cool. You can always upgrade to the real thing later.

Being an Inclusive Project (and how GitHub saved my day)

I have posted over 50 posts here about Nikola and most of them contain something like "Nikola, my static blog/site generator". Well, that's not the case anymore. From now on I will say "a static blog/site generator". Why? Let's see.

For starters, it's no longer true that I wrote it. Although I am still pushing more code that anyone, there are 54 other contributors. That number is astonishing. Why? Because I estimate there are around 200 Nikola users. That means the ratio of contributors to users is incredibly high.

That is probably explained because the way you build a site using Nikola is very programmer oriented. You could describe a static site generator as a sort of "site compiler" and not be far off the mark. Many of the benefits, like you can host your page sources in github! are completely misterious to non-programmers. So, I expected that number to be high, but, having a 25% user=>developer conversion rate? That's bizarre.

So, I suspect I did some things well with this project [1], and wanted to think them out loud, and try to further them.

One thing I think I did well was that it's an inclusive project. If you propose something you are getting heard and I am giving the proposal a fair shake. I may reject it, but not out of hand, but instead after some thought. And if I am unsure, it's accepted. I would rather get something I am not fond of than drive out a contributor [2] because I may change my mind, but a contributor that's gone is not coming back.

Same thing about granting commit rights: want them? You get them with the first successful PR by just asking.

Today there was another step on this direction: I am not the sole admin anymore. No longer is https://github.com/ralsina/nikola the canonical repo, it's now https://github.com/getnikola/nikola. The website? Not http://nikola.ralsina.me but http://getnikola.com, paid for 5 years. Added two admins to everything (the awesome damianavila and Kwpolska). Gave up sole control of a loooong list of things [3] and now I can get run over by a bus and things should not bitrot.

It protects those 54 other contributors and few hundred users from my ever losing heart or interest, which is a real risk, and should be alleviated.

I think the most important bit about converting users into contributors though, is that you just need to be friendly. And Nikola is largely a friendly project. And that's made it a lot of fun for the past year or so.

I once read that if you refused to use code written by assholes you could not boot any OS. Well, that may be true, but that doesn't mean being an asshole is OK. This is a small project that does a small thing. But at least I feel confident it's not written by assholes. And that's a victory in itself.

OTOH there are some major defficiencies still. Diversity is good in some areas (geographically, for instance) but AFAIK the percentage of women contributing to the codebase is 0% and I have no idea why, and I would love to improve that.

So, lots of work done, lots more to do. That's a good position to be in, I think.


[1] Alternative explanation: I did some things so badly I have driven out 99% of the user base.
[2] Within reason.
[3] Github's checklists on Issues are great
[4] Within reason.
[5] Optional.
[6] Not really.