Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre nikola (publicaciones antiguas, página 8)

New in Nikola: slideshows (work in progress)

This is no­whe­re near ready for re­lea­se, but why not show it?

Niko­la can now turn this:

.. slides::

   /galleries/london-paris-2012/P1000198.JPG
   /galleries/london-paris-2012/2P1000235.JPG
   /galleries/london-paris-2012/3_P1000298.JPG

In­to this (whi­ch wi­ll not look good in RSS):

Mis­sin­g:

  • Cus­­to­­­mi­­za­­tion

  • Su­­pport for sli­­des­ho­­ws that are not ma­­de of ima­­ges

  • Sty­­ling

This is ba­sed on sli­de­js whi­ch see­med nea­t, but I am not 100% su­re it's the way to go (it see­ms to look bad if the ima­ges are not all the sa­me wi­dth, for exam­ple).

Why Use Something Else?

I wro­te a sta­tic si­te ge­ne­ra­to­r, ca­lled Niko­la a whi­le ago, and it's star­ting to get so­me adop­tion and con­tri­bu­tion­s.

I thi­nk it's a fair­ly ni­ce pie­ce of co­de, to be ho­nes­t, and it pre­tty mu­ch does eve­r­y­thing I nee­d. On the other han­d, it's fun to co­de wi­th.

So, if you are using ano­ther sta­tic si­te ge­ne­ra­to­r, or are re­sear­ching in­to it, or just ha­ve opi­nions about it... wha­t's mis­sin­g? What should it ha­ve that it does­n't ha­ve no­w?

No fea­tu­re too sma­ll, no idea too cra­z­y, plea­se sha­re! I pro­mi­se to make a good effort to im­ple­ment any that seem like a good idea :-)

New in Nikola Master: Interactive Console

Ins­pi­red by Djan­go­'s in­te­rac­ti­ve con­so­le, I added one to Niko­la, my sta­tic si­te ge­ne­ra­tor so that if you want to play wi­th its in­ter­nal­s, you can do it ea­si­l­y. He­re's an exam­ple ses­sio­n:

$ nikola init pepe
A new site with some sample data has been created at pepe.
See README.txt in that folder for more information.
$ cd pepe
$ nikola console
Scanning posts
.
.
done!
You can now access your configuration as conf and your site engine as SITE
>>> [p.title('en') for p in SITE.timeline]
[u'Listings Demo', u'Nikola: it generates static', u'Welcome to Nikola',
u'A reStructuredText Primer', u'A reStructuredText Reference', u'Sample
Nikola Config File', u'The Nikola Handbook', u'Theming Nikola']

Ha­ve fun!

Nikola Wordpress Importer Improvements

Thanks to ha­ving users tr­ying to ac­tua­lly im­port da­ta from wor­dpress, the wor­dpress im­por­ter plu­gin for Niko­la, my sta­tic si­te ge­ne­ra­tor got a cou­ple of new fea­tu­res.

  • It wi­­ll try to mai­n­­tain your URLs via re­­di­­re­c­­ts

    If your post was in /2012/1/2/a-­­po­s­­t/ and now it wi­­ll be in /po­s­­ts/a-­­po­s­­t.h­t­­ml it wi­­ll crea­­te a re­­di­­rect from the fo­r­­mer to the la­­tte­­r.

  • ur­­l_­­map for co­­­m­­ment mi­­gra­­tion

    It wi­­ll crea­­te a CSV fi­­le co­n­­tai­­ning the ol­­d,­­new fu­­ll URLs so that you can mo­­­ve your dis­­qus th­­rea­­ds to the ri­­ght pla­­ce­s.

Al­so, mas­ter wo­rks wi­th do­cu­tils 0.10 whi­ch bro­ke in the last re­lea­se.

For the­se rea­son­s, the­re wi­ll be a 5.0.1 re­lea­se to­day or to­mo­rro­w.

PS: if you want to see a few si­tes using Niko­la, now you can.

Nikola is Python 2 1/2 ready

On my free ti­me, lun­ch hour­s, and su­ch I ha­ve been tweaking Niko­la, my sta­tic si­te ge­ne­ra­tor to make it py­thon 3 friend­l­y. We­ll, I so­mewha­t-ac­ci­den­ta­ll­y-­m­y-­do­g-­ma­de-­me-­do­-it may ha­ve co­m­mi­tted a lot of that in­to mas­te­r.

So, ri­ght no­w, things may be so­mewhat bro­ken on py­tho­n2 and so­mewhat wo­rking a li­ttle on py­tho­n3.

In any ca­se, feel free to try it ou­t, and let me know what to fix.


Contents © 2000-2024 Roberto Alsina