Skip to main content

Ralsina.Me — Roberto Alsina's website

Migrating from Wordpress to Nikola

Sev­er­al peo­ple have mi­grat­ed from Word­press in­to Niko­la, and here are some of their de­scrip­tions of the pro­cess:

In gen­er­al, it seems to be work­ing, but there's some work still to be done. Word­press sup­ports many dif­fer­ent plug­ins and ex­ten­sions which re­act to markup in their pages, and sup­port­ing that's al­most an in­fi­nite task. Cur­rent­ly Niko­la's im­porter han­dles a few of the more com­mon. But if you try to im­port your blog and get less than ide­al re­sult­s, please file a bug and I'll do my best to fix it.

Usu­al­ly the fix­es are rather sim­ple, it's just that I have nev­er seen that spe­cif­ic thing ;-)

Have fun!

Moving the feed off Feedburner

Since Google seems to be leav­ing be­hind RSS and they own Feed­burn­er, and this site's feed is host­ed there, I am re­gain­ing con­trol of it start­ing now. If you are read­ing this site via feed­burn­er, the new RSS feed is here

I am stop­ping the feed­burn­er up­dates so this will be vis­i­ble there as long as the ser­vice stays up.

No, no hablo de eso.

Así que Bergoglio es pa­pa. Sí, Bergoglio, el que di­jo que en el mat­ri­mo­nio igual­i­tario "está la en­vidia del De­mo­nio que pre­tende de­stru­ir la im­a­gen de Dios", porque la im­a­gen de su dios dis­crim­i­na.

Sí, el Bergoglio que dice que ve pros­ti­tu­tas de once años en la calle, pero en vez de hac­er una de­nun­cia poli­cial lo que hace es un dis­cur­so.

Si, el Bergoglio que di­jo "hay dos proyec­tos: el de nues­tra fe, que re­conoce a Dios co­mo Padre, y hay jus­ti­cia y hay her­manos. Y otro proyec­to, el que en­gañosa­mente nos pone el en­e­migo, que es el del Dios ausen­te, la ley del más fuerte, o el del rel­a­tivis­mo sin brúju­la" co­mo si porque no creo en su dios soy una her­ramien­ta de su de­mo­ni­o, y mala per­son­a.

Sí, el Bergoglio que di­jo "Lo pe­or que le puede pasar a un ser hu­mano es de­jarse ar­ras­trar in­ade­cuada­mente por las luces de la razón", y que ob­vi­a­mente ha re­sis­ti­do esa tentación por más de se­ten­ta años.

Si, ese Bergoglio aho­ra es el sober­a­no ab­so­lu­to de la ciu­dad es­ta­do del Vat­i­cano. No, no ten­go na­da que de­cir al re­spec­to.

Standalone Search in Nikola

This has been in the mas­ter branch of Niko­la for a while but on­ly now have I tried to ful­ly in­te­grate it, and pol­ish all (most) of the rough edges.

By de­fault, Niko­la comes with sup­port for search forms us­ing Google and Duck­duck­go. Some peo­ple dis­ap­prove of them for dif­fer­ent rea­sons [1] so there was a re­quest about sup­port­ing a stand­alone search en­gine.

The best of breed of those things seems to be Tipue so that's what I sup­port­ed.

To use this, you need to en­able a plug­in, and do some con­fig­u­ra­tion changes.

The plugin is called task_localsearch and you can find it in the Nikola source tree

Suppose your site is in a folder called mysite then to enable this plugin you need to create mysite/plugins and then copy task_localsearch.plugin and task_localsearch in there.

Then, in your site's conf.py find these options and change them accordingly:

SEARCH_FORM = """
<span class="navbar-form pull-left">
<input type="text" id="tipue_search_input">
</span>"""

ANALYTICS = """
<script type="text/javascript" src="/assets/js/tipuesearch_set.js"></script>
<script type="text/javascript" src="/assets/js/tipuesearch.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('#tipue_search_input').tipuesearch({
        'mode': 'json',
        'contentLocation': '/assets/js/tipuesearch_content.json',
        'showUrl': false
    });
});
</script>
"""

EXTRA_HEAD_DATA = """
<link rel="stylesheet" type="text/css" href="/assets/css/tipuesearch.css">
<div id="tipue_search_content" style="margin-left: auto; margin-right: auto; padding: 20px;"></div>
"""

How does it work? Here's a de­mo site for you to try!

I would not rec­om­mend do­ing this for a big site, since it may load a mul­ti­-megabyte javascript file when you search, but for small to medi­um sites, it may be ok.


Contents © 2000-2023 Roberto Alsina