Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

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
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!

Contents © 2000-2023 Roberto Alsina