Skip to main content

Ralsina.Me — Roberto Alsina's website

Nikola 1.1 is out!

A sim­ple yet pow­er­ful and flex­i­ble stat­ic web­site and blog gen­er­a­tor, based on doit, mako, do­cu­tils and boot­strap.

I built this to pow­er this very site you are read­ing, but de­cid­ed it may be use­ful to oth­er­s. The main goals of Niko­la are:

  • Small code­base: be­­cause I don't want to main­­tain a big thing for my blog

  • Fast page gen­er­a­­tion: Adding a post should not take more that 5 sec­onds to build.

  • Stat­ic out­­put: De­­ploy­­ment us­ing rsync is smooth.

  • Flex­i­ble page gen­er­a­­tion: you can de­­cide where ev­ery­thing goes in the fi­­nal site.

  • Pow­er­­ful tem­­plates: Us­es Mako

  • Clean markup for post­s: Us­es Do­cu­tils

  • Don't do stupid build­s: Us­es doit

  • Clean HTML out­­put by de­­fault: Us­es boot­s­trap

  • Com­­ments out of the box: Us­es Dis­­qus

  • Tags, with their own RSS feeds

  • Easy way to do a blog

  • Stat­ic pages out­­­side the blog

  • Mul­ti­lin­gual blog sup­­port (my own blog is en­g­lish + span­ish)

I think this ini­tial ver­sion achieves all of those goal­s, but of course, it can be im­proved. Feed­back is very wel­come!

Niko­la's home page is cur­rent­ly http://niko­la-­gen­er­a­tor.­google­code.­com

jjconti / 2012-03-31 12:48:

Mi prueba rápida no funcionó:

doit 0.15
mako 0.2.5
docutils 0.6

nikola-1.1$ ./dodo.py 
Traceback (most recent call last):
  File "./dodo.py", line 146, in <module>
    execfile("nikola/nikola.py")
  File "nikola/nikola.py", line 367, in <module>
    lookup=template_lookup)
  File "/usr/lib/pymodules/python2.6/mako/template.py", line 82, in __init__
    _compile_module_file(self, file(filename).read(), filename, path)
  File "/usr/lib/pymodules/python2.6/mako/template.py", line 271, in _compile_module_file
    node = lexer.parse()
  File "/usr/lib/pymodules/python2.6/mako/lexer.py", line 156, in parse
    if self.match_tag_start():
  File "/usr/lib/pymodules/python2.6/mako/lexer.py", line 208, in match_tag_start
    self.append_node(parsetree.Tag, keyword, attributes)
  File "/usr/lib/pymodules/python2.6/mako/lexer.py", line 94, in append_node
    node = nodecls(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/mako/parsetree.py", line 211, in __call__
    filename=kwargs['filename']
mako.exceptions.CompileException: No such tag: 'block' in file 'templates/post.tmpl' at line: 3 char: 1
Roberto Alsina / 2012-03-31 13:47:

Ese Mako es viejiiiiiiiiiisimo. Los blocks existen desde Mako 0.4.1 y ya anda por el 0.7.
Es tambien posible que docutils 0.6 (que tiene como 3 años, actual es 0.8) te haga algún problema pero menor.

jjconti / 2012-03-31 20:54:

 Ok,

easy_install doit
easy_install mako
easy_install docutils

y salió andando.

jjconti / 2012-03-31 13:15:

Mirando nikola.py

1) import nikola que hace? Ha! importa __init__.py... me sonó confuso, pero bué'

 2) funciones como esta hacen que sea dificil de usar en otro sitio, no?

def permalink_year_es(year):
    return("http://lateral.netmanagers.com.ar/tr/es/weblog/%s/index.html"
        % year)

Habría que usar la variable BLOG_URL

Roberto Alsina / 2012-03-31 13:48:

Fijate que no se las llama desde ninguna parte. Me olvidé de borrarlas nomás :-)

El Nomoteta / 2012-03-31 15:38:

Lo tengo corriendo en localhost exitosamente.
Estaba buscando algo simple, quizas este lo sea demasiado pero de todas formas gracias por compartirlo

idea management software / 2012-04-07 13:21:

Hello friend!!
Knowledge is endless and I think thirst for
knowledge should never end. Gaining knowledge is never ending process. I
liked this great article.     


Contents © 2000-2020 Roberto Alsina