Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

2012

Así que es­to es 2013. Si me de­cías que era 2012 te creía. ¿Có­mo me fue con mis re­so­lu­cio­nes pa­ra el año?

  • Di­­je que tra­­ta­­ría de es­­cri­­bir to­­­dos los día­s. Eso se­­rían 366 po­s­­ts, y fa­­llé mi­se­­ra­­ble­­men­­te. Po­s­­teé 215 igua­­l, que es un mo­n­­tó­­n.

  • Que­­ría me­­jo­­­rar en mi tra­­ba­­jo. Creo que lo hi­­ce bue­­­na pa­r­­te del año, aun­­que el úl­­ti­­mo mes e can­s­an­­cio me ju­­gó en contra. Me doy un apro­­­ba­­do.

  • La salud me­­jo­­­ró. Pe­r­­dí pe­­so (aun­­que re­­cu­­pe­­ré una pa­r­­te) y la pre­­sión vie­­ne bien. Los ni­­ve­­les de ene­r­­gia me­­jo­­­ra­­ron mu­­cho.

  • Mi ma­­tri­­mo­­­nio va me­­jo­­­r. Creo que el año más fe­­liz des­­de 2008.

  • No me arre­­glé los dien­­tes por una co­­­sa de pre­­pa­­ga­s. De­­be­­­ría es­­tar bien pa­­ra ma­r­­zo.

Bo­nus:

  • Lle­­vé a mi ma­­má a Pa­­rís.

  • Hi­­ce al­­gu­­nas mo­­­vi­­das pa­­ra lo­­­grar una se­­gu­­ri­­dad fi­­nan­­cie­­ra a la­r­­go pla­­zo.

  • Di la cha­r­­la de cie­­rre en Py­­co­­­nAr

  • Re­­su­­ci­­té ba­s­­tan­­te mis pro­­­ye­c­­tos de so­­­ftwa­­re li­­bre.

Así que ... ¡No muy ma­l!

Pa­ra el 2013:

  • Vo­l­­ve­­mos a lo de arre­­gla­r­­me la bo­­­ca.

  • Voy a tra­­tar de ba­­jar mu­­cho más de pe­­so.

  • Apun­­te­­mos a 200 po­s­­ts.

  • Voy a tra­­tar de es­­cri­­bir un li­­bro en­­te­­ro.

  • Me voy a ope­­rar los ojos pa­­ra de­­jar de usar an­te­o­jo­­s.

Ve­re­mos co­mo sa­le.

Client-rendered, one-URL, dynamic, static site.

My va­ca­tions end to­mo­rro­w. So, the ti­me to spend ha­cking fun, per­so­na­l, free stu­ff is going to be li­mited be­cau­se of the ti­me spent co­ding fun, free stu­ff for mo­ney. So, I de­ci­ded to fi­nish wi­th a bit of whi­ms­y.

I im­ple­men­ted a com­ple­te­ly clien­t-­ren­de­re­d, one-UR­L, dy­na­mic blo­g. Whi­ch is ac­tua­lly to­ta­lly sta­ti­c.

In fac­t, that blog is this blo­g, just wi­th a twis­t. If you go to this URL you wi­ll see wha­t's ba­si­ca­lly this ve­ry si­te, wi­th co­m­men­ts and eve­r­y­thing as usua­l. But if you cli­ck on "Pre­vious Pos­t" ... we­ll, it sta­ys in the sa­me pa­ge, even thou­gh it dis­pla­ys a di­ffe­rent post :-)

The ma­gic is the new, ex­pe­ri­men­ta­l, dy­na­mic ta­sk_­mus­ta­che plu­gin for my sta­tic si­te ge­ne­ra­to­r, Niko­la. whi­ch does the fo­llo­win­g:

  1. Ren­­ders post da­­ta as JSON fi­­les in­s­­tead of HT­­ML

  2. Crea­­tes a HT­­ML fi­­le that is rea­­lly a mus­­ta­­che.­­js te­m­­pla­­te

  3. Crea­­tes a HT­­ML fi­­le wi­­th so­­­me bi­­ts of Ja­­va­s­­cript that loads the te­m­­pla­­te and the newest po­s­­t's da­­ta.

  4. If you ac­­ce­ss that mus­­ta­­che.h­t­­ml wi­­th a fra­g­­men­­t, it uses that to fe­­tch JSON da­­ta and rew­­ri­­te itse­l­­f.

And tha­t's it. It ac­tua­lly loads fas­t, and re­ge­ne­ra­tes ve­ry fas­t, sin­ce it does mu­ch le­ss than the real si­te. The­re are a bun­ch of things that wi­ll dump you out of the "d­y­na­mi­c" si­te, like tag li­nks, and whate­ve­r, but it wo­rks sur­pri­sin­gly we­ll (and if you want to the­me it, it's just one tem­pla­te).

This is the first of a new kind of thing for Nikola, the "extra plugins". Basically, stuff that is too weird, specific or useless for the general distro, will go there, and to use those plugins, you have to create a plugins/ folder in your site and add it there manually.

En­jo­y!

Creating a Theme for Nikola From Scratch (almost)

The­re is so­me do­cu­men­ta­tion about crea­ting the­mes for Niko­la, but ma­y­be a tu­to­rial is al­so a use­ful way to ex­plain it. So, he­re it is. I'­ll ex­plain how to crea­te a the­me (al­mos­t) from scra­tch. Al­ter­na­ti­ve­l­y, you can take an exis­ting the­me and mo­di­fy on­ly par­ts of it via inhe­ri­tan­ce, but tha­t's for ano­ther do­cu­men­t.

I wi­ll try to crea­te a the­me that looks like Vi­ni­cius Ma­s­su­che­tto­'s Mo­nos­pa­ce The­me.

Leer más…


Contents © 2000-2024 Roberto Alsina