Quantcast
Channel: friedchickenandgazoline - Latest entries
Viewing all articles
Browse latest Browse all 15

Sphinx & ReadTheDocs - First Impressions

$
0
0

Well, it's poopin' nice.

My TIE library, while still needing quite a few tweaks, is almost ready for its first release. Almost meaning that i still need to write some documentation for it.

And boy, do I **hate** writing documentation...

But since I have to do it anyway, I decided to try this fancy sphinx tool to generate it.

Well, I'm still amazed at how easy it is to use. You basically write you doc in reStructuredText (A good occasion to start learning it), run a make html command, and you end up with a pretty cool static site containing your whole documentation, with (easy to setup) cross referencing between pages or objects and a pretty efficient search feature.

You can also ask it to generate an API reference from your project's docstring, but while pretty handy, its output turns out to be not so nice without hand tweaking it. Dart, I made a point of writing overly long docstrings for just that purpose, all for nothing :(

Once your doc mini site is done (well, I did it already to see how it worked), just go and host it on readthedocs.org. Their integration with github is really great: just point it to your repo's url, and it will find your doc's rst source, build the site and serve it. You can also configure a service hook on your github's settings to have it notify readthedocs each time you push some new code, so that the doc site can be rebuilt instantly! (Well, i've had some trouble with that. On a couple occasions, the doc wouldn't rebuild until maybe half an hour after the push, no matter what i did. I don't know if this is normal or not, but hey, it ended up updating itself anyway, so that's cool). Oh, and i like their theme better than the default one from sphinx, too.

I haven't written very much yet (partly because i've had to look up several reST constructs along the way) but i probably got much further than i would without those two neat toys; As much as I still hate writing documentation, I must admit that getting to see this neat and professional looking site build itself along the way makes it way more fun.

Here's a link to the reathedoc site, if anyone's interested. I'll probably release TIE before it's complete, but i'll finish at least the tutorial and a rudimentary API Reference before i do so. You know, just to make the lib actually usable if someone happen to want to try it...

Also, turns out that TinyMCE sucks. I probably shouldn't have gotten the 4th and last version, which seem to be pretty new and, ironically given this post's subject, is documented like crap. I'll get rid of it and try something else when i'm not lazy.


Viewing all articles
Browse latest Browse all 15

Trending Articles