Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

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

Nikola v5 Released

A new ver­sion of Niko­la is ou­t! You can get it at the usual pla­ce.

This ver­sion is not com­ple­te­ly ba­ckwar­ds com­pa­ti­ble, thus the new ma­jor ver­sion num­be­r, but swi­tching to it should be ea­s­y-is­h. If you are using ver­sion 4.0.3:

  1. Re­­mo­­­ve your do­­­do­­.­­py

  2. Use niko­la build ins­tead of doit from now on

  3. use niko­la ser­ve ins­tead of doit ser­ve, niko­la new_­post ins­tead of doit new_­post, and so on. So­me other doit ta­sk are al­so con­verted in­to niko­la co­m­mand you can get the list using niko­la help

The in­te­gra­tion of doit in­to Niko­la is not do­ne in a ve­ry ni­ce wa­y, tha­t's sti­ll on­going wo­rk, but it should be Good Enou­gh To Wo­rk (T­M).

Ho­pe you en­joy this re­lea­se!

Features

  • Te­m­­pla­­tes now know their na­­me from te­m­­pla­­te_­­na­­me in their co­n­­tex­­t.

  • Ma­­de most of Niko­­­la in­­to Ya­p­sy plu­­gi­n­s.

  • Re­­cu­r­­se ga­­lle­­rie­s/ and ren­­der ea­­ch fo­l­­der as a ga­­lle­­r­­y.

  • Brea­­d­­crumbs and fo­l­­der li­nks in ima­­ge ga­­lle­­rie­s.

Bugfixes

  • Fixed doc in­s­­ta­­lla­­tion

  • Put we­­ba­sse­­ts ca­­che in ca­­che/we­­ba­sse­­ts

  • Up­­da­­te to doit 0.17

  • Do­­n't crash on in­­co­m­­ple­­te tran­s­­la­­tions

  • Fixed Is­­sue 160: ren­­de­­r_­­tags di­d­n't ca­­ll scan_­­po­s­­ts()

  • Fixed Is­­sue 161: we­­ba­sse­­ts se­­tting USE_­­BUN­D­­LES was ig­­no­­­red (fix by sche­­tti­­no­­72)

  • Fixed Is­­sue 153: in­­dex.­­txt was being ig­­no­­­red in ga­­lle­­rie­s.

Se viene...

... un mon­tń de fo­tos del via­je. Quie­ro ar­mar­me un wo­rk­flow pa­ra que sea muy fá­cil pos­tear las fo­tos to­dos los día­s.

Voy a me­ter ese wo­rk­flow en las ga­le­rías de Niko­la, ya que no creo que sea mu­cho la­bu­ro, y ten­go unas cuan­tas ho­ras muer­tas en tre­nes/a­vio­nes/­co­lec­ti­vo­s/­su­lkis/­tri­neo­s.

Nikola is Pluginificated.

Yes, I know that's not a re­al word.

So, the git mas­ter of Niko­la now has plug­ins. In fac­t, not on­ly does it have plu­g­in­s, but is ba­si­cal­ly made of plug­ins.

You see, the code used to most­ly be in­side a class (called Niko­la), and ... it had grown. That class had grown up to around 2000 lines of code. Which is com­plete­ly ridicu­lous.

So, us­ing Yap­sy I turned the code in­side out: al­most all the code that was in that mon­ster class was moved in­to plug­ins and the class turned in­to a smart plug­in load­er.

This has brought sev­er­al ad­van­tages:

  • Now you can ex­­tend Niko­la for your own pur­­pos­es. Just cre­ate a plug­in fold­er in your site, and put the ex­­tra func­­tion­al­i­­ty there.

  • Sup­­port for whole cat­e­­gories of things is now mod­­u­lar. Want to sup­­port a dif­fer­­ent markup? A dif­fer­­ent tem­­plate sys­tem? Just write a plug­in.

  • Want to add com­­plete­­ly new func­­tions to Niko­la? Like, say, a way to im­­port da­­ta from an­oth­er blog tool, or some­thing like plan­et soft­­ware? Well, just add a "com­­mand plug­in".

What has changed for the user?

  • You can delete do­do.py from your site.

  • Use niko­la build in­stead of doit

  • Use niko­la serve in­stead of doit serve

Some mi­nor things still need do­ing in this area (no­table, fix­ing the doc­s), but the main refac­tor­ing is there.

Improved Wordpress.com Importer and a Question

Thanks to the co­op­er­a­tion of Hu­mi­tos who gave me his word­press back­up, I did some im­prove­ments in the word­press.­com im­port fea­ture of Niko­la, my stat­ic web­site/blog gen­er­a­tor

So, if you were to try to use nikola_wordpress_importer from master now, it would:

  1. Not crash ;-)

  2. Down­load at­­tach­­ments

  3. Fix links to at­­tach­­ments so they work on the new site

How­ev­er, I am now un­sure of what ex­act­ly is in word­press.­com's ex­port XML file. The posts them­selves are in this for­m:

Muchas gracias Nico por hacer el video este. Groso, quedó muy bueno.

[youtube=http://www.youtube.com/watch?hl=es&v=882qxARXa6c]

Two things jump to me:

  1. That's not HTML

  2. WTF is that youtube thing?

I am hav­ing some suc­cess pro­cess­ing it as mark­down, since that han­dles the para­graph breaks and some oth­er stuff. Maybe the youtube em­bed­ding is done with a mark­down ex­ten­sion?

Any­one knows?

Nuevo Feature en Nikola: wordpress.com Importer

Qué An­da:

  • Po­s­­ts

  • Pá­­gi­­nas

  • Bo­­­rra­­do­­­res

  • Tags

  • In­­fo­r­­ma­­ción pe­r­­so­­­nal

No an­da:

  • Co­­­men­­ta­­rios

  • Li­nks en­­tre po­s­­ts y pá­­gi­­nas se de­­jan­­tal cual

  • La sali­­da es muy ge­­né­­ri­­ca

Necesita teesting, así que siéntanse libres de agarrar master y probarlo. Suponiendo que foo.xml contiene tus datos de wordpress.com:

nikola_import_wordpress foo.xml
cd new_site
doit && doit serve

Y apun­tá tu bro­w­ser a http://­lo­calhos­t:8000 pa­ra ver qué hi­zo :-)

Ajustes menores del conf.py generado pueden ser necesarios para un mejor resultado.


Contents © 2000-2023 Roberto Alsina