Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about nikola (old posts, page 10)

Math Works Now

Do­cu­tils has sup­port­ed math ren­der­ing for a while now. That means Niko­la should have sup­port­ed it for a while too, but nev­er did cor­rect­ly be­cause ... well, be­cause noone ev­er tried, may­be?

Well, it does now, be­cause Dami­an Avi­la has fixed it!

Read more…

Nikola 5.3 released

I am hap­py to an­nounce the re­lease of ver­sion 5.3 of Niko­la a stat­ic blog/site gen­er­a­tor. It in­cludes some mi­nor fea­tures and a good amount of bug­fix­ing. Up­grad­ing to it should not cause you any trou­ble, as far as I know.

Here's the changel­og:

Features

  • Boot­s­trap 2.3.0

  • Op­­tion­al­­ly use con­­tent dis­­tri­bu­­tion net­­works for jquery and twit­ter-­­boot­s­trap (USE_CDN op­­tion)

  • Im­prove pro­­gres­­sive ren­der­ing by mov­ing javascript to the bot­­tom of pages

  • New Brazil­ian por­­tuguese tran­s­la­­tion.

  • New plan­e­­toid ex­per­i­­men­­tal ex­­tra_­­plu­g­in

Bugfixes

  • Make re­al­­ly sure we im­­port the right con­f.py

  • Make SLUG_­­TAG_­­PATH a con­­fig dep for most pages

  • Re­­moved meta ti­­tle tag for bet­ter HTML val­i­­da­­tion

  • Re­­moved #999 back­­­ground from foot­note back­­link.

  • Made foot­note re­f­er­ences be su­per­scrip­t­ed.

  • Cen­tered fig­ure's im­age and cap­­tion.

  • Re­­moved out­­set bor­der from ad­­mo­ni­­tion­s.

  • Use de­­fault theme as last re­­source for mes­sages/­­tran­s­la­­tions

  • DATE_­­FOR­­MAT op­­tion was be­ing ig­nored

  • Re­­move trail­ing "" on win­­dows gallery links (Is­­sue #298)

  • In­­­con­­sis­­tent bread­­crumbs in gallery pages (Is­­sue #303)

  • Use source files as bun­­dle de­pen­­den­­cies in­­stead of out­­puts (Is­­sue #294)

En­joy!

Nikola 5.2 released!

I am thrilled to an­nounce that you can now down­load Niko­la 5.2. a new ver­sion of my stat­ic blog/site gen­er­a­tor.

What's new in this ver­sion? A LOT. Don't let the mi­nor ver­sion tick fool you, this ver­sion is packed with good­ness. Let's start with fea­tures:

You can eas­i­ly em­bed more con­tent:

  • New vimeo di­rec­­tive for re­struc­­tured tex­t.

  • Cus­­tom "gist" di­rec­­tive pro­vid­ing re­Struc­­tured text sup­­port for GitHub gist­s.

You can write your con­tent in al­most any markup:

  • Tex­tile markup sup­­port.

  • Cre­ole Wi­­ki markup sup­­port.

  • tx­t2­­tags markup sup­­port.

  • bb­­code markup sup­­port.

  • And of course, it still sup­­ports re­Struc­­tured tex­t, Mark­­down and HT­M­L.

More lan­guages:

  • New Catalá tran­s­la­­tion

  • New pol­ish tran­s­la­­tion.

  • New Sim­­pli­­fied Chi­­nese tran­s­la­­tion.

  • Use mul­ti­lin­gual Dis­­qus (although it does­n't seem to work)

You can im­port your data:

  • New Blog­ger/Blogspot im­­porter

  • Much im­proved Word­­press im­­porter

  • Ex­­tract meta­­da­­ta from file­­name by us­ing reg­­exp (help­­ful for im­­port­ing from oc­­to­­press or oth­­er sys­tem­s).

You can do fanci­er and more con­fig­urable sites:

  • One-­­page, dy­­nam­ic-load­­ing, clien­t-ren­dered site plug­in (task_­­mus­­tache)

  • Re­cur­­sive post/s­­to­ry fold­ers

  • New COM­­MENTS_IN_­­GAL­­LERIES and COM­­MENTS_IN_S­­TO­RIES op­­tion­s.

  • Lo­­cal search based on Tipue (ex­­tra_­­plu­g­in­s/­­task_lo­­calsearch)

  • Added com­­ments to im­age gal­­leries

  • New op­­tion RSS_TEASERS

  • New STO­RY_IN­DEX op­­tion to gen­er­ate in­­dex.html in sto­ry fold­er­s.

  • Add mul­ti size fav­i­­con sup­­port.

You can use Python 2.6 or high­er ... in­clud­ing Python 3. The on­ly miss­ing bit for full Python 3 sup­port is Google sitemap gen­er­a­tion.

And of course, a lot of bugs got smashed:

  • Added sane de­­faults for most op­­tion­s, so you can have a lean con­­fig file.

  • Made lay­out of the site theme re­spon­­sive, with col­lap­s­ing navbar.

  • Use time­­line in­­stead of pars­ing post_­­pages in gen­er­ic_­­page_ren­der­er and task_ren­der_­­pages.

  • Up­­­dat­ed dis­­qus in­­te­­gra­­tion code, added iden­ti­­fiers so it works on any URL.

  • Make sure fold­er links end in "/" in the gallery code.

  • Re­­moved copy of PyRSS2­­Gen, made it a de­pen­­den­­cy.

  • De­­tect "names­­pace" de­pen­­den­­cies for Mako tem­­plates.

  • Use con­­sis­­tent en­­cod­ings in RSS feed­s.

  • Refac­­tored dis­­qus code in­­­to sep­a­rate helpers

  • Use the cor­rect ex­ten­­sion (or raise an er­ror) on new_­­post

  • Fix ti­­tles that in­­­clude quotes

  • Up­­­dat­ed to cur­rent CSS from do­cu­tils (was us­ing ver­­sion from 2005)

  • Avoid need­­less re­­gen­er­a­­tion of gallery in­­dex­es.

  • Al­ways en­­sure the fold­er for the new post ex­ist­s.

  • Get ti­­tle from file­­name if not avail­able in meta­­da­­ta.

  • Don't copy sources if they end in ".ht­m­l"

  • Don't link to un­ex­ist­ing tran­s­la­­tion­s.

  • Sort tags case in­­sen­si­­tive.

En­joy!

Lunch-hour feature in Nikola: Blogger import

To­day at lunch, I added sup­port for im­port­ing blog­ger (maybe al­so blogspot? They seem to be the same nowa­days) blogs in­to Niko­la my stat­ic blog/site en­gine.

What works?

Well, the on­ly site I tried work­s, most­ly.

  • Posts

  • Pages

  • Tags

  • Drafts

  • Blog Meta­­da­­ta (ex­­cept lan­guage)

  • Redi­rects to keep URLs sta­ble (at least it tries re­al­­ly hard!)

  • URL rewrit­ing in the posts (it tries!)

What's not there?
  • Com­­ments im­­port (it makes more sense to im­­port them via Dis­­qus' im­­port tool)

  • At­­tach­­ments (im­ages and such)

  • Much test­ing

It's ba­si­cal­ly on par with the Word­press im­port, ex­cept noone has used it for re­al. So, feel free to try!

(It's niko­la im­port_blog­ger name_of_the_­dump.xm­l)

Nikola Can Parse That

Just for com­plete­ness' sake I have gone over Wikipedi­a's list of light­weight markup lan­guages and added sup­port in Niko­la (a stat­ic site and blog gen­er­a­tor) for a cou­ple of them: BB­Code and tx­t2­tags, which brings the num­ber of sup­port­ed markup for­mats to 7 (the oth­ers are re­Struc­tured tex­t, mark­down, HTM­L, tex­tile and Wik­i).

Of the list of markup lan­guages, the on­ly miss­ing ones with a Python im­ple­men­ta­tion are Asci­iDoc and Mark­down Ex­tra.

Why both­er with this? It's not as if there was some­one ask­ing for BB­Code sup­port. How­ev­er, one of the us­es I want to sup­port is ar­chiv­ing sites. Sup­pose you have a fo­rum you want to shut down? I want you to be able to ar­chive it (even if it's some work) and keep the da­ta out there. A wik­i? Same thing.

This is a first step in that di­rec­tion.


Contents © 2000-2023 Roberto Alsina