Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about nikola (old posts, page 3)

Nikola Plans

Eng­lish on­ly!


I have not stopped work­ing on Niko­la, my stat­ic site gen­er­a­tor. Here are the plan­s:

  1. Fin­ish the theme in­­stal­l­er (so you can get a theme from the site eas­i­­ly)

  2. Im­­ple­­ment a theme gallery on the site (same pur­­pose)

  3. Fix a cou­­ple of bugs

  4. Up­­­date man­u­al

  5. Pol­ish a few theme bits

  6. Re­lease ver­­sion 3.x (new ma­jor num­ber be­­cause it re­quires man­u­al mi­­gra­­tion)

Af­ter that, I will push on projects Shore­ham (host­ed sites) and Smil­jan (plan­et gen­er­a­tor) and make them more pub­lic. Shore­ham will be­come a re­al web app for those who don't want to have their own serv­er. For free, hope­ful­ly!

Once I have that, I have no fur­ther fea­ture ideas, re­al­ly. So I need more peo­ple to start us­ing it, and that means I have to start an­nounc­ing it more.

So, stay tuned for ver­sion 3.x some­time next week.

Post-Niko­la, I will do a rst2pdf re­lease, and then will get back to work on a book.

Changing Color Schemes and Fonts in Nikola

One of the eas­i­est ways to per­son­al­ize how your site looks is us­ing col­or and ty­pog­ra­phy. While Niko­la's "site" theme is in­tend­ed to be rather bland and neu­tral, it does­n't have to be that way, and it's easy to change.

//ralsina.me/galleries/random/site-theme.thumbnail.png

Bland, sol­id and bor­ing.

To do these changes, you don't even need to know any CSS, HTM­L, or pro­gram­ming!

Here's the trick: Niko­la is us­ing Twit­ter Boot­strap to han­dle its styling. And they pro­vide a handy web form to cre­ate a cus­tom­ized ver­sion, just for you, at their cus­tom­ize page.

So, if you want au­vergine nav­i­ga­tion bars and av­o­ca­do back­ground­s, with couri­er fonts all over the place, that's where you do it. Just change the val­ue in the right vari­able to what­ev­er col­or you wan­t.

Once you have your bootstrap.zip, go to your site's folder, and create themes/mytheme/assets and unzip it in there, so that you have themes/mytheme/assets/css, themes/mytheme/assets/js, etc.

Create a file called themes/mytheme/parent containing the word site.

Then edit your dodo.py (or conf.py if you are using the git master) and change the THEME option "mytheme".

Re­build your site, and voilá, all your cus­tomiza­tions are now in place.

This aw­ful­ness, for ex­am­ple, was done by set­ting just three vari­ables (body­Back­ground, text­Col­or, and sans­Font­fam­i­ly):

//ralsina.me/galleries/random/site-c64.thumbnail.png

Yes, I had a C64.

Shoreham: Blogging with Ubuntu One (a teaser)

At Canon­i­cal's On­line Ser­vices we can do cool stuff on fri­days. We do cool stuff all week, ac­tu­al­ly, but on fri­days we can do cra­zier cool stuff.

So, to­day, I ripped off a great ser­vice of­fered by http://­calepin.­co and im­ple­ment­ed a pro­to­type blog-through-Ubun­tu-One web ap­pli­ca­tion. Of course, it's pow­ered by Niko­la,

The code is ab­so­lute non­sense, and it needs to be looked at by some­one who un­der­stands Djan­go, OAu­th, OpenID, and pro­gram­ming in gen­er­al bet­ter than I do, but hey, it does work (for a very loose def­i­ni­tion of "work").

It's called Shore­ham and no, you can't have it yet.

As a teaser, here's a video. With a pony.

In the near fu­ture I will do a bet­ter post about this ex­plain­ing the code, etc.

Alva

Al­va is al­most the op­po­site of Niko­la. If Niko­la is about mak­ing stat­ic sites, Al­va is a dy­nam­ic site. How­ev­er, as Hegel sug­gest­s, from the the­sis and the an­tithe­sis comes the syn­the­sis.

So, Al­va is about dy­nam­i­cal­ly cre­at­ing stat­ic sites. If you want to have Niko­la in your serv­er in­stead of in your own com­put­er, and have the con­ve­nience of an on­line tool, that's the niche Al­va tries to fil­l.

So, you would in­stall Al­va, and use it like any oth­er we­b-based blog­ging tool. Yet, be­hind the sce­nes, you would have Niko­la, and all the per­for­mance and se­cu­ri­ty ben­e­fits of stat­ic sites.

And maybe some­day, I (or some­one) will put up a mul­ti­-us­er ver­sion of Al­va, and you will be able to get host­ed blogs, know­ing all the da­ta is yours and you can leave any­time and do your own thing.

This is very very ear­ly stages. So ear­ly it does not work yet. But here's a teaser:

//ralsina.me/galleries/random/nikola-admin3.thumbnail.png

There is no firm time­frame for this, it de­pends on a ton of oth­er stuff and may not even hap­pen.

Nikola Screencast

I did some work today to get Nikola properly packaged. This involves some minor changes on the workflow for site authors. I am not 100% sure I have it right yet, so here is a short video showing how it works right now in the packaging branch I am doing.

The new thing is the nikola init foldername command, the rest is all old stuff. Basically, you stop having a full copy of Nikola for each site and everything is in a centralized location.

You can still do your own themes by putting them in themes/themename and add new tasks, files, etc. The configuration dodo.py is unchanged except for the "magic bit" which is slightly different.

So, not re­al­ly in­va­sive, easy to mi­grate to, and en­ables much eas­i­er up­dates in the fu­ture, as long as we don't break any im­por­tant stuff in a non-­com­pat­i­ble way.

Here is the video: