Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about wiki

New mini-project: Gyro


Facu­batis­ta: ralsi­na, yo, vos, cerveza, un lo­cal-wik­i-server-he­cho-en-un-­­con-in­ter­faz-web en tres ho­ras, pen­sa­lo

Facu­batis­ta: ralsi­na, you, me, beer, a lo­cal-wik­i-server-­­-we­b-in­ter­face in three hours, think about it


The next day.

So, I could not get to­geth­er with Facu, but I did sort of write it, and it's Gy­ro. 1

Technical Details

Gy­ro has two part­s: a very sim­ple back­end, im­ple­ment­ed us­ing San­ic 2 which does a few things:

  • Serve stat­ic files out of _stat­ic/

  • Serve tem­plat­ed mark­down out of pages/

  • Save mark­down to pages/

  • Keep an in­dex of file con­tents up­dat­ed in _stat­ic/in­dex.js

The oth­er part is a web­page, im­plem­nt­ed us­ing Boot­strap 3 and JQuery 4. That page can:

  • Show mark­­down, us­ing Show­­down 5

  • Ed­it mark­­down, us­ing Sim­­pleMDE 6

  • Search in your pages us­ing Lunr 7

And that's it. Open the site on any URL that doesn't start with _static and contains only letters and numbers:

  • http://lo­­cal­host:8000/My­­Page : GOOD

  • http://lo­­cal­host:8000/My­Dir/My­­Page: BAD

  • http://lo­­cal­host:8000/__­­foo­bar__: BAD

At first the page will be sort of empty, but if you edit it and save it, it won't be empty anymore. You can link to other pages (even ones you have not created) using the standard markdown syntax: [go to Foo­Bar](­Foo­Bar)

There is re­al­ly not much else to say about it, if you try it and find bugs, file an is­sue and as usu­al patch­es are wel­come.


Why Gy­ro? Gy­ros are de­li­cious fast food. Wi­ki means quick. Al­so, I like Gy­ros. to check it out. So, since this was a toy pro­jec­t, why not?


Why San­ic? Ev­er since Ale­jan­dro Lozanoff men­tioned a flask-­like frame­work done with the in­ten­tion to be fast and async I want­ed


Why boot­strap? I know more or less what it does, and the re­sult­ing page is not to­tal­ly hor­ri­ble.


Why JQuery? It's easy, small and I sort of know how it work­s.


Why Show­down? It's sort of the stan­dard to show mark­down on the we­b.


Why Sim­pleMDE? It looks and works awe­some!


Why Lun­r? It works and is small­er than Tipue which is the on­ly oth­er sim­i­lar thing I know.

Contents © 2000-2021 Roberto Alsina