Skip to content

Instantly share code, notes, and snippets.

@Irvel
Last active October 29, 2017 21:11
Show Gist options
  • Save Irvel/240fa7329318bf35d2db673467ff9b07 to your computer and use it in GitHub Desktop.
Save Irvel/240fa7329318bf35d2db673467ff9b07 to your computer and use it in GitHub Desktop.
Tweaks to The Rust Programming Language Second Edition .book config
# This is the .book file found here https://github.com/lise-henry/books/
# But with a couple of changes to fix the TOC and tweak the styling
title: "The Rust Programming Language"
author: "Steve Klabnik and Carol Nichols, with Contributions from the Rust Community"
lang: en
date: 2017-10-28
crowbook.html_as_text: false
tex.hyperref: true
rendering.highlight: syntect
# You need to modify Crowbook if you want to use a custom .tmTheme with syntec
# and also to use custom .sublime-syntax files
tex.links_as_footnotes: false
rendering.num_depth: 3
rendering.inline_toc: true
input.clean.smart_quotes: false
input.clean: false
epub.chapter.xhtml: book_template.xhtml
epub.version: 3
# I modified the template stylesheet in crowbook so that it looks a bit closer to the web version
# https://github.com/Irvel/books/raw/master/stylesheet.css
epub.css: stylesheet.css
resources.base_path.images: trpl/second-edition/src/img/
output.base_path: docs/
output.html: trpl2.html
output.epub: trpl2.epub
output.pdf: trpl2.pdf
# The nostarch files can be generated with the nostarch.sh script
# in the original book repo here: https://github.com/rust-lang/book/blob/master/second-edition/nostarch.sh
# You need to remove the remove_markup and remove_links parts of the script and only keep the link2print
# so that it merges the files appropiatedly
# I also replaced most "text" code instances with "bash" so that the terminal output would be highlighted
# You also need to remove the img/ prefix in ch20-00-final-project-a-web-server.md so that crowbook doesn't crash
@ Getting started
+ trpl/second-edition/nostarch/chapter01.md
+ trpl/second-edition/nostarch/chapter02.md
+ trpl/second-edition/nostarch/chapter03.md
+ trpl/second-edition/nostarch/chapter04.md
+ trpl/second-edition/nostarch/chapter05.md
+ trpl/second-edition/nostarch/chapter06.md
@ Basic Rust Literacy
+ trpl/second-edition/nostarch/chapter07.md
+ trpl/second-edition/nostarch/chapter08.md
+ trpl/second-edition/nostarch/chapter09.md
+ trpl/second-edition/nostarch/chapter10.md
+ trpl/second-edition/nostarch/chapter11.md
+ trpl/second-edition/nostarch/chapter12.md
@ Thinking in Rust
+ trpl/second-edition/nostarch/chapter13.md
+ trpl/second-edition/nostarch/chapter14.md
+ trpl/second-edition/nostarch/chapter15.md
+ trpl/second-edition/nostarch/chapter16.md
+ trpl/second-edition/nostarch/chapter17.md
@ Advanced Topics
+ trpl/second-edition/nostarch/chapter18.md
+ trpl/second-edition/nostarch/chapter19.md
+ trpl/second-edition/nostarch/chapter20.md
+ trpl/second-edition/nostarch/appendix.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment