Skip to main content

New mini-project: Gyro


Facubatista: ralsina, yo, vos, cerveza, un en tres horas, pensalo

Facubatista: ralsina, you, me, beer, a in three hours, think about it


The next day.

So, I could not get together with Facu, but I did sort of write it, and it's Gyro. 1

Technical Details

Gyro has two parts: a very simple backend, implemented using Sanic 2 which does a few things:

  • Serve static files out of _static/

  • Serve templated markdown out of pages/

  • Save markdown to pages/

  • Keep an index of file contents updated in _static/index.js

The other part is a webpage, implemnted using Bootstrap 3 and JQuery 4. That page can:

  • Show markdown, using Showdown 5

  • Edit markdown, using SimpleMDE 6

  • Search in your pages using 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://localhost:8000/MyPage : GOOD

  • http://localhost:8000/MyDir/MyPage: BAD

  • http://localhost:8000/__foobar__: 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 FooBar](FooBar)

There is really not much else to say about it, if you try it and find bugs, file an issue and as usual patches are welcome.


Why Gyro? Gyros are delicious fast food. Wiki means quick. Also, I like Gyros. to check it out. So, since this was a toy project, why not?


Why Sanic? Ever since Alejandro Lozanoff mentioned a flask-like framework done with the intention to be fast and async I wanted


Why bootstrap? I know more or less what it does, and the resulting page is not totally horrible.


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


Why Showdown? It's sort of the standard to show markdown on the web.


Why SimpleMDE? It looks and works awesome!


Why Lunr? It works and is smaller than Tipue which is the only other similar thing I know.


Comments powered by Disqus