orangeduck / BuildYourOwnLisp

Learn C and build your own programming language in under 1000 lines of code!
http://www.buildyourownlisp.com/
Other
2.91k stars 395 forks source link

Consider rewriting for gitbook #24

Closed TheThirdOne closed 10 years ago

TheThirdOne commented 10 years ago

The current version is a little sparse on style and a bit messy to edit. Turning the html into markdown and rendering it with gitbook would allow code highlighting and an easy way to view the book on github.

TheThirdOne commented 10 years ago

It would also allow hosting on gh-pages.

orangeduck commented 10 years ago

I actually started off with a Markdown version of the website but at some point transitioned to HTML because I needed more control over the formatting than Markdown would allow. Although it looks like a simple site there are quite a few places which have some less simple HTML.

The formatting also relies on a fixed-width page layout because otherwise code sections and images can end up overlapping in bad ways.

Although it can be a little bit of a pain to edit HTML by hand you get used to it pretty fast and you can be much more precise in the output.

TheThirdOne commented 10 years ago

I ported the book to gitbook. Check it out at http://gh.landersbenjamin.com/BuildYourOwnLispGitbook/

I still need to make most of the pages native markdown and fix the images, but it works nicely.

vishalsodani commented 10 years ago

Nice @TheThirdOne!! There is a spelling mistake - ERROR HANDELING

orangeduck commented 10 years ago

Cool. Keep us updated with the progress.

TheThirdOne commented 10 years ago

Almost all done, has images now, but they still need to be formatted and reference code needs to be reworked. Then proof reading to make sure I didn't accidentally delete something important comes in.

igalic commented 10 years ago

Does this allow for easy export to ePub, or other ebook formats?

TheThirdOne commented 10 years ago

I don't know specifically what formats it supports because I haven't needed to, but it should support some. It uses ebook-convert to make ebooks. Check out the readme for youself, https://github.com/GitbookIO/gitbook.

TheThirdOne commented 10 years ago

Oh and by the way, the gitbook is a featured book on http://www.gitbook.io/.

orangeduck commented 10 years ago

Looks great. Nice work :+1:

daveloyall commented 10 years ago

@TheThirdOne, in your version, none of the collapseOne things in the Reference sections I tested expand on click. So, it's not possible to view the sample code (like hello_world.c). Incidentally, I think I prefer captions vs tool-tips for the images. And "About the Author" probably links to the wrong place. :)

TheThirdOne commented 10 years ago

The code issue is noted; I already have an issue on github for it. However, I have been swamped in schoolwork recently, so I have not fixed it. Making captions look good will be difficult in markdown, so I will not fix it (though I will accept a pull request). I will look into the "About the Author" link.

TheThirdOne commented 10 years ago

@orangeduck, I have a book for this on gitbook.io and because I published it has me as author. If you have an account on it (or make one). I can give you credit. @telemachus

orangeduck commented 10 years ago

@TheThirdOne Hey - I've created an account linked to my Github account so it should be under "orangeduck".

TheThirdOne commented 10 years ago

It worked, you are now listed under Authors.

orangeduck commented 10 years ago

Awesome, thanks! In that case shall I close this issue for now?