Skip to main content

Ralsina.Me — Roberto Alsina's website

Some New Stuff in Nikola

I did some quick work on Niko­la (a stat­ic web­site/blog gen­er­a­tor) late­ly, af­ter a long time, and here's what it was:

Multilingual Sitemaps

So, sitemaps are used by Google to in­dex your site. It turns out that they can de­scribe when there are sets of pages that are trans­la­tions of each oth­er. So the next re­lease will do that (Is­sue #1610)

Matplotlib Plots

Mat­plotlib comes with a sphinx ex­ten­sion to do plots So I went and im­ple­ment­ed it, this was Is­sue #1242 and it's a plug­in called py­plot­s, which will be soon at http://­plu­g­in­s.get­niko­la.­com#py­plots

I hat­ed the orig­i­nal code. It felt con­vo­lut­ed, and just weird (it's prob­a­bly just me) so I wrote it from scratch and it has some mi­nor dif­fer­ences, but it's fair­ly com­pat­i­ble.

Classy Images

The do­cu­tils im­age di­rec­tive, for what­ev­er rea­son, does­n't sup­port a class op­tion, so you need to do things like this:

.. class:: foo

.. image:: blah.png

Which is ... not pret­ty. So I did a hacky plug­in that mon­key­patch­es the im­age di­rec­tive to add that op­tion. The plug­in is at http://­plu­g­in­s.get­niko­la.­com/#­classy-im­ages and this fix­es Is­sue 1538

Mediawiki Markup

djbclark point­ed out that there is a li­brary to parse Me­di­aWi­ki from python called sm­c.mw so I im­ple­ment­ed a plug­in to use it, so now you can use Me­di­aWi­ki markup. The plug­in is at http://­plu­g­in­s.get­niko­la.­com/#­me­di­awi­ki

Removed Default Swatch from Bootswatch

This was Is­sue #1656 and now you have to spec­i­fy the swatch. This is a us­abil­i­ty fix, be­cause de­faults mat­ter.

Played with KaTeX

Niko­la sup­ports math us­ing Math­Jax. Math­Jax has some in­ter­est­ing qual­i­ties:

  • It's 160MB of code or so

  • It's not prac­ti­­cal to use with­­out a CDN

  • It's not prac­ti­­cal to use we­bas­set bun­­dles with it

Then, klingt­net men­tioned some­thing called Ka­TeX I had nev­er heard about. I did a quick hacky con­ver­sion to see how it work­s. Not done yet, to­tal­ly ex­per­i­men­tal, but it may be pos­si­ble to bun­dle it, and maybe even have it turned on by de­fault, re­mov­ing the need for the math­jax la­bel which is aw­ful us­abil­i­ty-­wise.

Some of these things are merged, some are still PRs, some are in core, some are plug­ins. They were all pret­ty fun to do :-)

Full Fathom Five (Craft Sequence, #3)

Review:

I am start­ing to wish the mag­ic sys­tem in these books had been thought a lit­tle more. It seems to be a lit­tle too con­ve­nien­t.

In any case:

* Good to see char­ac­ters from the pre­vi­ous book­s! Maybe it's all com­ing to­geth­er in the next one?
* Kai is a very in­ter­est­ing lead
* The idea of crim­i­nal re­ha­bil­i­ta­tion in this book is scary as hell

Two Serpents Rise (Craft Sequence, #2)

Review:

So, there's this guy liv­ing in a large city, south by the west coast, you see, and he's in­volved in some strange thing about wa­ter right­s.

Be­cause he's stub­born and has some in­ves­ti­gat­ing tal­en­t, he ends up way over his head, in the com­pa­ny of big fish, along with this mis­tery gal who may not be what she ap­pears to be.

So, like Chi­na­town (the movie) ex­cept LA is pop­u­lat­ed by mad aztec­s, and cen­tral amer­i­ca was de­stroyed a while ago. What's not to like?


Contents © 2000-2022 Roberto Alsina