Commit Graph

192 Commits

Author SHA1 Message Date
Mathieu David e34bef0e53 (Refactor) Move mdbook.rs to mod.rs 2016-04-26 23:04:27 +02:00
Mathieu David 1b8af2bf57 Fix #120 destination and source directories can now be constructed correctly even if multiple directories do not exist on the path 2016-04-25 15:58:44 +02:00
Mathieu David 876ea7895a Fix #131 where src and dest paths were not prefixed with the root directory if it was not the current directory 2016-04-25 15:50:34 +02:00
Mathieu David 2ec5648587 Remove BookConfig field from MDBook
MDBook now stores the necessary information, BookConfig is not used as a field anymore. It is only used for parsing the configuration file. This allows to more easily replace the book.json config with the new tomlbased config
2016-04-05 12:44:14 +02:00
Boris-Chengbiao Zhou e861880f95 Implement Serve feature 2016-04-02 05:20:46 +02:00
Mathieu David 15d26befcc Refactor: Move extern crate definitions to lib.rs 2016-03-27 18:22:17 +02:00
Mathieu David 74fff81e4b Refactor: Move fs related functions from utils into their own submodule 2016-03-17 22:41:00 +01:00
Mathieu David ad0794a0bd Add a rustfmt config and run rustfmt on the code base 2016-03-17 22:31:28 +01:00
vrinek bc41efe414 Move `.gitignore` directly under the root folder 2016-03-07 08:52:19 +00:00
Mathieu David 73ce3f814a Merge branch 'init-with-gitignore' of https://github.com/vrinek/mdBook into vrinek-init-with-gitignore 2016-03-02 19:20:21 +01:00
vrinek 1eb59428e6 Ask user to create `.gitignore` and skip on `--force` 2016-02-28 15:28:11 +00:00
Jesse Stricker 330b1ad55d Add description config option 2016-02-25 14:32:49 +01:00
vrinek 596455f28c Generate simple .gitignore on init 2016-02-23 14:03:45 +00:00
Jesse Stricker 88fabd76f0 Copy favicon on 'init --theme' 2016-02-22 17:20:54 +01:00
Mathieu David 78e1897b47 Remove code that has better equivalent in std
Path_Ext has been stabilized in the Standard Library, the temporary copy I had can go.

I found a fs::create_dir_all method that does exactly what create_path was doing, but better... create_path is thus replaced with that.
2016-01-03 13:02:04 +01:00
Steve Klabnik 6bcc592ed9 Implement 'mdbook test'
Fixes #69
2015-12-15 13:56:24 -05:00
mdinger b164e0709b Fix many minor warnings found by clippy 2015-09-16 22:48:01 -04:00
Mathieu David 754773f857 Fix doc test II 2015-09-11 21:21:26 +02:00
Mathieu David a32d170667 fix code in doc 2015-09-11 21:01:34 +02:00
Mathieu David a050d9c4ad Big refactoring, now using enum for different book items (Chapter, Affix, Spacer, ...) Closes #9 2015-09-11 20:52:55 +02:00
Mathieu David be7c0bd059 Clean up of the Renderer trait, render now borrows the book instead of the config and the book items... 2015-08-31 15:24:42 +02:00
Mathieu David 99942cd46d Merge pull request #45 from FuGangqiang/fgq
fix #8: Init -> create files in summary.md
2015-08-30 08:43:24 +02:00
FuGangqiang 77b9882825 fix #8: Init -> create files in summary.md 2015-08-30 00:51:23 +08:00
Mathieu David 262aa91948 Added a utility method to remove all content of a dir but not the dir itelf. Fixes #32 2015-08-16 13:20:10 +02:00
Mathieu David a5aa357f57 Clean-up: Remove all 'hacky' exist checks and replace by 'exists()' 2015-08-13 10:46:56 +02:00
Mathieu David 0932bfd576 Big clean-up, reduced the unwrap's to 2 in the library part! Closes #36 The unwraps where replaced with more diverse error messages #14 2015-08-11 22:55:51 +02:00
Mathieu David 835c61c7f3 Some clean-up + initial implementation of '--theme' flag for init. Still needs some work 2015-08-11 16:13:41 +02:00
Mathieu David b7214f92a1 Add documentation for MDBook #30 2015-08-06 21:10:59 +02:00
Mathieu David 731149d37a Fix bug where src and output where not in function of MDBook.root but the current working dir when using set_src() and set_dest() 2015-08-06 14:27:07 +02:00
Mathieu David 01369ea42f Checked the API, moved handlebars theme handling to the theme module to expose it to every renderer. Closes #28 2015-08-05 22:35:26 +02:00
Mathieu David 191f594e78 Added function to MDBook to swap renderer #10 2015-08-04 20:51:16 +02:00
Mathieu David 4ae77d771a Moved book.json from src to root. Now src can be set to whatever you want. Closes #27 2015-08-04 01:25:41 +02:00
Mathieu David 22280bbb16 Add debug! macro that can be activated using the "debug" feature. #19 2015-08-03 18:06:01 +02:00
Mathieu David c64824a18c Added author and dest field in book.json, fixed bug when output directory did not exist. Closes #7 2015-08-03 14:23:32 +02:00
Mathieu David 9b4298c066 Initial implementation for reading the config file: book.json #7 2015-08-03 01:37:13 +02:00
Mathieu David 5b11907a56 Added navigation icons + javascript code to hide them when there is no previous or next. Closes #12 2015-08-01 14:18:25 +02:00
Mathieu David f500b4a836 Rough implementation for handlebars helper to display toc correctly, probably needs a little bit of cleaning... Url in toc doesn't work yet. It needs to be cleaned before './url' -> '/url' and 'url' -> '/url' 2015-07-29 00:57:47 +02:00
Mathieu David 4203b5b1c4 added markdown with 'pulldown-cmark', added basic styling, render of the toc is still not completely done 2015-07-28 21:01:13 +02:00
Mathieu David 4d4f35ecba First big step for the html renderer, it reads an handlebars template and creates the files from SUMMARY.md respecting the source folder structure 2015-07-19 00:08:38 +02:00
Mathieu David 60e47d2e08 fix error in init(): write "- [chapter 1](...)" to SUMMARY.md instead of "[chapter 1](...)" note the lack of dash at the beginning 2015-07-18 00:14:04 +02:00
Mathieu David 7fa5b06ccb Rudimentary: Parse SUMMARY.md, support for nested levels. Only list items: "- [name](path)" or "* [name](path)" #2 2015-07-18 00:04:20 +02:00
Mathieu David 4fe0bc2de5 renamed directory + created BookItem 2015-07-16 19:26:16 +02:00