Turn Jos' blog posts into a mdbook-based tutorial
ClosedPublic

Authored by kossebau on Dec 17 2017, 11:48 AM.

Details

Summary

How to create the tutorial:
$ cargo install mdbook
$ cd tutorial
$ mdbook build

Then open build/tutorial/index.html in a web browser.

See also http://rust-lang-nursery.github.io/mdBook/

Diff Detail

Repository
R881 Rust Qt Binding Generator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau requested review of this revision.Dec 17 2017, 11:48 AM
kossebau created this revision.
This revision is now accepted and ready to land.Dec 17 2017, 12:03 PM

Initial draft of converting your current 2 blog posts into a tutorial/documentation.

Basically copied the 2 Markdown files from your site and added stuff needed for the mdbook setup.
Then snipped away stuff which seemed giving-context-to-blog-post.

Next worked through the resulting text (never tried the tutorial before, so fresh eyes) and updated parts where I got stuck and more handholding seemed proper.
I also copied over some style from https://michael-f-bryan.github.io/rust-ffi-guide/ which I found helpful: adding a comment of the full file name at the top of full snippets (where format allows), it reconfirms one while copying over the code. And for shell related stuff it seemed better to prefix with a $ so one has a better idea of commandline.

BTW, I added sourceSize: Qt.size(width, height) to the Image component for better rastering. Which allows to point again to the original Rust logo file of that used name. Which means the screenshots are now slightly outdated, but before I did that I am curious for your comment about it, if there are further reasons for the custom logo SVG (which also has no margin inside compared to the original file).

Not sure if mdbook is perfect (e.g. it seems to happily fetch online stuff and only falls back if no access?), but I would for now think "if you are in Rust, do as the Rust people".

I did not see that you changed the text. Just merge and I'll read through it later today. Great to see that you managed to make something work with the text.

This revision was automatically updated to reflect the committed changes.

There you go :)

I have some more feedback on the actual tutorial, but will get to you about that only later, perhaps tonight.

D9356, D9357, D9359 should keep you busy for now ;)

Another thing I did which you will see in the diffs of the md files: I changes all links to web UIs of KDE repos to https://commits.kde.org, as this is the wrapper url recommended by sysadmin for long-time stable repo pointers, which will also work after the switch from cgit to whatever next web UI there might come (currently planned: having phabricator replace it).