Compare commits

..

2335 Commits

Author SHA1 Message Date
Samy Pesse 4cb5bb06fb Bump version to 3.1.1 2016-06-10 22:19:09 +02:00
Samy Pesse 24988b75ea Fix extsAsciidoc.js 2016-06-10 22:14:04 +02:00
Samy Pesse 775e858d05 Expose markdown/asciidoc extensions to gitbook module 2016-06-10 22:13:31 +02:00
Samy Pesse 1e3d871c1e Merge branch 'fix/plugins_loading' 2016-06-10 22:08:16 +02:00
Samy Pesse 94a4310c1e Adapt Plugins.loadForBook to use correct order 2016-06-10 22:04:19 +02:00
Samy Pessé e8ee57be83 Start fixing order of plugins in dependencies 2016-06-10 18:34:24 +02:00
Samy Pessé 50a132cb2c Add method "createChildLevel" to SummaryPart 2016-06-10 18:11:22 +02:00
Samy Pessé 59be32a54f Add method .createChildLevel for SummaryArticle 2016-06-10 18:08:56 +02:00
Soreine 4ae7cdb5d1 Mention autocover plugin in docs 2016-06-10 18:03:40 +02:00
Samy Pessé 990a4efeb5 Update gitbook-markdown and gitbook-asciidoc 2016-06-10 17:53:10 +02:00
Samy Pessé 9c927dcf13 Fix #1374 and #1360: apply transform of conrefsLoader using a string, not a buffer 2016-06-10 17:45:30 +02:00
Samy Pessé 7a08b3f109 Fix #1377: fix listing of plugins when using gitbook as a library 2016-06-10 17:15:04 +02:00
Samy Pessé 94d4234cb8 Merge branch 'fix/plugins_order' 2016-06-10 16:44:13 +02:00
Samy Pessé fbc851bc4e Fix listAll to add default plugins after normal ones 2016-06-10 16:43:32 +02:00
Samy Pessé e92b661a2a Adapt sortPlugins to only sort an ordered map of plugins 2016-06-10 16:37:44 +02:00
Soreine b9fe60915f Add tests for insertPart 2016-06-10 15:40:51 +02:00
Samy Pessé 1bf7d092f0 Merge pull request #1363 from todvora/master
Fixed target attribute for external links
2016-06-10 00:28:50 +02:00
Samy Pesse 826d472511 Fix documentation about themes 2016-06-08 20:06:50 +02:00
Samy Pessé a6b1f4bd87 Compare list of plugins sorted to array of names in tests 2016-06-08 15:08:11 +02:00
Samy Pessé 004f91f02c sortPlugins should not be async 2016-06-08 15:02:34 +02:00
Samy Pessé e6c6ec4293 Improve testing for sortPlugins 2016-06-08 14:57:54 +02:00
Soreine a1d3acf065 Fix serve cli using new ConfigModifier.addPlugin 2016-06-08 10:42:27 +02:00
Soreine a732660f59 docs: cover remove extraneous line 2016-06-08 10:35:12 +02:00
Nicolas Gaborit e1bb0638f8 docs: cover, fix formatting 2016-06-08 10:16:54 +02:00
Soreine 788c0c7e7e Adds cover.jpg info 2016-06-08 10:12:42 +02:00
Tomas Dvorak 762fe16a17 fixed target attribute for external links 2016-06-07 18:34:36 +02:00
Samy Pessé 15123805d1 Fix linting error 2016-06-07 16:24:22 +02:00
Samy Pessé 23aecb4f2b Improve output of page to text with frontmatter 2016-06-07 16:23:12 +02:00
Samy Pessé f1d200b81b Rollback frontmatter parsing to js-yaml to be browserify compatible 2016-06-07 14:32:12 +02:00
Samy Pessé b566711ee1 Add method toText to Page 2016-06-07 12:51:35 +02:00
Samy Pessé 22da5aac11 Switch frontmatter parsing to gray-matter 2016-06-07 12:47:16 +02:00
Samy Pessé f7b95102c5 Expose Page model 2016-06-07 12:36:32 +02:00
Samy Pessé ca70c934d6 Split page parsing into parsePageFromString and parsePage
Add tests for parsePageFromString
2016-06-07 12:31:21 +02:00
Samy Pessé 1cc48fa314 Use Immutable instead of lodash for mergeDefaults 2016-06-07 12:06:29 +02:00
Samy Pessé b63b5574d3 Only merge objects in mergeDefaults 2016-06-07 11:40:54 +02:00
Samy Pessé 67106e8698 Improve plugins config modifier 2016-06-07 11:06:53 +02:00
Samy Pessé dc2ab51a88 Update i18n-t and juice 2016-06-07 10:54:34 +02:00
Samy Pessé cedfa186f2 Remove merge-defaults dependency 2016-06-07 10:48:04 +02:00
Samy Pessé 80f0d1bfed Update gitbook-markdown and gitbook-asciidoc to use lodash@4 2016-06-07 10:36:01 +02:00
Samy Pessé 7178ab1f82 Improve Config.toText to return only the required fields 2016-06-07 10:26:28 +02:00
Samy Pesse bf895b707e Improve addPlugin to not append default plugins to the list 2016-06-07 00:56:24 +02:00
Samy Pesse 996170a4ad ConfigModifier.removePlugin should toggle off if default 2016-06-07 00:48:47 +02:00
Samy Pesse aa66a4f928 Expose DEFAULT_PLUGINS as a list of PluginDependency 2016-06-06 22:04:13 +02:00
Samy Pesse 23010fa54a Adapt tests for config modifiers 2016-06-06 21:22:44 +02:00
Samy Pesse 0baebc7979 Change config modifier to work on a config object 2016-06-06 21:20:00 +02:00
Samy Pesse 257158321c Bump version to 3.1.0 2016-06-06 19:51:44 +02:00
Samy Pesse ddf0a41e29 Add method editPlugin to config modifiers 2016-06-06 19:42:44 +02:00
Samy Pesse 357e1e8e96 Add unit tests for postRender 2016-06-06 19:24:12 +02:00
Samy Pesse 7a89f9869a Update gitbook-markdown@1.3.0 and gitbook-asciidoc@1.2.0 2016-06-06 18:07:31 +02:00
Samy Pesse 30fbd22efe Add modifier togglePlugin 2016-06-06 17:27:47 +02:00
Samy Pesse 29df73ba72 Add method "toText" to config 2016-06-06 17:16:53 +02:00
Soreine f8676483c1 Default paths are relative to the current book 2016-06-06 16:55:00 +02:00
Johan Preynat c79a6f2fba Use theme-default@1.0.4 2016-06-06 15:46:44 +02:00
Samy Pessé c38e67ea61 Merge pull request #1344 from GitbookIO/fix/readme-in-summary
Search for README file in whole summary before inserting as first article
2016-06-06 12:18:06 +02:00
Johan Preynat 97a5f8805e Use plugin-fontsettings@2.0.0 2016-06-02 10:24:12 +02:00
Johan Preynat 421fef6ebf Search for README file in whole summary before inserting as first article 2016-05-30 15:07:39 +02:00
Johan Preynat 33406c3082 Merge pull request #1336 from GitbookIO/loading/themes
Load plugins before themes
2016-05-28 11:56:34 +02:00
Johan Preynat c3851889b0 Throw an error if generateMock() cannot create the temp directory 2016-05-27 17:15:23 +02:00
Johan Preynat 4a5de2da6b Use sortPlugins() in loadForBook() 2016-05-27 15:06:20 +02:00
Johan Preynat 1afb23cada Add test file for sortPlugins() 2016-05-27 15:06:08 +02:00
Johan Preynat a3b0f3f868 Export plugins sorting method to load plugins before themes 2016-05-27 15:05:55 +02:00
Johan Preynat 0aa32916d6 Add prefix for theme plugins as constant 2016-05-27 15:05:33 +02:00
Samy Pessé ebe845d46c Bump version to 3.0.3 2016-05-27 12:16:56 +02:00
Samy Pessé edee8d2fc5 Update gitbook-theme-default@1.0.3 2016-05-27 12:07:35 +02:00
Samy Pessé 5f3de0876f Add header 'X-Current-Location' to serve and fix handling of directories 2016-05-27 12:01:28 +02:00
Samy Pessé 2ceab04d01 Increase timeout for tests of plugin installation 2016-05-27 11:40:05 +02:00
Samy Pessé de37de44e8 Add tests for installation of all plugins 2016-05-27 11:18:12 +02:00
Samy Pessé ccb87d5a13 Add unit tests for installPlugin 2016-05-27 11:10:39 +02:00
Samy Pessé e2e0ca3f05 Add test for plugin version resolution 2016-05-27 10:54:56 +02:00
Samy Pessé b33a79704b Switch plugin installation and resolveVersion to use PluginDependency instead of Plugin 2016-05-27 09:38:23 +02:00
Samy Pessé 6def174b84 Merge pull request #1334 from ryanswanson/master
Fixed two issues for handling git URLs for plugins
2016-05-27 09:27:11 +02:00
Samy Pessé 346a18b444 Merge pull request #1335 from GitbookIO/fix/1333
Fix #1333: fix invalid URLs for glossary annotations
2016-05-26 22:30:06 +02:00
Samy Pesse b32685c698 Add test for custom glossary file 2016-05-26 22:01:40 +02:00
Samy Pesse 09b3618da8 Annotate glossary terms before resolving links 2016-05-26 21:38:27 +02:00
Samy Pesse 901328f247 Complete basic tests for glossary 2016-05-26 21:37:10 +02:00
Samy Pesse b47ebaa9d9 Use real glossary name when annotating 2016-05-26 21:10:06 +02:00
Ryan Swanson 465e8d6c0a Fixed two issues for handling git URLs for plugins that are published to git repositories rather than on npmjs.org.
Fixed issue in pluginDependency to dereference 'name' and 'version' using Immutable Map.get(...) accessors since config values are now wrapped by Immutable.fromJS(...) in config.js > setValue(...).  Added associated unit test.

Fixed issue in resolveVersion where a plugin may be using a git URL rather than a semver for the version portion of the plugin config definition.  In addition, refactored the resolveVersion function into a new module to allow for unit testing.  Added associated unit test.
2016-05-26 14:30:29 -04:00
Samy Pessé ecd86ec877 Method for parsing glossary when not listed in summary 2016-05-26 17:26:11 +02:00
Samy Pessé 5d7864154c Start test for glossary generation 2016-05-26 17:25:49 +02:00
Samy Pessé 7b915428f7 Fix #1316: fix regression for supporting uppercase filenames in structure 2016-05-26 11:07:13 +02:00
Samy Pesse 0bce3517fd Bump version to 3.0.2 2016-05-25 21:50:38 +02:00
Samy Pesse 089815a8fd Fix #1328: fix crash when anchor links 2016-05-25 21:49:58 +02:00
Samy Pesse 7e8f1a9632 Bump version to 3.0.1 2016-05-25 20:00:04 +02:00
Samy Pesse 8469648241 Update theme-default@1.0.2 2016-05-25 17:14:15 +02:00
Samy Pessé e7a44358a5 Update Changelog 2016-05-24 15:38:26 +02:00
Samy Pessé fb930d889f Fix anchor breaking links resolution 2016-05-24 15:32:30 +02:00
Samy Pessé 721a75309b Fix #1316: adapt regexp to handle dot in filenames 2016-05-23 13:00:01 +02:00
Samy Pessé b856bff91b Add failing test for #1316 2016-05-23 12:48:46 +02:00
Samy Pesse 0744f000f9 Fix doc for conrefs 2016-05-22 19:59:53 +02:00
Samy Pesse d1e226dba5 Bump version to 3.0.0 2016-05-20 22:18:37 +02:00
Samy Pesse 1923d28d71 Update dependencies 2016-05-20 22:17:44 +02:00
Samy Pessé 484a306adb Fix error with isInRoot when empty root 2016-05-20 21:41:02 +02:00
Samy Pessé 5bfc9f2f56 Fix PathUtils.isInRoot on windows 2016-05-20 21:37:22 +02:00
Samy Pesse 86a65e5287 Improve appveyor configuration 2016-05-20 19:23:51 +02:00
Samy Pesse 956d301dd7 Add node v6 to appveyor matrix 2016-05-20 18:22:44 +02:00
Samy Pesse 00d1a7b5a6 Update theme-default@1.0.1 2016-05-20 18:17:34 +02:00
Samy Pessé 2718c9c017 Fix test command for windows 2016-05-19 10:45:25 +02:00
Samy Pesse 3234c1e03f Fix #1310: enforce language config in language books 2016-05-19 00:15:09 +02:00
Aaron O'Mullan c8f8eece92 Merge pull request #1308 from arebee/patch-1
Fix english phrasing for Node version.
2016-05-19 00:10:08 +02:00
Richard Burte 7394efa9dc Fix english phrasing for Node version. 2016-05-18 09:54:04 -07:00
Samy Pesse 3e4241fc88 Implement renderInline method and missing output methods for API 2016-05-17 19:45:48 +02:00
Samy Pesse a5ae79604c Implement renderBlock method for plugin API 2016-05-17 19:30:28 +02:00
Soreine fc4bdd68a1 Can only use file names 2016-05-17 16:47:52 +02:00
Soreine f83975b022 Mention the structure configuration variable 2016-05-17 16:37:13 +02:00
Soreine 167d3957bf Expose lookup method for parsable files 2016-05-17 12:48:03 +02:00
Samy Pessé a9571fd67d Bump version to 3.0.0-pre.15 2016-05-12 16:53:14 +02:00
Samy Pessé ac87f48ba5 Update theme-default@1.0.0 2016-05-12 16:52:19 +02:00
Samy Pessé 05403f527d Fix bug that can happen when configuration file doesn't exist 2016-05-12 16:45:09 +02:00
Samy Pessé 53c72f0806 Add api method getPageByPath for plugins 2016-05-12 16:29:36 +02:00
Samy Pessé c8c2a61f96 Fix #1289: add option to filter files when listing using fs.listAllFiles 2016-05-12 16:10:11 +02:00
Samy Pessé 08d780d1f6 Fix #1300: parse page frontmatter and content when listing pages 2016-05-12 15:48:02 +02:00
Samy Pessé 2e74fafa36 Add template method "getPageByPath" 2016-05-12 15:12:08 +02:00
Samy Pessé 28ac9ab88a Fix #1299: pass fileExists as global function for template, accept null/undefined as param 2016-05-12 15:04:30 +02:00
Samy Pessé 26acab4dfb Fix generation of ebook for multilingual book (gitbook pdf) 2016-05-12 14:29:25 +02:00
Samy Pessé d4b562e001 Fix get of cover for multilingual books 2016-05-12 14:12:43 +02:00
Soreine 61956e0646 Revert "Extend Book.getLanguageBook"
This reverts commit 7892259fe6.
2016-05-12 14:08:29 +02:00
Soreine 7892259fe6 Extend Book.getLanguageBook 2016-05-12 13:35:29 +02:00
Samy Pessé b97d1c7796 Fix languages not being added to json output 2016-05-12 13:25:09 +02:00
Samy Pessé a091c5b331 Fix path resolution when generating page with conrefs 2016-05-12 12:19:00 +02:00
Samy Pessé 784b3379b5 Improve logging when generating multilingual book 2016-05-12 11:20:27 +02:00
Johan Preynat 62446e75d2 Update book's root folder definition in Changelog 2016-05-12 11:18:00 +02:00
Samy Pessé 8aa2f3075c Fix #1294: multilingual book should extend the book's config 2016-05-12 11:15:13 +02:00
Samy Pessé 839ee0385a Add method "getLanguageBook" to book model 2016-05-12 11:02:37 +02:00
Samy Pesse d6b60c6116 Adapt eslint configuration for mocha 2016-05-11 16:56:18 +02:00
Samy Pesse 9013f02850 Add test for transform option of ConrefLoader 2016-05-11 15:08:10 +02:00
Samy Pesse 961d43f085 Fix #1293: replace block shortcuts when including files 2016-05-11 14:45:54 +02:00
Samy Pessé 7bd49606e3 Merge pull request #1291 from GitbookIO/summary-modifiers
Summary modifiers
2016-05-11 13:57:21 +02:00
Samy Pesse d7c8635350 Increase mocha timeout 2016-05-11 13:57:00 +02:00
Soreine 19e9ff81d2 Tweak insertPart signature 2016-05-11 13:11:32 +02:00
Soreine e137bf632a Adds editArticleRef 2016-05-11 13:11:32 +02:00
Soreine 2fef898a1e Modifier moveArticleAfter 2016-05-11 13:11:32 +02:00
Soreine 0945807184 Greatly simplify moveArticle's implementation 2016-05-11 13:11:32 +02:00
Soreine d85663b153 Tests remove/insert articles and update insert signature 2016-05-11 13:11:31 +02:00
Soreine 481a7d790c Insert/remove part 2016-05-11 13:11:31 +02:00
Samy Pesse ef589a6b13 Switch tests to mocha while keeping jest structure 2016-05-11 13:02:24 +02:00
Samy Pesse d5c4af3377 Add immutable ignore instance for book 2016-05-11 13:02:24 +02:00
Soreine 0b4df4cdf2 Precise h2 headings for Glossary 2016-05-11 10:55:34 +02:00
Samy Pessé d6814dc48e Don't copy config file as asset 2016-05-10 15:23:59 +02:00
Samy Pessé ce50a1d50f Bump version to 3.0.0-pre.14 2016-05-10 14:37:22 +02:00
Samy Pessé a76e018d36 Update theme-default@1.0.0-pre.10 2016-05-10 14:37:05 +02:00
Samy Pessé b06f1fd677 Fix article.depth starting at 2 2016-05-10 14:36:03 +02:00
Samy Pessé 3d8b1880dc Fix page's title in pdf header/footer 2016-05-10 14:25:50 +02:00
Samy Pessé 1a13c8c9bb Add option "--no-live" for command serve 2016-05-10 13:14:32 +02:00
Samy Pessé 852fae3a09 Fix #1232: add option "--no-watch" to disable watcher and live reloading 2016-05-10 13:08:19 +02:00
Samy Pessé d342d31c8e Fix error when summary contains entry without ref 2016-05-10 12:12:19 +02:00
Samy Pesse 5b3f54fbc8 Fix "gitbook init" when article has no ref 2016-05-10 09:55:22 +02:00
Samy Pessé 308ece784c Merge pull request #1288 from todvora/patch-1
Fixed summary encoding
2016-05-10 08:55:40 +02:00
Tomas Dvorak 0758ddf04e Fixed summary encoding 2016-05-10 08:17:52 +02:00
Samy Pesse f24d9aef73 Add test for block replaced with anchors 2016-05-09 22:17:46 +02:00
Samy Pesse f8bb55f258 Adapt unit tests for blocks 2016-05-09 22:01:25 +02:00
Samy Pesse 76daebeb84 Fix unit test for templateBlock using a removed method "getParse" 2016-05-09 18:41:21 +02:00
Samy Pesse b0d366b7e8 Fix linting warning in models/templateBlock.js 2016-05-08 22:45:26 +02:00
Samy Pesse 3d0054dd64 Fix #1286: by default blocks should not be parsable 2016-05-08 22:33:41 +02:00
Samy Pessé 13bc89ff44 Merge pull request #1285 from GitbookIO/api/summary
[WIP] Api for plugins to access summary
2016-05-08 22:28:15 +02:00
Samy Pesse bb910f984e Improve comment for API summary.walk 2016-05-08 22:26:46 +02:00
Samy Pessé e576fdea14 Merge pull request #1278 from dylang/patch-1
bump bash-color to version that has a license
2016-05-08 18:44:53 +02:00
Samy Pesse c7864927ec Add method summary.getArticleByPath to summary api 2016-05-08 11:08:27 +02:00
Samy Pesse 54956de59f Start API for plugins to access the summary 2016-05-08 10:33:45 +02:00
Samy Pesse 2cbd30d1f2 Fix command "gitbook init" 2016-05-07 00:24:12 +02:00
Dylan Greene 55614f1675 bump bash-color to version that has a license
Version currently being used does not have a license making it difficult for companies to use.
2016-05-06 09:56:43 -04:00
Samy Pesse 4f7421993f Bump version to 3.0.0-pre.13 2016-05-06 10:59:52 +02:00
Samy Pesse 32ad7b530e Fix #1266: don't fail on "a" tags without "href" 2016-05-06 10:57:41 +02:00
Samy Pesse ee5d5010f6 Correctly read assets using input fs when copying 2016-05-06 10:54:13 +02:00
Samy Pesse cf7e5884cd Add method readAsStream on fs model 2016-05-06 10:53:55 +02:00
Samy Pesse 11a0a64d9e Add failing test for #1272 2016-05-06 10:36:55 +02:00
Samy Pesse b6051babac Adapt unit tests for new templating post process 2016-05-05 11:09:35 +02:00
Samy Pesse 34947b5e20 Add mode TemplateOutput to represent {content + blocks} from template 2016-05-05 11:00:05 +02:00
Samy Pesse c621380b66 Add tests for replaceShortcuts 2016-05-04 20:18:48 +02:00
Samy Pesse c4b54033ce Fix #1268: fix shortcuts of template block not being applied 2016-05-04 19:01:31 +02:00
Samy Pesse 4d85d6eb6e Fix #1267: don't fail when "node_modules" folder doesn't exist 2016-05-04 17:41:15 +02:00
Samy Pessé cc9274c9af Bump version to 3.0.0-pre.12 2016-05-04 13:50:52 +02:00
Johan Preynat bbdf7efc34 Fix location.relative(dir, file) trailing slash if file is a directory 2016-05-04 11:51:39 +02:00
Samy Pessé 38a986995a Merge pull request #1264 from GitbookIO/fix/plugin-resources
Fix Loading plugin resources
2016-05-04 10:33:29 +02:00
Johan Preynat ee8d35df7a Update Plugins.listResources() to use the prepared resources list 2016-05-04 10:30:11 +02:00
Johan Preynat be411cd5ff Update copyPluginAssets to use prepared resources 2016-05-04 10:27:21 +02:00
Johan Preynat 2104019171 List resources per plugin in website generator onInit() 2016-05-04 10:26:57 +02:00
Johan Preynat 4e564707df Add resources to website generator state 2016-05-04 10:26:06 +02:00
Johan Preynat da8611e0c3 Add global method resolve(fileName) 2016-05-04 10:25:37 +02:00
Samy Pessé 5d11641a5f Merge pull request #1260 from GitbookIO/move-article
Adds move and remove article modifier.
2016-05-04 09:47:50 +02:00
Samy Pessé 24d38e4fcf Fix #1263: Fix page generation for AsciiDoc 2016-05-04 09:30:09 +02:00
Samy Pessé efb65a8413 Remove filter for pdf/epub/mobi files when outputting 2016-05-03 17:18:13 +02:00
Soreine 3fc90554f5 Add tests, and fixes. 2016-05-03 16:02:58 +02:00
Soreine 4ebe28faae Update insert specification 2016-05-03 13:11:32 +02:00
Soreine 693171cb05 Adds move and remove article modifier. 2016-05-03 12:37:26 +02:00
Samy Pessé 42a2d090aa Bump version to 3.0.0-pre.11 2016-05-03 12:15:30 +02:00
Samy Pessé c84eaa83dd Merge pull request #1259 from GitbookIO/png-data-uri
Adding data-uri support for PNG Images in Books
2016-05-03 12:10:09 +02:00
Johan Preynat 74c3ff80cb lib/models/config.js: Fix wrong call to PluginDependency.listToArray() to PluginDependency.listFromArray() 2016-05-03 12:04:52 +02:00
Johan Preynat 5893d3ee64 lib/parse/parseConfig.js: Remove unused require 2016-05-03 12:04:04 +02:00
Johan Preynat 7f435c56a0 lib/output/modifiers/inlineAssets.js: Add inlinePng() modifier 2016-05-03 11:30:02 +02:00
Johan Preynat 59b7100cf6 lib/output/modifiers/__tests__/inlinePng.js: Add test file for inlinePng modifier 2016-05-03 11:29:40 +02:00
Johan Preynat 0923d1aa24 lib/output/modifiers/inlinePng.js: Add modifier to save inline PNG images 2016-05-03 11:29:17 +02:00
Johan Preynat ffe6c36f2f lib/output/modifiers/resolveImages.js: Don't resolve images when src is a data URI 2016-05-03 11:28:39 +02:00
Johan Preynat 8c4752c5d8 lib/utils/__tests__/location.js: Add location.isDataURI() test file 2016-05-03 11:27:36 +02:00
Johan Preynat d6202e522b lib/utils/images.js: Add convertInlinePNG() method 2016-05-03 11:27:05 +02:00
Johan Preynat 50a24c62c5 lib/utils/location.js: Add isDataURI() method 2016-05-03 11:26:38 +02:00
Soreine 6b17d08892 Adds default file naming utilities in Book model 2016-05-03 11:17:27 +02:00
Samy Pesse 79c91fd8c5 Log npm version being used when running gitbook install 2016-05-02 22:18:19 +02:00
Samy Pesse 95764258ab Update dependencies 2016-05-02 22:16:51 +02:00
Samy Pesse 41e6872557 Merge branch 'fix/plugins_deps' 2016-05-02 22:02:45 +02:00
Samy Pesse 30c96c37c2 Adapt Plugin.listAll to use a list of PluginDependency 2016-05-02 22:02:24 +02:00
Samy Pesse 20f1cf3dff Enable promise long stack trace when testing or debugging 2016-05-02 22:01:05 +02:00
Samy Pesse 8de0d6186e Fix mock fs for windows testing 2016-05-02 19:16:06 +02:00
Samy Pesse edd7d8aefe Update gitbook-asciidoc@1.1.4 2016-05-02 18:45:17 +02:00
Samy Pesse a8da4903f4 Update gitbook-asciidoc@1.1.3 to fix error on linux 2016-05-02 17:27:18 +02:00
Samy Pesse c8df5033f7 Update gitbook-asciidoc@1.1.2 2016-05-02 17:25:41 +02:00
Samy Pesse 412f418da3 Update gitbook-markdown@1.2.3 2016-05-02 17:15:54 +02:00
Johan Preynat 3782d21069 lib/output/ebook/onPage.js: Fix missing page's filepath at Modifiers.inlineAssets() call 2016-05-02 16:54:14 +02:00
Johan Preynat 82a29f4470 lib/models/languages.js: Use lang.ref 2016-05-02 16:37:47 +02:00
Johan Preynat 4a65326b24 Update jest@12.0.2 2016-05-02 16:37:24 +02:00
Johan Preynat d75d8729be lib/output/ebook/onFinish.js: Use lowercase summary.html filename from themes 2016-05-02 16:26:00 +02:00
Samy Pessé c87060454e Add model for plugin dependencies in the book.json 2016-05-02 16:24:20 +02:00
Samy Pessé bbba52c7ff Update gitbook-markdown and gitbook-asciidoc 2016-05-02 16:21:44 +02:00
Samy Pessé 33418bdb33 Document method in utils/command.js 2016-05-02 15:21:08 +02:00
Samy Pessé de47db2b66 Fix escaping of ebook-convert options 2016-05-02 15:09:10 +02:00
Johan Preynat fa6fcffbe1 Improve lib/plugins/__tests__/findInstalled.js 2016-05-02 15:06:02 +02:00
Samy Pessé 93d3f11891 Fix js error when using node < 4.x 2016-05-02 15:03:29 +02:00
Johan Preynat 59479f10fc Fix lib/plugins/__tests__/findInstalled.js 2016-05-02 14:46:54 +02:00
Samy Pessé 11e72253d4 Bump version to 3.0.0-pre.10 2016-05-02 14:40:54 +02:00
Samy Pessé 37fca9c88a Update theme-default@1.0.0-pre.9 2016-05-02 14:39:39 +02:00
Johan Preynat 6d67048e98 Use gitbook-plugin-search@2.2.1 2016-05-02 14:36:23 +02:00
Johan Preynat c516a5c1bd lib/fs/node.js: Use fresh-require@1.0.3 to read uncached configuration files 2016-05-02 14:34:34 +02:00
Johan Preynat 429431c13c lib/api/deprecate.js: Fix deprecateRenameMethod() 2016-05-02 14:05:11 +02:00
Samy Pessé b80dfd7b9a Add method contentLink as deprecated for plugin API 2016-05-02 13:50:51 +02:00
Samy Pessé 4c144b6ceb Fix Plugins.listAll to handle strings 2016-05-02 13:42:18 +02:00
Samy Pessé 718e32773a Add method removePlugin to ConfigModifier 2016-05-02 13:41:07 +02:00
Samy Pessé fb75d5d3ee Add this.gitbook.version 2016-05-02 13:41:07 +02:00
Samy Pessé 99bbcbebfc Fix modifiers for ebook format 2016-05-02 13:41:07 +02:00
Soreine 289e4b5dc1 Tweak Summary.toText doc 2016-05-02 13:38:51 +02:00
Johan Preynat a974dcdab6 lib/templating/postRender.js: Fix missing argument to engine.getBlock() 2016-05-02 13:32:27 +02:00
Samy Pessé 9a48620152 Document encodeGlobal api 2016-05-02 10:02:46 +02:00
Samy Pessé e444b3a402 Fix launch of livereload server 2016-05-02 09:59:44 +02:00
Samy Pessé fabf4f0c0a Enable livereload plugin when serving content 2016-05-02 09:56:32 +02:00
Samy Pessé d467888d6a Improve timing debug 2016-05-02 09:47:11 +02:00
Samy Pessé eb46311561 getArticleByPath is now a global function for template instead of a filter 2016-05-02 09:38:24 +02:00
Samy Pessé 63839bb0a7 Fix apply of async html modifiers 2016-05-02 09:29:49 +02:00
Samy Pessé 793fada0fb Add test for async template block 2016-05-02 09:19:57 +02:00
Samy Pessé 494ba78156 Complete api method template.applyBlock 2016-05-02 09:14:01 +02:00
Samy Pessé 9816b27ebf Update nunjucks@2.4.2 2016-05-02 09:06:59 +02:00
Samy Pessé 1c43b7891b Log resolved version when installing plugins 2016-05-02 09:02:36 +02:00
Samy Pessé 9d7739213e Remove should from git.js test 2016-05-02 08:57:18 +02:00
Samy Pessé 2ab5f6a305 Fix case of helper/resolveFileToUrl.js 2016-05-02 08:53:32 +02:00
Samy Pesse c73103969f Add signature for api template.applyBlock 2016-05-01 23:27:38 +02:00
Samy Pesse 6cbbdf5d5b Improve spacing when installing plugins 2016-05-01 22:58:25 +02:00
Samy Pesse 3a48435497 Cleanup folder before generating output 2016-05-01 19:35:50 +02:00
Samy Pesse 084925de8b Improve plugin loading to not fake module errors 2016-05-01 19:07:57 +02:00
Samy Pesse 5bac2fe695 Fix #1253: add instructions for generating ebook in docs 2016-05-01 16:15:19 +02:00
Samy Pesse 2c29fb241f Always log timing infos 2016-05-01 15:55:27 +02:00
Johan Preynat 77dc11bcc2 lib/cli/options.js: Return pure JS Array for CLI log options 2016-05-01 12:09:58 +02:00
Samy Pesse 5154622566 Add @soreine and @jpreynat to authors list 2016-04-30 23:50:47 +02:00
Samy Pesse c681cd286a Remove lodash dependency 2016-04-30 23:07:43 +02:00
Samy Pesse c1d53ec11f Switch parsers to a model 2016-04-30 22:06:16 +02:00
Samy Pesse 36b49c66c6 Merge branch 'fixes' 2016-04-30 20:15:08 +02:00
Samy Pesse 80b8e340da Fix add global env to templateEngine 2016-04-30 20:08:04 +02:00
Samy Pesse b51470db39 Add tests for conrefs loader 2016-04-30 20:06:43 +02:00
Samy Pesse a5f4596f8d Add tests for templateEngine 2016-04-30 19:00:35 +02:00
Johan Preynat 5f3c3760c0 lib/models/templateBlock.js: Fix convert blocks to pure JS array before passing to parser.parseUntilBlocks() 2016-04-30 17:05:30 +02:00
Johan Preynat 8b05885d57 lib/models/templateBlock.js: Use function for Ext() instead of var 2016-04-30 17:05:30 +02:00
Johan Preynat d9d7ab4ee5 lib/models/templateBlock.js: Add test file lib/models/__tests__/templateBlock.js 2016-04-30 17:05:30 +02:00
Samy Pesse 30bce5f9bb Add option "--timing" to mesure gitbook performances 2016-04-30 14:37:44 +02:00
Samy Pesse fbe0282738 Add tests for git utility 2016-04-30 12:30:56 +02:00
Samy Pesse 5bad08b9a0 Add this.generator as deprecated 2016-04-30 12:14:43 +02:00
Samy Pesse 310691bca2 Use areIdenticalPaths for Summary.getByPath 2016-04-29 23:43:01 +02:00
Samy Pesse 8f7967acd0 Log page causing error when a bug occurs during generation 2016-04-29 23:32:41 +02:00
Samy Pesse faf18476b1 Don't fail if page doesn't exist 2016-04-29 23:23:54 +02:00
Samy Pesse 9acccad23a Fix validation of configuration for plugins 2016-04-29 23:19:33 +02:00
Samy Pesse db1a0aedf8 Fix listing of plugins when contains "-" 2016-04-29 23:13:31 +02:00
Samy Pesse 01a26fda25 Fix linting error 2016-04-29 20:18:28 +02:00
Samy Pessé 0229272b0a Add api this.readFile and this.readFileAsString 2016-04-29 17:46:59 +02:00
Samy Pessé c817acff09 Add context for page templates 2016-04-29 17:40:35 +02:00
Samy Pessé a5eec81819 Fix context for page template 2016-04-29 17:34:33 +02:00
Samy Pessé 98f70879bd Complete ebook generation using ebook-convert 2016-04-29 16:50:50 +02:00
Samy Pessé ceb4627f4e Use API to create context for filters/blocks 2016-04-29 15:30:56 +02:00
Samy Pessé 8d9d4fe23f Merge remote-tracking branch 'origin/fixes' into fixes 2016-04-29 15:28:01 +02:00
Samy Pessé 730298110c Add ebook commands pdf/mobi/epub 2016-04-29 15:27:53 +02:00
Johan Preynat 8578f7d0d1 lib/api/encodePage.js: Fix deprecated page.progress assignment 2016-04-29 15:16:56 +02:00
Samy Pessé 07a5daefb0 Generate SUMMARY.html for ebook output 2016-04-29 15:09:11 +02:00
Samy Pessé 0ed524bce5 Correctly setup configuration for plugins in multilingual books 2016-04-29 15:08:54 +02:00
Johan Preynat 94199af7b2 Add location.areIdenticalPaths(p1,p2) to effectively compare two paths 2016-04-29 14:38:12 +02:00
Johan Preynat b8d7a00f58 Find installed gitbook-plugins in node_modules folder 2016-04-29 14:38:12 +02:00
Johan Preynat aca963befc Fix typo 2016-04-29 14:38:12 +02:00
Samy Pessé 3ea4e334bf It should generate index for languages 2016-04-29 13:04:54 +02:00
Samy Pessé 9955fa8c29 Use plugin assets from parent when language book 2016-04-29 12:46:31 +02:00
Samy Pessé fb37a6bcab Inherit plugins list from parent output when generating multilingual book 2016-04-29 11:31:54 +02:00
Samy Pessé 4f8bdbb518 Add tests for parsing a book with option "root" 2016-04-29 11:11:42 +02:00
Samy Pessé 73c190891d Fix parsing of multilingual books 2016-04-29 10:58:25 +02:00
Samy Pessé 93e701f471 Complete deprecated page.progress and this.navigation 2016-04-29 10:17:16 +02:00
Samy Pesse 68b9bf7e38 Encode navigation for compatibility with gitbook v2 2016-04-28 22:45:50 +02:00
Samy Pesse 826f90505c Add command "init" 2016-04-28 21:25:58 +02:00
Samy Pessé 7ae36f16c8 Add base for deprecated page.naviation 2016-04-28 15:45:25 +02:00
Samy Pessé 281f6d5535 Extend timeout for tests 2016-04-28 15:36:54 +02:00
Samy Pessé b4072a06c4 Add basic tests for website generator 2016-04-28 15:28:46 +02:00
Samy Pessé cb3ee423c9 Add basic tests for json generator 2016-04-28 15:20:25 +02:00
Samy Pessé 1360a744a7 Export more models 2016-04-28 15:02:24 +02:00
Samy Pessé f3058598dc Always generate a README.json as introduction of json output 2016-04-28 14:42:07 +02:00
Samy Pessé 94db0f6ec9 Fix typo in JSONUtils.encodeBook 2016-04-28 14:39:11 +02:00
Samy Pessé f08732095d Copy readme.json from main language for json output of multilingual 2016-04-28 14:37:19 +02:00
Samy Pessé f946650ddb Add "next" and "previous" to page JSON repr 2016-04-28 14:28:41 +02:00
Samy Pessé 14fd6bbdce Add tests for PathUtils 2016-04-28 14:16:15 +02:00
Samy Pessé 5059e8df34 Add modifiers to edit article and insert in summary 2016-04-28 14:12:21 +02:00
Samy Pessé 3d405a1ac5 Fix ref in summary when parsed without ref 2016-04-28 14:03:58 +02:00
Samy Pessé 78e00db018 Add tests for SummaryModifier.editPartTitle 2016-04-28 11:35:30 +02:00
Samy Pessé e62bc31e63 Add method setSummary to book 2016-04-28 11:17:33 +02:00
Samy Pessé 4763f1342c Add base modifiers for summary as SummaryModifier 2016-04-28 11:15:51 +02:00
Samy Pessé 9413e53b00 Add tests for parseIgnore 2016-04-28 10:37:52 +02:00
Samy Pessé 35d352bbeb Handle correctly ignored file in multilanguages book 2016-04-28 09:59:34 +02:00
Samy Pesse 8dd5e0c250 Add comments for todos 2016-04-27 22:42:09 +02:00
Samy Pesse 139e487998 Correctly resolve images starting with / 2016-04-27 22:36:59 +02:00
Samy Pesse 9bb0a3fbd3 Add tests for svg inliner 2016-04-27 22:18:33 +02:00
Samy Pessé 9a1a6f2625 Document cli/server.js 2016-04-27 18:02:49 +02:00
Samy Pessé e781d6d2b1 Add test for assets inliner 2016-04-27 17:58:35 +02:00
Samy Pessé 5b342b50ce Add language property to book for multilingual 2016-04-27 16:41:17 +02:00
Samy Pessé 869822d180 Use orderedMap for language books 2016-04-27 16:26:16 +02:00
Samy Pessé e50422bce5 Use code TemplateBlock to highlight code 2016-04-27 16:22:17 +02:00
Samy Pessé 999882e723 Add test for highlightCode html modifier 2016-04-27 15:42:55 +02:00
Samy Pessé d68dc82159 Merge remote-tracking branch 'origin/fixes' into fixes 2016-04-27 15:12:25 +02:00
Samy Pessé cc9fdd0032 Generate multilingual books 2016-04-27 15:12:18 +02:00
Soreine 503cc4a729 Check for stdout, for browser compatibility 2016-04-27 14:52:26 +02:00
Samy Pessé d585269228 Correctly ignore summary and templates from assets 2016-04-27 14:37:02 +02:00
Samy Pessé 50f535b910 Fix plugin's config validation 2016-04-27 14:31:45 +02:00
Samy Pessé 978bdd149e Add browser specific index.js 2016-04-27 14:18:23 +02:00
Samy Pessé a9d558e891 Add method ".toText" on glossary and summary 2016-04-27 14:11:45 +02:00
Samy Pessé 8291eb58df Complete api method output.toURL 2016-04-27 13:53:32 +02:00
Samy Pessé 7298dec353 Add plugins.resources for template context 2016-04-27 13:47:12 +02:00
Samy Pessé 7574b01863 Merge remote-tracking branch 'origin/fixes' into fixes 2016-04-27 13:13:38 +02:00
Samy Pessé 98e739a12b Add JS context for template 2016-04-27 13:13:27 +02:00
Soreine 262ce03e46 Exposes FS in public interface 2016-04-27 13:12:51 +02:00
Samy Pessé 1906691a35 Fix order of plugins assets copy 2016-04-27 12:48:40 +02:00
Samy Pessé 4ca23b84a4 Fix filters for theme templates 2016-04-27 12:08:00 +02:00
Samy Pessé b05eb8440b Don;t log deprecation warning for own logic 2016-04-27 10:38:54 +02:00
Samy Pessé f4de7748f5 Complete generator name in plugins API 2016-04-27 09:59:09 +02:00
Samy Pessé 93c26a839b Add this.book and this.options as deprecated 2016-04-27 09:42:40 +02:00
Samy Pesse 878e7441f2 Stop running test on node 0.12 for windows 2016-04-26 23:19:19 +02:00
Samy Pesse 27d387e3e1 Load i18n translations 2016-04-26 21:48:56 +02:00
Samy Pesse 7b7e4f60bc Correctly set log level 2016-04-26 20:49:20 +02:00
Samy Pesse 8bac111acf Add base for plugin JS api 2016-04-26 17:02:59 +02:00
Samy Pesse 7a46d3b497 Add command "serve" 2016-04-26 15:51:52 +02:00
Samy Pesse 357aa92e31 Add default filters to theme templating engine 2016-04-26 15:50:11 +02:00
Samy Pesse fa17f16716 Add base for commands
Improve plugins installation
2016-04-26 15:23:28 +02:00
Samy Pesse ce99c8c706 Add more tests for summary 2016-04-26 14:25:54 +02:00
Samy Pesse be828cf004 Add duration to final log for generation 2016-04-26 14:12:26 +02:00
Samy Pesse 1057bb15d3 Complete method getByPath of Summary 2016-04-26 13:03:53 +02:00
Samy Pesse ea5e8891a8 Add test for readme parsing 2016-04-26 11:17:47 +02:00
Samy Pesse 57d83f082a Add basic tests for summary parsing 2016-04-26 11:15:50 +02:00
Samy Pesse 8a3f80ba82 Add test for parsing glossary 2016-04-26 11:00:36 +02:00
Samy Pesse 374ebd6f7a Add mock fs and tests for it 2016-04-26 10:23:37 +02:00
Samy Pesse ab2ebefe2b Copy resources from plugins to output folder 2016-04-25 22:30:41 +02:00
Samy Pesse c34a9f6213 Copy assets from themes to output folder 2016-04-25 21:13:17 +02:00
Samy Pessé f5df41c75f Enable extension "do" 2016-04-25 15:44:20 +02:00
Samy Pessé 0c2dc06cb7 Fix resolution of theme's templates 2016-04-25 15:36:18 +02:00
Samy Pessé 4552ccd7d7 Add loader for themes 2016-04-25 14:44:49 +02:00
Samy Pessé 525bcd8295 Disable travis tests on 0.12 2016-04-25 14:37:49 +02:00
Samy Pessé ac2ad8d8b5 Add conrefs loader for templating 2016-04-25 14:29:51 +02:00
Samy Pessé 14ce495e9e Add more tests for LocationUtils 2016-04-25 14:15:28 +02:00
Samy Pessé 4aed2cf652 Add post processing for templates 2016-04-25 13:52:56 +02:00
Samy Pessé 244fb0ca28 Replace shortcuts in templating 2016-04-25 12:24:59 +02:00
Samy Pessé f6e123f1ed Add base rendering for template 2016-04-25 11:58:55 +02:00
Samy Pessé e1e4e7f011 Add tests for link resolution 2016-04-25 11:28:21 +02:00
Samy Pessé 814b6ff489 Complete json format 2016-04-25 11:05:06 +02:00
Samy Pessé 3aa17ab1f4 Convert markdown to html for pages 2016-04-25 10:58:10 +02:00
Samy Pessé 4646ed8f4a Fix plugins loading 2016-04-25 10:32:44 +02:00
Samy Pesse 3f5c8acb3c Add fiel for testing resolveLinks 2016-04-24 23:45:47 +02:00
Samy Pesse 93b257314a Add default filters and blocks 2016-04-24 19:12:03 +02:00
Samy Pesse 19a1db8cb4 Add base structure for templating 2016-04-24 18:52:37 +02:00
Samy Pesse c3275a4aa9 Parse multilingual books 2016-04-24 00:15:38 +02:00
Samy Pesse 927185d95c add test for modifier "annotateText" 2016-04-23 23:58:08 +02:00
Samy Pesse a3df6c6f0c Add assets inliner modifier for HTML 2016-04-23 21:10:53 +02:00
Samy Pesse e1fa977b5b Add json encoding utils 2016-04-23 17:10:16 +02:00
Samy Pesse ce95f316b9 Add method to be article by level 2016-04-23 11:22:20 +02:00
Samy Pessé a162af5a75 Add base for calling hook on page/global 2016-04-22 22:58:37 +02:00
Samy Pessé fb0ea4610d Add base utils for generation 2016-04-22 22:21:34 +02:00
Samy Pessé 4f86a9978b Add test for config 2016-04-22 11:56:34 +02:00
Samy Pessé cc78b880ce Add utils to install plugins 2016-04-22 11:33:25 +02:00
Samy Pessé 4336fdb241 Base 2016-04-22 11:00:21 +02:00
Samy Pessé 87db7cf1d4 Merge remote-tracking branch 'origin/master' 2016-04-20 17:26:49 +02:00
Samy Pessé 09ff802c7e When using structure.readme, fix link to readme to resolve to index.html 2016-04-20 17:26:13 +02:00
Johan Preynat 71b59b1950 Correctly detect promises from block.process in TemplateEngine.applyBlock() 2016-04-20 15:59:53 +02:00
Samy Pessé a3300ad9c6 Comment template code 2016-04-20 15:02:39 +02:00
Samy Pessé 8f40d4affa Fix reliability of template.self in macro import 2016-04-20 10:03:04 +02:00
Samy Pessé 560f3fcccb Update plugin-search@2.2.0 2016-04-20 09:42:11 +02:00
Samy Pesse ecaadf63c5 Correctly ignore structure file (only in root folder) 2016-04-20 00:06:45 +02:00
Samy Pesse d490a6e0b4 Correctly load plugins when using "root" option 2016-04-19 17:40:01 +02:00
Samy Pesse 53ced205b8 Ensure "template" is always set when rendering a template 2016-04-19 15:46:37 +02:00
Samy Pesse 61c4983949 Fix template context should be global in nunjucks for theming
Fix pdf_footer and pdf_header template not rendering
2016-04-19 15:33:35 +02:00
Samy Pesse fb862f466f Bump version to 3.0.0-pre.9 2016-04-19 14:18:01 +02:00
Samy Pesse 8d51300386 Bump version to 2.1.0 2016-04-19 14:16:51 +02:00
Samy Pesse c4b413563d Update theme-default@1.0.0-pre.8 2016-04-19 14:14:59 +02:00
Samy Pesse 8f852971f9 Cleanup book.js 2016-04-19 14:12:01 +02:00
Johan Preynat 3c54c89464 Use page.content if modified or fallback to page.sections in plugins hooks 2016-04-19 10:02:41 +02:00
Samy Pessé d07aa13822 Add tests for page hook 2016-04-18 17:14:55 +02:00
Samy Pessé c218f7d0e3 Correctly set template.self in all cases 2016-04-18 16:56:50 +02:00
Samy Pessé 72ad872e90 Fix js error when using output without root 2016-04-18 14:26:24 +02:00
Samy Pessé 854f244d22 Fix infinite loop on this.options 2016-04-18 14:17:51 +02:00
Samy Pessé 9acbb223db Add generator and output property as deprecated in config 2016-04-18 14:16:22 +02:00
Johan Preynat c59fc687db Ensure plugins compatibility with page.sections 2016-04-18 14:10:19 +02:00
Samy Pessé 0791b917f1 Add context for readme 2016-04-18 12:49:31 +02:00
Samy Pessé ba182ce8e4 Fix tests for copy of website theme 2016-04-15 11:33:38 +02:00
Samy Pessé 663291c515 Output context as global for themes 2016-04-15 11:33:24 +02:00
Samy Pessé 99253eecea Bump version to 3.0.0-pre.8 2016-04-14 15:02:49 +02:00
Samy Pessé 916a02cb36 Update plugins search@2.0.0 and theme-default@1.0.0-pre.7 2016-04-14 15:00:25 +02:00
Samy Pessé 114c4abcd1 Add method for theme: template.getJSContext 2016-04-14 14:51:42 +02:00
Samy Pessé e1e3d11932 Add lunr as default plugin 2016-04-14 14:51:22 +02:00
Samy Pessé df46217c78 Improve description extraction and adapt unit tests 2016-04-14 10:07:51 +02:00
Samy Pessé d18cc92396 Pass template to block's context 2016-04-14 09:51:56 +02:00
Samy Pessé 8f63b4b790 Remove unused variable 2016-04-13 17:32:01 +02:00
Samy Pessé ce7de93936 Improve block parsing to handle args/kwargs on subblocks 2016-04-13 16:22:53 +02:00
Johan Preynat ef2a24fe6f Add trailing dots to page.description when longer than 300 characters 2016-04-13 16:00:16 +02:00
Samy Pessé 038cd0155b Add filter "getArticleByPath" for theme templates 2016-04-13 11:48:29 +02:00
Samy Pessé fb430ac1ed Increase size of extracted description 2016-04-13 10:55:32 +02:00
Johan Preynat 53cfa3703b Update page context for plugins hooks 2016-04-13 09:33:26 +02:00
Johan Preynat 7ed9e8d145 Update plugin-fontsettings@1.0.3 / plugin-sharing@1.0.2 2016-04-12 17:05:32 +02:00
Samy Pessé 93e0b0cbea Watch _layouts when serving 2016-04-12 13:53:58 +02:00
Samy Pessé 0118bd3168 Cleanup code to list plugins 2016-04-11 12:29:53 +02:00
Samy Pessé 07d5245a5f Bump version to 3.0.0-pre.7 2016-04-11 09:59:58 +02:00
Samy Pessé 6b844213ec Update theme-default@1.0.0-pre.6 2016-04-11 09:59:18 +02:00
Samy Pessé dabdeb8a80 Fix #1195: fix external images and fix test for it 2016-04-11 09:56:13 +02:00
Samy Pessé ecd56315e6 Merge pull request #1220 from seanlane/patch-1
Fix minor spelling error.
2016-04-11 09:34:15 +02:00
Sean Lane 15b9e839e9 Fix minor spelling error. 2016-04-10 14:31:49 -06:00
Samy Pesse d7f7dcd47b Switch to ignore@3.1.1 2016-04-10 22:28:29 +02:00
Samy Pessé b1981e09b8 Fix generator deprecation warning being shown for each call 2016-04-10 18:20:51 +02:00
Samy Pessé c9edd0a795 Load plugins from book parent in multilingual book 2016-04-09 12:16:17 +02:00
Samy Pesse d83e0716bb Add test for main language in json output 2016-04-08 23:58:42 +02:00
Samy Pessé aed38afff3 Bump version to 3.0.0-pre.6 2016-04-08 16:35:35 +02:00
Samy Pessé 1df522e6ec Update node modules 2016-04-08 16:34:53 +02:00
Samy Pessé bd4ef2354e Merge pull request #1216 from GitbookIO/fix/ignore
Fix #1215: fix ignore rules not working
2016-04-08 15:48:33 +02:00
Samy Pessé 32a49a6969 Inherit ignore rules of output from book 2016-04-08 15:46:46 +02:00
Samy Pessé 21806687e6 Add base tests for fiailng ignore 2016-04-08 15:23:46 +02:00
Samy Pessé 7ade91a091 Disable ssh test when ci 2016-04-08 15:11:54 +02:00
Samy Pessé 4e41f96d89 Add "languages" property to all json files for multilingual book 2016-04-08 14:42:37 +02:00
Johan Preynat 325c32b4c9 Update gitbook-plugin-highlight@2.0.2 2016-04-06 10:50:03 +02:00
Samy Pessé 7d6606a8e5 Merge pull request #1202 from qjcg/patch-1
Proofreading
2016-04-06 09:19:37 +02:00
Samy Pessé c887d520eb Update github-slugid@1.0.1 2016-04-04 11:05:42 +02:00
John Gosset e6050fc558 Proofreading
A few proofreading changes with clarity in mind.
2016-03-31 13:23:15 -04:00
Samy Pessé cae4853334 Merge pull request #1194 from jashaj/master
Fix for incorrect splitting the plugin name/version
2016-03-24 21:50:26 +01:00
Jasha Joachimsthal 9ef2bebfe9 Misinterpreted second argument of String.prototype.split. Remainder of the array must be joined instead. 2016-03-24 21:21:23 +01:00
Samy Pessé 53294af810 Merge pull request #1192 from jashaj/master
Limit splitting plugin name for git with authentication
2016-03-24 16:54:29 +01:00
Jasha Joachimsthal 7d21c815a5 Limit splitting plugin name for git+ssh 2016-03-24 15:23:28 +01:00
Samy Pessé e07719a86c Fix template search paths to use plugins listed first 2016-03-22 10:59:25 +01:00
Soreine fa5bee6ca3 Import paragraph about Escaping nunchuck from old doc. 2016-03-21 15:07:22 +01:00
Samy Pessé 3a43ef2c3f Add doc for inline rendering 2016-03-18 11:55:24 +01:00
Samy Pessé 55deab03cd Add test for blocks markdown/asciidoc/markup 2016-03-18 11:26:31 +01:00
Samy Pessé edda84fefd Add block "markdown", "asciidoc" and "markup" 2016-03-18 11:20:57 +01:00
Samy Pessé 10b191f631 Use stabler block anchor in template output 2016-03-18 11:17:26 +01:00
Samy Pessé d5a575c5e0 Fix context for template block/filters 2016-03-18 11:14:04 +01:00
Samy Pessé 82d8c3e2d9 Add method renderInline and renderBlock to book 2016-03-18 11:10:58 +01:00
Samy Pessé bc0c8dbcf3 Update nunjucks@2.4.1 2016-03-18 11:07:21 +01:00
Samy Pessé de0245ff40 Update nunjucks@2.4.1 2016-03-18 11:03:22 +01:00
Samy Pessé 7f56ff0281 Fix doc for paragraph 2016-03-17 11:53:28 +01:00
Samy Pessé 2cfbf5411c Add question about text direction in the faq 2016-03-17 10:41:34 +01:00
Samy Pessé f70da1c82a Fix links in readme 2016-03-15 12:40:40 +01:00
Samy Pessé 0b4db49f57 Merge pull request #1181 from GitbookIO/feature/allplugins_tpl
All plugins can extend templates/theme
2016-03-15 12:37:52 +01:00
Samy Pessé fbffd54aa2 Load all plugins, even dependencies of plugins 2016-03-15 12:37:25 +01:00
Samy Pessé 4d19a33af2 Add method registry.list to list all plugins for a book 2016-03-15 11:43:37 +01:00
Samy Pessé 9d67a0e656 Add theme for extending theme from book 2016-03-11 11:21:47 +01:00
Samy Pessé 093005bfd9 Fix FSLoader for relative paths 2016-03-11 10:51:36 +01:00
Samy Pessé 514883f0bd Create new loader for nunjucks to avoid infinite loop 2016-03-11 10:43:37 +01:00
Samy Pessé 27681aad98 Update nunjucks@2.4.0 2016-03-11 10:20:26 +01:00
Samy Pessé 0d367da776 Use complete list of plugins for templates resolution / i18n / assets 2016-03-09 16:45:27 +01:00
Samy Pessé c499a8a13a Add back gitbook.generator property as deprecated 2016-03-09 15:50:38 +01:00
Samy Pessé 64a6de751d Change documentation's title 2016-03-09 15:22:04 +01:00
Samy Pessé d39f0d6ff0 Add "output" variables for templating 2016-03-09 15:18:57 +01:00
Samy Pessé bdbfbf7300 Merge doc for ebook and cover 2016-03-09 11:10:52 +01:00
Samy Pessé ccac3d2c3c Publish compleet reference of markdown syntax for gitbook 2016-03-08 17:26:36 +01:00
Samy Pessé f07278490f Add question about rtl to faq 2016-03-08 09:26:46 +01:00
Samy Pessé f1880fc53c Fix incorrect link in themes doc 2016-03-07 15:20:27 +01:00
Samy Pessé e8fe4a2dea Improve docs for plugins 2016-03-07 15:15:41 +01:00
Samy Pessé 1d79507665 Add book to templating context 2016-03-07 14:52:30 +01:00
Samy Pessé f05dc67887 Improve version suggestion 2016-03-07 14:06:58 +01:00
Samy Pessé ca5e57c3b7 Bump version to 3.0.0-pre.5 2016-03-07 12:26:52 +01:00
Samy Pessé 6b1fabdd92 Update theme-default@1.0.0-pre.5 2016-03-07 12:26:22 +01:00
Samy Pessé 35f0581c17 Bump version to 3.0.0-pre.4 2016-03-07 11:16:43 +01:00
Samy Pessé c79f02fe48 Add sitemap plugin for docs 2016-03-07 11:16:27 +01:00
Samy Pessé ec028a1c0d Add deprecated methods isSubBook and contentPath 2016-03-07 11:16:13 +01:00
Samy Pessé e3155dd13a Update plugin-search@1.2.0 2016-03-07 11:00:16 +01:00
Samy Pessé b61254dda6 Add more deprecated api 2016-03-07 11:00:01 +01:00
Samy Pessé b4bdf97cfe Fix linting errors 2016-03-07 10:40:25 +01:00
Samy Pessé bf98984012 Add link to slack 2016-03-07 10:28:44 +01:00
Samy Pessé 77258cbbc9 Improve intro for doc 2016-03-07 10:27:31 +01:00
Samy Pessé 4150455c3e Improve docs 2016-03-07 10:10:38 +01:00
Samy Pessé 008aacb5c2 Fix log when installing plugins 2016-03-07 09:41:59 +01:00
Samy Pessé d12d6a6a46 Fix deprecated method root for send module 2016-03-07 09:41:05 +01:00
Samy Pessé ef7594b8f7 Remove section about autocover 2016-03-07 09:38:56 +01:00
Soreine 6a73217740 Adds section for covers 2016-03-06 09:08:48 +01:00
Samy Pesse 47c44fca89 Add changelog for master 2016-03-05 22:39:11 +01:00
Samy Pesse 6fa63a5c35 Fix #1172: Fix second argument for ebook generation 2016-03-05 22:37:25 +01:00
Samy Pessé 29533908c2 Merge pull request #1168 from GitbookIO/enhancement/doc
v3 doc review
2016-03-05 15:14:17 +01:00
Soreine 74a1e9dee2 Corrects paths. And reformulate associated FAQ 2016-03-03 16:39:18 +01:00
Soreine b3662e07c1 End of review 2016-03-03 16:39:18 +01:00
Soreine 200e0c58c9 More precise git url ? 2016-03-03 16:39:17 +01:00
Soreine e67286c51d Reviewing, first part 2016-03-03 16:39:17 +01:00
Soreine 603622e337 Update plugin-highlight version to 2.0.0 2016-03-03 16:38:09 +01:00
Samy Pessé 5c2a435a25 Update everything (npm, etc) 2016-03-02 11:22:24 +01:00
Samy Pessé 4afcd722ae Fix page description tests 2016-03-02 11:22:12 +01:00
Samy Pessé 21d6964230 Extend "page" with frontmatter attributes 2016-03-02 11:11:39 +01:00
Samy Pessé 4499ccc501 Explicitly use current version as gitbook version to build 2016-03-02 10:01:32 +01:00
Samy Pessé abbca568d1 Bump version to 3.0.0-pre.3 2016-03-02 09:29:30 +01:00
Samy Pesse 40e49d0ac9 Change json format version to follow major version of gitbook 2016-03-01 22:29:09 +01:00
Samy Pessé 8d9a0a91f0 Add test for plugin installation from github 2016-03-01 16:51:47 +01:00
Samy Pessé 15640dfdf0 Add lint to jsonlint 2016-03-01 16:31:29 +01:00
Samy Pesse 2f5dde5d2f Fix links in documentation 2016-02-29 22:00:55 +01:00
Samy Pesse a9a8a04bca Tweaks in documentation 2016-02-29 21:59:05 +01:00
Samy Pesse c08e5ce62c Improve structure of doc 2016-02-29 21:50:48 +01:00
Samy Pessé ec353e179d Remove .gitbook and add "root" option 2016-02-29 17:35:12 +01:00
Samy Pessé 496f253e69 Don't copy _layouts to output 2016-02-29 10:43:53 +01:00
Samy Pessé e436115a4a Bump version to 3.0.0-pre.2 2016-02-29 09:16:00 +01:00
Samy Pessé 1c61f93b5f Add simple test for exports 2016-02-29 09:14:43 +01:00
Samy Pessé 0494f7d1fd Fix #1165: correctly normalize path in summary to accept unicode 2016-02-28 21:54:03 +01:00
Samy Pessé 4aa66338fc Add init command 2016-02-28 14:47:34 +01:00
Samy Pessé 8cda844ef1 Export output for plugins context 2016-02-28 12:46:47 +01:00
Samy Pesse dde1ef92f0 Add doc for ls-remote 2016-02-27 22:47:42 +01:00
Samy Pesse 999f8b481f Improve setup doc 2016-02-27 22:45:30 +01:00
Samy Pessé 294951f22a Change note in changelog 2016-02-26 10:07:11 +01:00
Samy Pessé 2619737f64 Bump version to 3.0.0-pre.1 2016-02-26 10:06:11 +01:00
Samy Pessé 445a90defb Simplify readme 2016-02-26 10:05:20 +01:00
Samy Pessé d3d64f636c Merge pull request #1109 from GitbookIO/3.0.0
Version 3.0.0
2016-02-26 09:41:26 +01:00
Samy Pessé eef072693b Update theme-default@1.0.0-pre.4 2016-02-26 09:40:58 +01:00
Samy Pessé 43c5f8d340 Don't add glossary to context when non existant 2016-02-26 09:25:11 +01:00
Samy Pessé b344d65302 Fix exec of svgexport on windows 2016-02-25 20:32:08 +01:00
Samy Pessé ce967f35ca Fix error message when svgexport is not installed 2016-02-25 19:21:27 +01:00
Samy Pessé 80718cc783 Fix some path normalization on windows 2016-02-25 19:15:47 +01:00
Samy Pessé 73f22332ec Update theme-default@1.0.0-pre.3 2016-02-25 16:39:25 +01:00
Samy Pessé e963b6b65d Add documentation for front matter 2016-02-25 16:37:40 +01:00
Samy Pessé 327e90e8ec Extract description from page's front matter
Fixes #1079 and #795
2016-02-25 15:43:55 +01:00
Samy Pessé 9253b764fa Don't pass cover to ebook-convert if non existant 2016-02-25 15:12:04 +01:00
Samy Pessé 393aed6270 Improve error msg for ebook generation 2016-02-25 15:09:57 +01:00
Samy Pessé b240d6a8fc Add filter fileExists 2016-02-25 14:50:58 +01:00
Samy Pessé 3cda0643fb Improve command "parse" 2016-02-25 14:45:16 +01:00
Samy Pessé 1ba63675d5 Support "sections" from gitbook 2 as deprecated for page hooks 2016-02-25 14:41:46 +01:00
Samy Pessé 32f52f2d95 Call page hooks during transformation to HTML 2016-02-25 14:26:27 +01:00
Samy Pessé 9215edc0a0 Remove option defaultPlugins and simplify loading 2016-02-25 14:17:31 +01:00
Samy Pessé 25ae21dae3 Call hook "init" during generation 2016-02-25 12:18:40 +01:00
Samy Pessé 94393bef4b Call hooks finish and finish:before 2016-02-25 12:13:31 +01:00
Samy Pessé 4f29183685 Document pdf options 2016-02-25 12:10:58 +01:00
Samy Pessé edecf56dd6 Use hook for configuration 2016-02-25 12:03:33 +01:00
Samy Pessé 08754bc626 Improve the faq 2016-02-25 11:59:45 +01:00
Samy Pessé 702542f408 Remove duplicate between book.* and config.* 2016-02-25 11:50:20 +01:00
Samy Pessé 6990b371a6 Add link to doc about .gitbook in faq 2016-02-25 11:47:41 +01:00
Samy Pessé 8020d9045b Improve header with edit button and version 2016-02-25 11:44:55 +01:00
Samy Pessé 34bb52a051 Improve templating documentation 2016-02-25 11:38:54 +01:00
Samy Pessé a2e0bc267c Improve documentation 2016-02-25 11:15:59 +01:00
Samy Pessé d86a95b5e1 Add json format version to the json output 2016-02-25 10:51:58 +01:00
Samy Pessé 585ed46034 Change "description" to "title" in config schema 2016-02-25 10:24:32 +01:00
Samy Pessé 82a4f80cd2 Use jsonschema to validate configuration 2016-02-25 10:12:46 +01:00
Samy Pessé f47a3968b7 Add tests for multilingual book and json output 2016-02-25 08:59:10 +01:00
Samy Pesse 0b592dd5c6 Add doc about languages 2016-02-24 23:02:00 +01:00
Samy Pesse addf6ade9a Add doc for glossary 2016-02-24 22:51:32 +01:00
Samy Pesse d7d0429169 Add doc section about summary 2016-02-24 22:42:11 +01:00
Samy Pesse 4bf5dc6646 Add section about ignoring files 2016-02-24 22:29:19 +01:00
Samy Pessé 5b20027f2e Use cover file from main book in multilingual book (when no cover is set for language) 2016-02-24 18:24:49 +01:00
Samy Pessé 4499f71dba Improve log when generation is finished 2016-02-24 18:12:23 +01:00
Samy Pessé 81b734c151 Fix generation of ebooks in multilanguages 2016-02-24 18:11:01 +01:00
Samy Pessé 0b4a6b5362 Output folder is an option for FolderOutput 2016-02-24 18:07:17 +01:00
Samy Pessé 3a0636046e Fix binding to context for plugin blocks 2016-02-24 17:20:48 +01:00
Samy Pessé 52eccb29e4 Add property depth to article and pages 2016-02-24 17:19:52 +01:00
Samy Pessé 86e4a935e2 Improve logging 2016-02-24 17:12:38 +01:00
Samy Pessé 1fa952b930 Fix inclusion of block using a simple function 2016-02-24 17:02:34 +01:00
Samy Pessé 78e11bc6be By default escape html in code blocks 2016-02-24 16:53:46 +01:00
Samy Pessé 40cc20e06e Load plugins once 2016-02-24 16:53:33 +01:00
Samy Pessé c223f970ec Rollback to gitbook-markdown@1.0.3 2016-02-24 16:29:12 +01:00
Samy Pessé daa80dc949 Fix conrefs loader with filename starting with / 2016-02-24 14:20:53 +01:00
Samy Pessé 255a78a534 Fix path option for template error 2016-02-24 14:10:37 +01:00
Samy Pessé 6faa469bf5 Fix install command: load config before running install 2016-02-24 14:06:56 +01:00
Samy Pessé eeefac4964 Update gitbook-markdown@1.1.1 2016-02-24 13:57:09 +01:00
Samy Pessé eb4770085a Update gitbook-markdown@1.1.0 2016-02-24 13:53:57 +01:00
Samy Pessé 1ed63ce4f5 Add context for multi-lingual books 2016-02-24 13:52:15 +01:00
Samy Pessé e85ad95bcf Generate multi-lingual index 2016-02-24 13:35:59 +01:00
Samy Pessé bd73c79787 Don't copy assets for each language book, but only for main book 2016-02-24 12:56:26 +01:00
Samy Pessé b244d506bd Correctly setup summary instance when file doesn't exist 2016-02-24 12:45:25 +01:00
Samy Pessé 44f03865c0 Add changelog for .gitbook 2016-02-24 12:14:20 +01:00
Samy Pessé 72dfb4f11d Ignore etst plugins and docs when linting 2016-02-23 15:26:28 +01:00
Samy Pessé 6b0a4f20bf Add documentation for .gitbook 2016-02-23 15:25:50 +01:00
Samy Pessé f052aacee1 Add .gitbook to locate book inside repository 2016-02-23 15:05:32 +01:00
Samy Pesse 13e2ff8035 Adapt test for paths to run on windows 2016-02-22 23:52:38 +01:00
Samy Pesse 199e61e01c Remove pdf file 2016-02-22 23:51:22 +01:00
Samy Pessé 1bf6abf338 Pass options to context of theme 2016-02-22 16:58:47 +01:00
Samy Pessé c7b1d72bf0 Add basic test for ebook generation 2016-02-22 15:46:53 +01:00
Samy Pessé 0b3bdcb219 Add tests for blocks from plugins 2016-02-22 15:39:36 +01:00
Samy Pessé 6653307fda Add tests for context of filters 2016-02-22 15:34:35 +01:00
Samy Pessé 642ba72a1d Load all filters and blocks from plugins in output's template 2016-02-22 14:50:55 +01:00
Samy Pessé 71144db09c Normalize context for plugins 2016-02-22 13:54:52 +01:00
Samy Pessé 395bd62663 Provide "plugins" context to theme templates 2016-02-22 12:31:02 +01:00
Samy Pessé d8fd6430ed Copy plugins resources to website output 2016-02-22 11:15:34 +01:00
Samy Pessé 1e243281c7 Add test for resources listing 2016-02-22 10:36:28 +01:00
Samy Pessé de23494409 Change gitignore to commit tests plugins 2016-02-22 10:20:43 +01:00
Samy Pessé b23d3a9f37 Add test for extension of book's configuration 2016-02-22 10:16:38 +01:00
Samy Pessé de31b90080 Add validation of plugin's config after loading 2016-02-22 10:11:44 +01:00
Samy Pessé ccc585ca1f Add doc for plugins 2016-02-22 08:59:19 +01:00
Samy Pessé 4dbe81cb66 Add base changelog 2016-02-22 08:54:46 +01:00
Samy Pessé d139d1d1bd Add "template.theme" and "template.default" variables 2016-02-21 19:41:38 +01:00
Samy Pessé a186544fad Add defaults filters to website tpl engine 2016-02-21 19:28:20 +01:00
Samy Pessé 7de152539d Fix order of search paths for nunjucks 2016-02-21 19:08:39 +01:00
Samy Pessé 1e486a16bd Update theme-default@1.0.0-pre.2 2016-02-21 18:48:50 +01:00
Samy Pessé 7f9c24eedb Fix test for file.mtime 2016-02-21 18:43:37 +01:00
Samy Pessé 8a3396deba Add releases notes to documentation 2016-02-21 18:38:27 +01:00
Samy Pessé 96d5b37196 Update 1.0.0-pre.1 of theme-default 2016-02-21 18:38:11 +01:00
Samy Pessé 7b2e332f6c Complete ebook command to output one file 2016-02-21 18:33:07 +01:00
Samy Pessé ab541c1653 Fix generation of pdf header/footer 2016-02-21 18:23:59 +01:00
Samy Pessé 5f058f2ceb Disable directoryIndex for ebook generation 2016-02-21 18:08:36 +01:00
Samy Pessé 360381dd9f Fix write of SUMMARY.html in ebook format 2016-02-21 17:48:06 +01:00
Samy Pessé cef4096b39 Add cli commands to build ebooks 2016-02-21 17:24:26 +01:00
Samy Pessé a9c96c1afa Fix resolve of relatives images in assets inliner 2016-02-21 17:23:07 +01:00
Samy Pessé a446deaff3 Complete generator for ebooks 2016-02-21 15:52:04 +01:00
Samy Pessé e5dd987d03 Add i18n filter fro themes 2016-02-21 13:29:17 +01:00
Samy Pessé 51fd8ae08c Simplify .next and .prev for articles 2016-02-21 12:05:31 +01:00
Samy Pessé 884540e565 Fix .next and .prev for summary's articles to use parts 2016-02-21 11:56:14 +01:00
Samy Pessé ca1313e891 Extend configuration with infos from readme 2016-02-21 11:28:55 +01:00
Samy Pessé 8df18746fa Add debug log when copying theme 2016-02-21 11:22:41 +01:00
Samy Pessé 40f829ce54 Add docs for setup gitbook 2016-02-21 11:01:49 +01:00
Samy Pessé e16b3e35f4 Setup summary for documentation 2016-02-21 01:02:38 +01:00
Samy Pessé 2f15e26ffa Fix context for templating and page 2016-02-21 01:02:20 +01:00
Samy Pessé b4cdbc6534 Add custom filters for dates to templating engine 2016-02-21 00:42:11 +01:00
Samy Pessé 0a93ffd76b Ignore node_modules during login 2016-02-21 00:33:10 +01:00
Samy Pessé 98e9848c4a Add title to summary's parts 2016-02-21 00:28:59 +01:00
Samy Pessé 42bb5fccb8 Change glossary to enforce use of h2 2016-02-20 17:39:11 +01:00
Samy Pessé fb921788b9 Fix page.toHTML by using .content directly 2016-02-20 17:35:10 +01:00
Samy Pessé 847c6b9aa2 Fix error in blocks detection with nunjucks 2016-02-20 17:32:32 +01:00
Samy Pessé cafbcd4097 Complete normalization of summary with level and multiples parts 2016-02-20 17:18:18 +01:00
Samy Pessé a22539a91e Add new gitbook-markdown and gitbook-asciidoc 2016-02-20 16:02:51 +01:00
Samy Pesse 89378c3883 Update graceful-fs@4 2016-02-18 20:32:11 +01:00
Samy Pesse f763e1dc42 Lint after travis tests 2016-02-18 19:19:09 +01:00
Samy Pesse ea13e3cec4 Change default theme repository 2016-02-18 19:06:23 +01:00
Samy Pessé 3d3302e547 Add detection of text direction and provide: 'page.dir' 2016-02-18 17:50:10 +01:00
Samy Pessé 95d81d02a1 Fix resolve of images 2016-02-18 17:03:37 +01:00
Samy Pessé 8401a674c3 Add test for navigation in summary 2016-02-18 16:34:11 +01:00
Samy Pessé 3fcf1a7723 Dont fail if summary doesn't exist 2016-02-18 15:23:15 +01:00
Samy Pessé 1a3ee78459 Accept external url in summary 2016-02-18 15:23:01 +01:00
Samy Pessé b99c499d2e Add back serve command 2016-02-18 15:08:34 +01:00
Samy Pessé 709b388dfc Fix path calcul to be coherant 2016-02-18 14:47:53 +01:00
Samy Pessé 6e83240233 Glossary should be output as a normal page 2016-02-18 13:58:10 +01:00
Samy Pessé 202c235c66 Add tests for path utils module 2016-02-18 12:15:53 +01:00
Samy Pessé 576d773fec Correctly map filenames for website output 2016-02-18 12:13:24 +01:00
Samy Pessé 58a930e456 Add "level" to TOCArticle 2016-02-18 11:50:33 +01:00
Samy Pessé 52206ce9d0 Add test for copy of assets in website generator 2016-02-18 10:53:57 +01:00
Samy Pessé 1de9d5683b Copy assets to output (website) 2016-02-18 10:45:50 +01:00
Samy Pessé b66242db98 Add filter resolveAsset to template for website 2016-02-18 10:04:23 +01:00
Samy Pesse 004ac88516 Add method .hook to plugins 2016-02-17 21:43:54 +01:00
Samy Pesse 3d1eac234a Move comment about substack/node-resolve#81 2016-02-17 21:35:25 +01:00
Samy Pesse a78e52812f Remove write operations from virtual fs 2016-02-17 21:29:25 +01:00
Samy Pesse 5993e6c791 Ignore headings for annotations 2016-02-17 21:25:53 +01:00
Samy Pesse 1ec8b7c324 Add glossary as a normal page 2016-02-17 21:25:08 +01:00
Samy Pesse e75002a96d Improve annotation with glossary terms 2016-02-17 21:03:00 +01:00
Samy Pesse a68364d4d7 Add test for location 2016-02-17 21:02:42 +01:00
Samy Pessé 2b5e836a33 Fix and improve tests for links in page 2016-02-17 17:38:39 +01:00
Samy Pessé 9caa9c39e5 Use _layouts folders as base for templates 2016-02-17 17:34:27 +01:00
Samy Pessé 096bdaba7a Fix #537: don't add index.html to links 2016-02-17 17:18:19 +01:00
Samy Pessé d22c1f57e5 Generate index.html instead of README.html 2016-02-17 17:04:23 +01:00
Samy Pessé dac00be7b5 Add some doc about theming 2016-02-17 16:51:21 +01:00
Samy Pessé 4e7cb9b23f Load template engine for website output using theme configuration 2016-02-17 16:20:45 +01:00
Samy Pessé 5fdee2cb5e Add file website output tests 2016-02-17 15:59:27 +01:00
Samy Pessé 1db3f3deab Don't fail if plugin is "empty" 2016-02-17 15:58:35 +01:00
Samy Pessé b2af55ac63 Wrap error when loading plugin 2016-02-17 15:53:37 +01:00
Samy Pessé 40cdc285b6 Don't build context in templating engine 2016-02-17 15:18:49 +01:00
Samy Pessé 46f017e68b Add type to file object in templating context 2016-02-17 15:08:26 +01:00
Samy Pessé 1769ac2c2d Don't output config in json format 2016-02-17 15:08:08 +01:00
Samy Pessé 067bdcda2d Add "config" to templating context 2016-02-17 15:07:56 +01:00
Samy Pessé 3bc1934966 Add faq in documentation 2016-02-17 15:07:19 +01:00
Samy Pessé 6ee9a3a64c Remove old theme 2016-02-17 14:07:15 +01:00
Samy Pessé c0196c97a5 Add context for summary 2016-02-17 13:59:52 +01:00
Samy Pessé 96105d6ba0 Extend templating context (and json output) 2016-02-17 13:39:20 +01:00
Samy Pessé 853ba6079c Correctly clean and ignore output folder 2016-02-17 13:30:45 +01:00
Samy Pessé b6104c64fe Use same json for page context and json builds 2016-02-17 13:12:34 +01:00
Samy Pessé e95678cf3a Add tests for installation of plugins 2016-02-17 12:55:46 +01:00
Samy Pessé e2c21051aa Add method install to plugins manager 2016-02-17 12:02:58 +01:00
Samy Pessé 7c575e1b43 Fix loading of plugins 2016-02-17 11:52:31 +01:00
Samy Pessé c89c253f29 Adapt ebook output 2016-02-17 11:26:36 +01:00
Samy Pessé f54685e216 Change format of conrefs and folder mixins 2016-02-17 11:25:57 +01:00
Samy Pessé 8141bcb3b6 Add command 'parse' for gitbook-cli 2016-02-17 10:11:33 +01:00
Samy Pesse db3d21db49 Start commands for plugins installation 2016-02-16 23:30:08 +01:00
Samy Pesse ca85c0ecf3 Add method to install plugin from npm
Add tests for it
2016-02-16 18:46:16 +01:00
Samy Pesse 702db46f20 Add base for plugin linking/installation 2016-02-16 15:53:12 +01:00
Samy Pesse 327d0bf5c5 Validate plugin after loading 2016-02-16 15:42:24 +01:00
Samy Pesse 2375296e67 Add base _setup for pluginslist 2016-02-15 22:39:26 +01:00
Samy Pesse b4fcd2da14 Plugins should be relative to output 2016-02-15 21:14:25 +01:00
Samy Pesse e3c92cce77 Add name to json and website build
And inherit from conrefsLoader
2016-02-15 16:24:13 +01:00
Samy Pessé 1141d34f07 Add tests for args in blocks 2016-02-15 14:19:30 +01:00
Samy Pessé 354fe12742 Fix addBlock for template engine
Add test for code block
2016-02-15 14:07:26 +01:00
Samy Pessé 1b19c66603 Complete page.previous and page.next variables 2016-02-15 09:55:12 +01:00
Samy Pessé d7077fc7db Add test for page.title variable 2016-02-15 09:44:05 +01:00
Samy Pessé d6bd4a0d67 Add test for file variables in templating 2016-02-14 23:05:37 +01:00
Samy Pessé 8628c87be4 Interpolate template before running it 2016-02-14 22:55:48 +01:00
Samy Pessé fef822145d Move conrefs to a separate mixin 2016-02-14 22:49:55 +01:00
Samy Pessé cfefa7d579 Add .next and .prev to TOCArticle 2016-02-14 19:27:58 +01:00
Samy Pessé def115fe0f Add base for templating documentation 2016-02-14 19:07:04 +01:00
Samy Pessé 01a7c6f4e0 Add help chapter about variables 2016-02-14 17:41:55 +01:00
Samy Pessé 0e86cdeb4a Add code blocks normalization 2016-02-14 15:26:15 +01:00
Samy Pessé a65f888a77 Start moving template and conrefs on Output 2016-02-14 11:10:08 +01:00
Samy Pessé 71059e3ea3 Ignore Summary and Langs in output 2016-02-13 15:51:14 +01:00
Samy Pessé ee3faaad11 Complete assets inliner 2016-02-13 15:28:07 +01:00
Samy Pessé d2aad34935 Improve performance of svg conversion 2016-02-13 15:04:18 +01:00
Samy Pesse d8ed34beba Add method to fetch remote image with AssetsInliner 2016-02-13 13:56:04 +01:00
Samy Pesse 3154d37e41 Add more test for svg 2016-02-13 10:49:56 +01:00
Samy Pesse 272f30af53 Complete test for convertion of svgs 2016-02-13 10:43:22 +01:00
Samy Pesse 4c6717e234 Add conversion of svg to png for assets inliner 2016-02-12 23:57:43 +01:00
Samy Pesse 39b6562d14 Add pipeline to outline svg as png 2016-02-12 21:59:49 +01:00
Samy Pesse 0d966fe197 Separate output in FolderOutput and base 2016-02-12 21:25:43 +01:00
Samy Pesse 82f94b010f Remove concept of generator, to merge it with Output 2016-02-12 20:48:51 +01:00
Samy Pesse 4555c541a8 Replace links to page of summary by html links 2016-02-12 19:20:32 +01:00
Samy Pesse a853a51a0b Complete test for heading IDs 2016-02-12 18:53:00 +01:00
Samy Pesse 756694c029 Page output a simple html string 2016-02-11 22:12:07 +01:00
Samy Pesse 669f3b3984 Add base for normalizing html 2016-02-11 21:44:38 +01:00
Samy Pesse e7eed2abbe Complete conrefs in parsing 2016-02-11 18:18:33 +01:00
Samy Pesse 98a13cf487 Add conrefs loader for nunjucks 2016-02-11 17:30:58 +01:00
Samy Pesse 7f9aa214a4 Cleaner module for managing git refs 2016-02-11 17:10:59 +01:00
Samy Pesse 347a536a4e Add git urls parsing and tests 2016-02-11 16:35:41 +01:00
Samy Pesse 5cf0abaf2b Add documentation for conrefs 2016-02-11 15:36:05 +01:00
Samy Pessé 09c6f025a1 For multilingual book, copy readme from main book 2016-02-11 14:01:52 +01:00
Samy Pessé f47208528b Normalize fs access 2016-02-11 13:58:26 +01:00
Samy Pessé 87d90a65ac Stat file when parsing page 2016-02-11 13:31:19 +01:00
Samy Pessé 02cff8c72c Add base for page parsing 2016-02-11 11:53:32 +01:00
Samy Pessé a67993ac0b Add assertion for should to test existence of file 2016-02-11 11:14:52 +01:00
Samy Pessé e540d25665 Normalize templating error 2016-02-11 10:08:36 +01:00
Samy Pessé 52c4dc49cf Normalize errors 2016-02-11 10:07:15 +01:00
Samy Pessé 44ad70320a Correctly setup folder when outputting 2016-02-11 09:43:36 +01:00
Samy Pessé 2b8e1c0b11 Add configuration for inner docs 2016-02-11 09:35:47 +01:00
Samy Pessé 85a2ce9065 Add base for inner documentation 2016-02-11 09:34:47 +01:00
Samy Pessé a24aa79dbf Add base for templating 2016-01-31 17:01:50 +01:00
Samy Pessé 633de85180 Improve plugin loading to elimate false-negative 2016-01-29 12:28:51 +01:00
Samy Pessé f32d03eb88 Add base for loading plugins 2016-01-29 12:21:57 +01:00
Samy Pessé e83d63c2aa Index page of summary when parsing 2016-01-28 23:42:00 +01:00
Samy Pessé ff30ba62ba Add order for tests 2016-01-28 23:23:56 +01:00
Samy Pessé ea98444dc0 Add parsing of summary and tests 2016-01-28 23:19:39 +01:00
Samy Pessé 328c3a7d51 Correctly create sub-book 2016-01-28 18:42:21 +01:00
Samy Pessé 4b465bedea Fix tests for languages parsing 2016-01-28 18:39:44 +01:00
Samy Pessé 461ef2c68e Add unit tests for langs 2016-01-28 17:35:32 +01:00
Samy Pessé 46efdacd6d Fix book.resolve 2016-01-28 16:29:09 +01:00
Samy Pessé a063cc1a53 Add base for langs parsing 2016-01-28 16:27:29 +01:00
Samy Pessé 36f2f5d52e Add method glossary.find 2016-01-27 22:51:07 +01:00
Samy Pessé ddc99104d4 Add unit tests for glossary parsing 2016-01-27 22:48:23 +01:00
Samy Pessé 8d277e9108 Add parsing of the glossary 2016-01-27 21:56:00 +01:00
Samy Pessé f305d57ab7 Add more classes structures 2016-01-27 10:24:06 +01:00
Samy Pessé 877f2e477b Start rewrite 2016-01-22 21:04:36 +01:00
Samy Pessé c8e2fc0e57 Fix typo in config_default.js 2016-01-21 16:15:14 +01:00
Aaron O'Mullan 4cb9cbb5ae Merge pull request #1097 from egasato/master
Slight changes in Catalan and Spanish translations.
2016-01-15 16:09:43 +01:00
Esaú García Sánchez-Torija 6f3be56223 Slightly changes in the Spanish translation.
I changed LANGS_CHOOSE, SEARCH_TOGGLE, SEARCH_PLACEHOLDER, SHARE_TOGGLE and SHARE_ON properties to be more appropiate (more informal).
2016-01-15 14:07:07 +01:00
Esaú García Sánchez-Torija c638c108d2 Translated font settings.
I translated to Catalan the Spanish font settings I used as template but I forgot to translate previously. I also changed LANGS_CHOOSE, SEARCH_TOGGLE, SEARCH_PLACEHOLDER, SHARE_TOGGLE and SHARE_ON properties to be more appropiate (more informal).
2016-01-15 14:04:58 +01:00
Samy Pessé d8f5aa680d Bump version to 2.6.7 2016-01-13 16:28:09 +01:00
Samy Pessé f2b585e446 Add @egasato as Catalan translator 2016-01-13 16:25:28 +01:00
Samy Pessé 78f91e0037 Merge pull request #1072 from egasato/patch-1
Catalan translation.
2016-01-13 16:24:33 +01:00
Samy Pessé 3f3c156697 Add @turankonan as Turkish translator 2016-01-13 16:24:22 +01:00
Samy Pessé 4627bf5d1f Merge pull request #1075 from turankonan/master
Turkish translation
2016-01-13 16:23:00 +01:00
Samy Pessé 93a144984a Merge pull request #1091 from gitname/gitname-patch-2
Fix typo
2016-01-13 16:22:16 +01:00
Samy Pessé 2d0784440c Fix support for encoded entities in filename 2016-01-13 16:21:52 +01:00
gitname 05a083437f Fix typo 2016-01-09 21:44:30 -08:00
gitname d4b5f59f92 Convert run-on sentence into two sentences 2016-01-09 21:43:49 -08:00
Turan Konan ff53fb6db0 Turkish translation 2016-01-03 22:55:49 +02:00
Esaú García Sánchez-Torija 534b3908cc Catalan translation. 2015-12-30 13:18:43 +01:00
Samy Pessé 7ea2369810 Merge pull request #1066 from hirofumi1987/master
Fixed Japanese translation
2015-12-21 08:40:29 +01:00
hirofumi_i 4d96ec10c1 Fixed Japanese translation 2015-12-21 12:39:19 +09:00
Samy Pesse a37ee3457a Bump version to 2.6.6 2015-12-16 21:02:49 +01:00
Samy Pesse 6969bb9a5c Fix include of css in pdf header/footer 2015-12-16 20:55:06 +01:00
Samy Pessé 4567041456 Bump version to 2.6.5 2015-12-11 14:48:13 +01:00
Samy Pessé 49f09e46da Fix support for local styles 2015-12-11 14:40:20 +01:00
Samy Pessé becd027563 Check style existence on output folder instead of source 2015-12-11 14:31:08 +01:00
Samy Pessé 6eb1605be6 Fix #1041 : fix glossary terms being replaced in script (ex: math) 2015-12-08 15:27:11 +01:00
Samy Pessé 5c16aec096 Use gitbook-markdown-css@1.0.1 2015-12-04 15:43:51 +01:00
Samy Pessé 835e2dc1fb Bump version to 2.6.4 2015-12-02 13:29:04 +01:00
Samy Pessé e2378ab29a Update gitbook-parsers@0.8.9 2015-12-02 13:25:13 +01:00
Samy Pesse 0f1d7eb391 Bump version to 2.6.3 2015-12-02 10:12:49 +01:00
Samy Pesse dd358b8b95 Update gitbook-parsers@0.8.8 2015-12-02 10:11:06 +01:00
Samy Pessé 21cf5fcaf4 Bump version to 2.6.2 2015-11-25 11:56:29 +01:00
Samy Pessé 8c7509759b Update nunjucks@2.2.0 2015-11-25 11:54:19 +01:00
Samy Pessé dc9ac0d0ff Compile js 2015-11-25 11:52:50 +01:00
Samy Pessé 93b401ca9f Add trailing slash to gitbook.state.root, fix value of gitbook.state.bookRoot 2015-11-25 11:49:55 +01:00
Samy Pessé b137d8270a Bump version to 2.6.1 2015-11-25 11:02:15 +01:00
Samy Pessé 6db7757451 Fix gitbook.state.innerLanguage: use camel case 2015-11-25 11:01:17 +01:00
Samy Pessé 43fd42b757 Bump version to 2.6.0 2015-11-25 10:54:09 +01:00
Samy Pessé 5d1c4d2b9f Fix #926: use zh-hans instead of zh-cn and ja instead of jp 2015-11-25 10:52:36 +01:00
Samy Pessé 425acd8bf6 Follow github style: change color of h6 headings 2015-11-25 10:42:36 +01:00
Samy Pessé 414160e0df Merge pull request #1027 from GitbookIO/revert-1020-remove-font-smooth
Revert "Fix small font rendering issue on Macs"
2015-11-25 10:32:28 +01:00
Samy Pessé 117c6aefe8 Revert "Fix small font rendering issue on Macs" 2015-11-25 10:32:17 +01:00
Samy Pessé 13d584d39a Merge pull request #1020 from dylang/remove-font-smooth
Fix small font rendering issue on Macs
2015-11-25 10:28:23 +01:00
Samy Pessé 9bc89c24f5 Fix #1023: close sidebar after clicking a link on mobile 2015-11-25 10:25:58 +01:00
Samy Pessé 5a8c4d5a4e Cleanup lib/generators/json.js 2015-11-25 10:14:34 +01:00
Samy Pessé 98da83a552 Fix urijs dependency on linux 2015-11-25 10:08:24 +01:00
Samy Pessé 5344a30a3b Generate css 2015-11-25 10:05:16 +01:00
Samy Pessé d5d6b3673e Add bookRoot to gitbook.state 2015-11-25 10:05:05 +01:00
Samy Pessé d2a2fe88d1 Update urijs@1.17.0 and tiny-lr 2015-11-25 10:04:44 +01:00
Samy Pesse ced44c86ce Fix #1022: fix bottom margin for lists 2015-11-24 23:38:26 +01:00
Samy Pessé ee402ad444 Merge pull request #1018 from atilacamurca/patch-1
Update README.md
2015-11-19 12:24:42 +01:00
Dylan Greene 3d2155eb66 Make fonts nicer on Macs
Removed the `antialias` setting which tells Chrome to not use native font rendering and instead use something from the late 2010's that isn't subpixel-friendly and looks very blocky. This used to be required when OS X browsers didn't antialias by default because it made fonts look bolder than on Windows. This has since been fixed and we are advised to not use `-webkit-font-smooth`.

https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth
2015-11-17 16:15:33 -05:00
Samy Pessé bd24b03548 Add @buren to AUTHORS 2015-11-16 22:04:41 +01:00
Samy Pessé 5cb55a0f37 Merge pull request #1019 from buren/sv-locale
Add Swedish translation
2015-11-16 22:02:49 +01:00
Jacob Burenstam 163242f80f Add Swedish translation 2015-11-16 22:00:16 +01:00
Átila Camurça Alves 266bfcb8bf Update README.md
There is an extra space in the command line example that enable debug mode.
2015-11-16 16:45:33 -03:00
Samy Pessé d82fa02669 Update plugin-search@1.1.0 2015-11-16 13:09:05 +01:00
Samy Pessé 3a5207a0d2 Merge pull request #1016 from GitbookIO/fix/999
Fix #999: detection of structure should be case incensitive
2015-11-16 10:39:29 +01:00
Samy Pessé e38f3bb884 Improve book.findFile to be case incensitive 2015-11-16 10:31:24 +01:00
Samy Pessé 751cdd9b3b Add test for #999 2015-11-16 10:30:10 +01:00
Samy Pessé 8df6bdca89 Update node version for travis and appveyor tests 2015-11-16 10:18:52 +01:00
Samy Pessé f9df7545ad Merge pull request #1014 from GitbookIO/fix/1013
Fix #1013: prioritize structure defined in book.json
2015-11-16 10:16:52 +01:00
Samy Pessé 9b7a90afef Test first extension of structure itself in book.findFile 2015-11-16 10:06:31 +01:00
Samy Pessé 2ae83b3247 Add failing test for #1013 2015-11-16 09:55:45 +01:00
Samy Pessé 5d907f234e Merge pull request #1005 from mjanda/master
Czech translation
2015-11-07 21:56:28 +01:00
Marek Janda 3a005c4f13 Czech translation 2015-11-07 21:51:27 +01:00
Marek Janda 6c2f50470a Czech translation 2015-11-07 21:00:45 +01:00
Samy Pessé d233783942 Fix bottom margin of blockquote 2015-11-05 11:33:21 +01:00
Samy Pessé 3d9e4c80a2 Bump version to 2.5.2 2015-11-03 09:32:35 +01:00
Samy Pessé a7f49015c1 Fix custom styles for ebook 2015-11-03 09:25:51 +01:00
Samy Pessé 68ed2631dc Correctly show space between toolbar icon and text in buttons 2015-11-02 17:16:43 +01:00
Samy Pessé 2814fea67e Trigger "start" before "page.change" 2015-11-02 16:57:08 +01:00
Samy Pessé 3388be9db6 Update app.js 2015-10-27 23:11:55 +01:00
Samy Pessé 9b89319820 Bump version to 2.5.1 2015-10-27 23:11:31 +01:00
Samy Pessé ad34089df5 Merge changelog for 2.5.0 2015-10-27 23:10:29 +01:00
Samy Pessé 7a4c6bc326 Fix calcul of root in gitbook.state when serving index.html as / 2015-10-27 18:44:04 +01:00
Samy Pessé 6ab386ae35 Bump version to 2.5.0 2015-10-27 13:25:52 +01:00
Samy Pessé 0abbfde912 Add chapterTitle to app build 2015-10-27 12:19:54 +01:00
Samy Pessé 0521defb63 Add 'chapterTitle' to gitbook.state api 2015-10-27 12:18:04 +01:00
Samy Pessé ea4d96610f Compatibility for require of plugins 2015-10-24 21:36:17 +02:00
Samy Pessé 4bc56564b4 Comment gitbook.state api 2015-10-22 16:12:21 +02:00
Samy Pessé 013f7f09da Add gitbook.state.filepath
Fix gitbook.state.root
2015-10-22 16:11:05 +02:00
Samy Pessé f082de1f92 Bump version to 2.5.0-beta.7 2015-10-22 13:52:19 +02:00
Samy Pessé ad39dc8c0c Update app.js 2015-10-22 13:50:05 +02:00
Samy Pessé 481a76319f Provide gitbook.state.root to plugins 2015-10-22 13:49:28 +02:00
Samy Pessé 27a43d5aea Merge pull request #986 from GitbookIO/fix/heading_ids
Normalize ID for headings
2015-10-21 18:05:40 +02:00
Samy Pessé df1d5a0680 Correctly generate id if none found 2015-10-21 17:58:06 +02:00
Samy Pessé 722109faf0 Update gitbook-parsers@0.8.7 2015-10-21 16:22:47 +02:00
Samy Pessé d4dca7736a Update gitbook-parsers@0.8.6 2015-10-21 16:15:56 +02:00
Samy Pessé 4e90becd52 Use Arial as default font 2015-10-21 15:54:45 +02:00
Samy Pessé 26890e94eb Bump version to 2.5.0-beta.6 2015-10-20 18:20:44 +02:00
Samy Pessé 55c83f9a59 Use helvetica by default for pdf 2015-10-20 18:09:51 +02:00
Samy Pessé b837d82878 Fix default style for pdf footer and header 2015-10-20 18:02:23 +02:00
Samy Pessé cbdcdb1e0f Fix #974: correctly handle query in image urls 2015-10-20 17:22:01 +02:00
Samy Pessé 4fea85289e Merge pull request #983 from GitbookIO/fix/982
Fix #982: correctly handle templating in imported content
2015-10-20 17:09:15 +02:00
Samy Pessé ba5f9132c9 Fix #982: fix shortcuts for included templates 2015-10-20 17:08:44 +02:00
Samy Pessé 991681daa2 Add failing test for #982 2015-10-20 16:38:48 +02:00
Samy Pessé 2faf53e16b Bump version to 2.5.0-beta.5 2015-10-16 13:48:27 +02:00
Samy Pessé 5430ed99de Update gitbook-parsers@0.8.5 2015-10-16 13:47:09 +02:00
Samy Pessé fef4dfd05e Fix position of sidebar toggle button 2015-10-14 13:35:03 +02:00
Samy Pessé 05943db3b5 Bump version to 2.5.0-beta.4 2015-10-14 13:16:49 +02:00
Samy Pessé 682fabd1ef Fix position of glossary icon relative to sidebar toggler 2015-10-14 13:15:36 +02:00
Samy Pessé ee8ccc6d7e Fix legacy properties book.options.input, ... 2015-10-14 12:31:37 +02:00
Samy Pessé 8ee0bcac2a Bump version to 2.5.0-beta.3 2015-10-14 11:54:58 +02:00
Samy Pessé 0c4ad74788 Fix resolve of plugins for prereleases 2015-10-14 11:54:12 +02:00
Samy Pessé 7d944e4f1f Fix instruction for local developement 2015-10-14 11:48:27 +02:00
Samy Pessé 67b2394c16 Bump version to 2.5.0-beta.2 2015-10-14 11:39:23 +02:00
Samy Pessé 269d08a35f Correctly handle pre-version for plugins checks 2015-10-13 15:50:54 +02:00
Samy Pessé f626e83e48 Bump version to 2.5.0-beta.1 2015-10-13 15:21:20 +02:00
Samy Pessé 8ba18cd587 Merge pull request #979 from GitbookIO/feature/plugins_config
Improvements for plugin configurations
2015-10-13 15:14:26 +02:00
Samy Pessé 54c12fea89 Set default config for all plugins 2015-10-13 15:05:46 +02:00
Samy Pessé afb5ce71ce Update gitbook-plugin-sharing@1.0.1 2015-10-13 14:56:59 +02:00
Samy Pessé 6fef6acf10 Correctly apply defaults config to pluginsConfig 2015-10-13 14:55:39 +02:00
Samy Pessé a27411401b Update gitbook-plugin-fontsettings@1.0.2 2015-10-13 14:48:09 +02:00
Samy Pessé 3718fc319b Fix error in accessing plugins config 2015-10-13 14:47:33 +02:00
Samy Pessé c6c9463f8c Update gitbook-plugin-search@1.0.2 2015-10-13 14:38:54 +02:00
Samy Pessé b410685318 Update gitbook-plugin-search@1.0.1 2015-10-13 14:34:29 +02:00
Samy Pessé b742b29259 Add tests for plugins config validation 2015-10-13 14:31:11 +02:00
Samy Pessé df5d27ab61 Use jsonschema to valid and default plugins config 2015-10-13 13:56:46 +02:00
Samy Pessé 2870155c0b Fix js error 2015-10-12 10:45:13 +02:00
Samy Pessé 9ba1075f48 Add hook "config" to transform configuration before generation 2015-10-12 10:43:14 +02:00
Samy Pessé 4ae5b2e050 Merge pull request #959 from GitbookIO/improvements/ebooks
Improvements for ebooks
2015-10-08 20:58:57 +02:00
Samy Pessé 4369bd8f5e Fix copy of assets and js path in gulpfile 2015-10-06 14:23:10 +02:00
Samy Pessé 321b24a7b9 Don't copy assets for ebook to website bundle 2015-10-06 14:21:02 +02:00
Samy Pessé 22e0c1fb54 Fix css being used for pdf footer and header 2015-10-06 13:35:04 +02:00
Samy Pessé ba65e3c020 Adapt tests 2015-10-06 13:26:32 +02:00
Samy Pessé c19ab952e3 Only add page count on pdf/epub 2015-10-06 13:20:20 +02:00
Samy Pessé ecc29087b5 Fix summary page counter for epub low resolution 2015-10-06 13:10:51 +02:00
Samy Pessé 87e056de64 Change markdown -> markup in less mixins 2015-10-06 13:05:32 +02:00
Samy Pessé 761200529f Adapt glossary and summary for pdf/epub to new markup style 2015-10-06 13:03:52 +02:00
Samy Pessé 770351916e Cleaner markup css 2015-10-06 12:45:25 +02:00
Samy Pessé 4b7d957b47 Use black links in mobi files 2015-10-06 10:38:09 +02:00
Samy Pessé a1c03c18a5 Improve support of glossary page in pdf 2015-10-06 10:00:49 +02:00
Samy Pesse 5d376b054f Handle correctly rtl for toc in ebooks 2015-10-06 09:47:41 +02:00
Samy Pesse 277d13c2bb Center title for table of content 2015-10-06 09:47:25 +02:00
Samy Pesse 4a9389d80a Improve display of table of contents for ebooks 2015-10-06 09:47:15 +02:00
Samy Pesse 33593c13ae Inline css for footer/header templates 2015-10-06 09:47:04 +02:00
Samy Pesse eef82c18c2 Remove bottom border on h1 and h2 2015-10-06 09:45:31 +02:00
Samy Pessé 7363580095 Fix glossary page using a "section" instead of a "div" 2015-10-06 09:45:22 +02:00
Samy Pessé 23a46b0597 Remove margin on first header of a page (ebook)
Avoid breaking in code blocks
2015-10-06 09:45:06 +02:00
Samy Pessé 51c79f294c Add css to footer/header for pdf 2015-10-06 09:44:54 +02:00
Samy Pessé ce1e0e1873 Merge pull request #964 from GitbookIO/features/plugin_api
Better APIs for Plugins
2015-10-06 09:42:49 +02:00
Samy Pessé c2775b3b63 Export jQuery for plugins compatibility 2015-10-06 09:37:01 +02:00
Samy Pessé bcb224d1cb Add more node.js versions to travis-ci 2015-10-05 23:06:46 +02:00
Samy Pessé 8bc5f22866 Add search plugin to dependencies 2015-10-05 17:22:47 +02:00
Samy Pessé c3f2ef02c4 Adapt tests for new default plugins 2015-10-05 17:16:37 +02:00
Samy Pessé 08e2c90d9d Don't fail when can't write to localstorage 2015-10-05 17:11:55 +02:00
Samy Pessé d2bb2ba454 Remove style for search 2015-10-05 17:07:25 +02:00
Samy Pessé ba912318cd Tweak some details for browserify compatibility 2015-10-05 16:49:37 +02:00
Samy Pessé 3d1f057373 Switch to gulp/browserify 2015-10-05 16:47:19 +02:00
Samy Pessé 0679807517 Define specific action for toggling summary 2015-10-05 16:02:03 +02:00
Samy Pessé 7f0e4803e2 Start removing search and lunr from core 2015-10-05 15:55:39 +02:00
Samy Pessé fa76029a17 Adapt tests for new default plugins 2015-10-05 14:24:55 +02:00
Samy Pessé 376c68957f Remove sharing 2015-10-05 13:53:19 +02:00
Samy Pessé 222ec8d4b9 Correctly reset buttons when page changed 2015-10-05 12:13:54 +02:00
Samy Pessé 90715c1944 Remove fontsettings from core and add plugin as default 2015-10-05 12:07:19 +02:00
Samy Pessé 801e1b6059 Add api to extend toolbar 2015-10-05 12:07:02 +02:00
Samy Pessé 14bb659b75 Update lodash for client side code 2015-10-05 10:43:21 +02:00
Samy Pessé eab3c50288 Add sharing plugin as default 2015-10-05 10:32:43 +02:00
Samy Pessé 74396e7240 Add method book.formatString 2015-10-05 10:07:04 +02:00
Samy Pessé 6c2539e886 Move Book.init in another file 2015-10-05 09:54:40 +02:00
Samy Pessé aba25d8521 Add eslint instead of jshint 2015-10-05 09:54:28 +02:00
Samy Pessé f0c97756de Bump version to 2.4.3 2015-10-01 14:07:32 +02:00
Samy Pessé f14c57d4c2 Merge pull request #955 from mstade/patch-1
Change nunjucks dependency to v2.1.0
2015-10-01 12:03:21 +02:00
Marcus Stade b6f60cc8ad Change nunjucks dependency to v2.1.0
Looks like mozilla/nunjucks#504 was merged and released in v2.1.0, so this changes `package.json` to no longer depend on a specific commit. Incidentally, this also solves a problem where corporate firewalls blocks npm from pulling in straight from github repos.
2015-10-01 12:01:52 +02:00
Samy Pessé 170516d343 Add ukranian translation 2015-09-28 21:01:28 +02:00
Samy Pessé c931e91bef Fix #952: add configuration for index maximum size 2015-09-28 20:54:45 +02:00
Samy Pessé db9151ae36 Update gitbook-parsers@0.8.3 2015-09-28 20:40:02 +02:00
Samy Pessé f2d86b6d69 Add slack button in readme 2015-09-23 12:19:04 +02:00
Samy Pessé 534cdd091b Add link to slack community channel 2015-09-23 12:16:22 +02:00
Samy Pessé fdf4a48638 Bump version to 2.4.2 2015-09-22 23:30:42 +02:00
Samy Pessé 58a3c5634e Improve installation of plugins to not install default ones 2015-09-22 23:25:15 +02:00
Samy Pessé f0ddb6e89f Merge branch 'fix/inline_code_html' 2015-09-22 22:46:19 +02:00
Samy Pessé 2b408db7cb Update gitbook-plugin-highlight@1.0.3 2015-09-22 22:45:55 +02:00
Samy Pessé 4e4bd23e2b Handle html param from code block output 2015-09-22 22:41:13 +02:00
Samy Pessé 62d0eb606e Add test for inline code block with html tags 2015-09-22 22:36:35 +02:00
Samy Pessé 0e9beeae14 Fix #941: limit size of lunr index 2015-09-22 12:36:18 +02:00
Samy Pessé 5e4dbdee24 Disable auto code highlighting (language should be specified) 2015-09-21 16:19:42 +02:00
Samy Pessé 9435dae6cd Fix #939: don't check gitbook version for sub-books (checked for parent) 2015-09-21 09:41:29 +02:00
Samy Pessé 813210bf47 Throw correct error in configuration 2015-09-20 23:27:39 +02:00
Samy Pessé c372dfc544 Bump version to 2.4.1 2015-09-19 00:32:43 +02:00
Samy Pessé ac77200683 Fix disabling a default plugin 2015-09-19 00:31:32 +02:00
Samy Pessé f5afbc90a4 Add more tests for blocks args/kwargs 2015-09-17 11:21:55 +02:00
Samy Pessé b24760c819 Bump version to 2.4.0 2015-09-15 14:32:11 +02:00
Samy Pessé 6732957e42 Merge pull request #930 from GitbookIO/jshint
Add config for jshint and fix lint errors
2015-09-15 14:21:27 +02:00
Samy Pessé 1fd0006859 Lint all tests 2015-09-15 14:20:32 +02:00
Samy Pessé 5a205346e3 Jshint all files 2015-09-15 13:57:21 +02:00
Samy Pessé e193004659 Fix passing context to block functions
Add test for it
2015-09-15 13:36:02 +02:00
Samy Pessé fe3a9c33d0 Improve code style for book.js and index.js 2015-09-15 13:16:26 +02:00
Samy Pessé d83116b88f Add jshint configuration 2015-09-15 13:16:06 +02:00
Samy Pessé 5f56098ae7 Fix stupid error that passed tests because "context" was global 2015-09-15 12:38:13 +02:00
Samy Pessé 0f935f4372 Merge pull request #806 from aschempp/aria-roles
Aria roles for accessibility
2015-09-15 12:29:12 +02:00
Samy Pessé df5c5a8c01 Merge pull request #919 from gaearon/fix-cmd-click
Don't react when user wants to open a link in a new tab
2015-09-15 12:28:32 +02:00
Samy Pessé 57a0c3bad8 Merge pull request #929 from GitbookIO/feature/improve_resolve
Improve paths resolving for conrefs
2015-09-15 12:27:07 +02:00
Samy Pessé 2a52326a45 Improve conrefs to handle all absolute file paths correctly
Add test for it
2015-09-15 12:22:54 +02:00
Samy Pessé 87e4ee1eeb Handle absolute file correctly for conrefs
Add test for absolute file for conrefs
2015-09-15 11:48:18 +02:00
Samy Pessé 45833eea9a Add test for navigation
Update mocha and should
2015-09-15 11:31:50 +02:00
Samy Pessé baf10e9b15 Improve book.resolve to ensure file is in the book
Adapt tests to plugin-highlight
2015-09-15 11:09:08 +02:00
Samy Pessé 463a947df1 Change text for editor 2015-09-15 09:47:34 +02:00
Samy Pessé cceebb4fd9 Merge branch 'improve/template-blocks' 2015-09-15 09:37:43 +02:00
Samy Pessé afd5465a61 Merge pull request #928 from GitbookIO/feature/highlight_block
Code highlighting extended by plugins
2015-09-14 18:26:26 +02:00
Samy Pesse fe604733de Change name of highlight test plugin 2015-09-14 12:05:51 +02:00
Samy Pesse da22f9f39f Update css without highlight.js
Add highlight as default plugin to be loaded
2015-09-14 11:57:54 +02:00
Samy Pesse 284ebbf75d Add highlight as default plugin 2015-09-14 11:47:56 +02:00
Samy Pesse 2c08ccad87 Pass language as kwargs to code block
Improve tests for extending code highlighting
2015-09-14 11:41:01 +02:00
Samy Pesse fa4e234bab Add base test for extending code highlighting 2015-09-14 11:28:14 +02:00
Samy Pesse 35c4179ca1 Use block code for highlight pre/code
Cleanup correctly predefined blocks
2015-09-14 11:21:16 +02:00
Dan Abramov c14ba7ce34 Don't react when user wants to open a link in a new tab
Fixes #846
2015-09-12 21:31:40 +03:00
Samy Pesse 601ce3add3 Add default blocks (html and code) 2015-09-12 19:25:01 +02:00
Samy Pesse 08ff39fd0b Remove highlight.js dependency 2015-09-12 19:23:07 +02:00
Samy Pesse 82a6ee3875 Add test for replacing highlighting 2015-09-12 18:21:35 +02:00
Samy Pessé 3bf592f870 Bump version to 2.3.3 2015-09-10 11:26:15 +02:00
Samy Pessé 241e205717 Merge pull request #912 from GitbookIO/fix/538
Fix 538: duplicate entries without paths are ignored
2015-09-10 09:59:45 +02:00
Samy Pessé fb2720ea8d Update gitbook-parsers@0.8.2 2015-09-10 09:57:04 +02:00
Samy Pessé 14853befda Add test for init with deep summary 2015-09-10 09:56:18 +02:00
Samy Pessé e7f2803d11 Bump version to 2.3.2 2015-09-09 09:30:53 +02:00
Samy Pessé 320015dd8f Fix #910: fix stupid error with semver api 2015-09-09 09:27:08 +02:00
Samy Pessé 471c124a98 Merge pull request #908 from GitbookIO/fix/asciidoc_blocks
Fix blocks in asciidoc
2015-09-09 00:01:43 +02:00
Samy Pesse aa44a109c6 Use position indicator that doesn't conflict with asciidoc 2015-09-08 23:57:40 +02:00
Samy Pesse 41e5ca8422 Add test for blocks without parsing 2015-09-08 23:55:30 +02:00
Samy Pessé 53af8b2bb6 Bump version to 2.3.1 2015-09-08 16:33:22 +02:00
Samy Pessé bd885b135f Merge pull request #904 from kuaipao/fix-mobi-font-color
use black font on mobi
2015-09-08 09:16:43 +02:00
kuaipao 62a6dde81a use black font on mobi 2015-09-08 04:02:48 +08:00
Samy Pesse 14b72b344f Log modified file in watcher 2015-09-06 21:13:18 +02:00
Samy Pesse ac03668063 Update chokidar@1.0.5 2015-09-06 21:11:49 +02:00
Samy Pesse 2512e176c9 Fix #893: korean iso code is "ko" not "kr" 2015-09-06 21:01:39 +02:00
Samy Pesse b613393866 Update highlight.js@8.8.0 2015-09-06 19:04:09 +02:00
Samy Pessé 607a6e95de Update gitbook-parsers@0.8.1 2015-09-05 19:00:42 +02:00
Samy Pessé 871f574ff7 Fix #761: fix syntax highlighting for asciidoc 2015-09-05 17:28:01 +02:00
Samy Pessé 377e470b15 Add warning for file outside spine 2015-09-04 19:12:27 +02:00
Samy Pessé e0a3f0cea5 Add warning for too strict gitbook version 2015-09-04 18:58:16 +02:00
Samy Pessé 66727b2736 Update gitbook-parsers@0.8.0 2015-09-04 18:33:45 +02:00
Samy Pessé 8215ad977f Merge pull request #898 from deminoth/master
Korean translation fixed
2015-09-04 08:36:19 +02:00
SangYeob Bono Yu a611dffbdf Add my name 2015-09-04 10:29:59 +09:00
SangYeob Bono Yu 39f378d8cf Korean translation fixed 2015-09-04 10:22:24 +09:00
Samy Pessé f00da58153 Update appveyor button 2015-09-01 17:52:27 +02:00
Samy Pessé 09b038b16d Bump version to 2.3.0 2015-09-01 17:44:53 +02:00
Samy Pessé cf601d97ad Improve error handling for failed image download 2015-09-01 17:38:33 +02:00
Samy Pessé 80edad53d4 Update nunjucks to fix raw and loader 2015-09-01 17:25:43 +02:00
Samy Pessé a972b32769 Update nunjucks@2.0.0 2015-08-28 08:45:28 +02:00
Samy Pessé efcaae3e60 Add author for hebrew 2015-08-27 19:07:31 +02:00
Samy Pessé e0ee591638 Merge pull request #877 from a-moses/hebrew
hebrew support theme
2015-08-27 19:06:26 +02:00
Samy Pessé 310a6d909f Add method 'get' to config object (helper for plugins) 2015-08-27 15:26:12 +02:00
Samy Pessé cefd8fc50f Don't fail if hook returns nothing for "page" and "page:before" 2015-08-27 15:04:28 +02:00
Samy Pessé a4422593f2 Add back page:before and page as non-deprecated 2015-08-26 11:16:02 +02:00
Samy Pessé e2c5d22756 Merge pull request #844 from xcv58/master
Fix #843 ignore _book in watch.js
2015-08-26 11:05:43 +02:00
Samy Pessé 84385d9dc3 Merge pull request #881 from mortonfox/patch-1
Fix Plugins link.
2015-08-26 11:01:28 +02:00
Morton Fox 6cfa4c8ab7 Fix Plugins link. 2015-08-25 23:35:15 -04:00
a-moses c76ccc53e1 Update he.json 2015-08-23 09:59:14 +03:00
a-moses d48eafb1a2 hebrew support theme
full Hebrew support for GITBOOK (with rtl )

* Sans and Serif may still in original name fonts
2015-08-23 09:53:25 +03:00
Aaron O'Mullan 302d9b4b91 Merge pull request #849 from GitbookIO/improve/remove-webfonts
Use system fonts instead of webfonts
2015-08-13 19:19:35 +02:00
Samy Pessé a091a7f68b Update gitbook-parsers@0.7.7 2015-08-09 15:45:04 +02:00
Aaron O'Mullan 53621f6de3 Use system fonts instead of webfonts 2015-08-08 17:35:05 +02:00
Samy Pessé 288b965db3 Merge pull request #847 from GitbookIO/fix/flicker
Improve header merge on page change
2015-08-07 16:55:42 +02:00
Aaron O'Mullan 578c9dcfc6 Improve header merge on page change
Prevents flickering (style reset)

Fixes #782, #838, #840
2015-08-07 16:46:23 +02:00
xcv58 64de17b248 ignore _book in watch.js 2015-08-04 00:50:31 -04:00
Aaron O'Mullan d699dff872 Use Book.resolve when possible
For added consistency
2015-07-31 15:08:56 +02:00
Samy Pesse 501843d624 Bump version to 2.2.0 2015-07-28 15:28:38 -07:00
Samy Pesse 508ce4283e Fix #819: codes must always be ltr 2015-07-28 15:25:12 -07:00
Samy Pessé 4aa8e66549 Merge pull request #813 from MrMaksimize/pdf-options
Allowing for custom chapter-mark and page-break in PDF.
2015-07-01 18:00:31 -04:00
Maksim Pecherskiy 917a6f70d8 Allowing for custom chapter-mark and page-break in PDF. 2015-06-30 19:48:51 -07:00
Samy Pesse 2f5e53da55 Update highlight.js@8.6.0 2015-06-29 10:02:35 -04:00
Samy Pesse c3cdefc90a Simpler template for summary 2015-06-29 09:58:23 -04:00
Samy Pesse 9c580e4989 Fix #802: make book.json accessible as "config." in templating 2015-06-19 16:28:46 +02:00
Andreas Schempp dbc75f7352 Add role and html5 markup for the main navigation 2015-06-18 20:29:11 +02:00
Andreas Schempp db841a8578 Added basic ARIA roles for screenreaders 2015-06-18 20:23:12 +02:00
Samy Pessé 50c902c4e4 Merge pull request #805 from GitbookIO/fix/804
Fix #804
2015-06-18 11:16:32 +02:00
Samy Pesse 84b6e0bde6 Add test for kwargs 2015-06-18 11:15:44 +02:00
Samy Pesse abc29c3fba Fix #804: correctly extract kwargs from blocks 2015-06-18 11:11:47 +02:00
Samy Pesse 8356c534f5 Add failing tests for block's arguments 2015-06-18 11:09:02 +02:00
Samy Pessé 78ff2687b4 Merge pull request #797 from nghong/vi-locale
Adding Vietnamese locale support
2015-06-13 11:15:00 +02:00
Hong Nguyen 9b6586fb36 Add translator name to AUTHORS.md 2015-06-13 16:13:34 +07:00
Hong Nguyen ea133219d0 Minor fix 2015-06-13 16:08:21 +07:00
Hong Nguyen c9b5d81a3c Add Vietnamese locale support 2015-06-13 15:42:49 +07:00
Samy Pessé d895c63211 Bump version to 2.1.0 2015-06-02 14:52:11 +02:00
Samy Pessé 8c86da67ca Update gitbook-parsers@0.7.6 2015-06-02 14:47:21 +02:00
Samy Pessé a9a230dfc3 Merge pull request #781 from GitbookIO/fix/775
Fix #775: add optional print.css style
2015-06-02 11:00:22 +02:00
Samy Pessé 6d53e52771 Handle empty string for styles configuration 2015-06-02 11:00:15 +02:00
Samy Pessé 52e10b7cfe Remove default print.css when styles/print.css is present 2015-06-02 10:23:31 +02:00
Samy Pessé addac85696 Add test for custom print style 2015-06-02 10:18:44 +02:00
Samy Pessé 13fb949d68 Merge pull request #774 from wilhelmmatilainen/patch-1
Styling should go to <head>, not to <body>
2015-05-30 18:11:15 +02:00
Wilhelm f1b593cfbd Styling should go to <head>, not to <body>
https://developers.google.com/speed/pagespeed/module/filter-css-to-head
2015-05-29 15:42:40 +03:00
Samy Pesse f998e2dec9 Bump version to 2.0.4 2015-05-28 18:07:20 +02:00
Samy Pesse 2c0bd53a91 Fix i18n used in multilingual book 2015-05-28 17:06:09 +02:00
Samy Pesse 6dd7f6162f Add title to languages chooser
Related to #757
2015-05-28 16:14:03 +02:00
Samy Pesse 475b0bb2b3 Adapt to nunjucks 1.3.x 2015-05-28 15:59:14 +02:00
Samy Pesse e6343935e3 Update nunjucks to fix raw tags 2015-05-28 15:50:46 +02:00
Samy Pessé 946883fd4c Merge pull request #772 from GitbookIO/feature/glossary_order
Fix #768: sort glossary, start with longest matchs
2015-05-28 15:21:03 +02:00
Samy Pessé b1b7e3148b Merge pull request #743 from chudaol/master
Added vk sharing button.
2015-05-28 14:54:03 +02:00
Samy Pesse 32203f6438 Sort glossary before applying it on pages 2015-05-28 14:49:53 +02:00
Samy Pesse f2d3c5d2ed Add test for #768 2015-05-28 14:38:21 +02:00
Samy Pessé 7e2f0ed4bc Merge pull request #758 from aschempp/hotfix/x-ua-compatible
Fix the X-UA-Compatible meta tag
2015-05-28 14:18:19 +02:00
Samy Pessé a877acf905 Merge pull request #759 from aschempp/hotfix/stylesheets
Move style sheets to the <head> section
2015-05-28 14:17:39 +02:00
Samy Pesse ac756ddf7e Bump version to 2.0.3 2015-05-27 21:11:58 +02:00
Samy Pesse 36e2236e6b Fix #765: in init handle correctly empty entries
Add tests for it, fix #769
2015-05-27 21:05:36 +02:00
Samy Pesse 72df665520 Update gitbook-parsers@0.7.5 2015-05-27 19:11:50 +02:00
Samy Pessé 07785528a5 Merge pull request #767 from wilhelmmatilainen/patch-1
Don't create panic by telling about false overwrite
2015-05-27 13:17:05 +02:00
Wilhelm bb579dd581 Don't create panic by telling about false overwrite 2015-05-27 14:13:02 +03:00
Samy Pessé a7d3064340 Change license to valid SPDX code 2015-05-26 16:10:11 +02:00
Andreas Schempp 1a60778248 Move style sheets to the <head> section
see https://github.com/GitbookIO/gitbook/issues/756
2015-05-23 09:14:26 +02:00
Andreas Schempp cda4bb5bda Fix the X-UA-Compatible meta tag
see https://github.com/GitbookIO/gitbook/issues/755
2015-05-23 09:06:58 +02:00
Olga Filipova 7543781046 Added vk sharing button. 2015-05-12 22:30:09 +02:00
Samy Pessé 82f3ffad06 Merge pull request #730 from creynders/patch-1
Fix typo in warning in `lib/plugin`
2015-05-04 14:47:56 +02:00
creynders dc4d2a1731 Fix typo in warning in lib/plugin 2015-05-04 13:16:47 +02:00
Samy Pessé 2523925915 Bump version to 2.0.2 2015-05-02 12:39:05 +02:00
Samy Pesse d5bbd8475c Fix #721: use links.join instead of path.join for links in page 2015-04-23 12:58:24 -05:00
Samy Pesse 54d195268a Add test relative links (related to #721) 2015-04-23 12:05:04 -05:00
Samy Pesse a0deb9509f Merge branch 'awrelll-master' 2015-04-20 07:53:16 -05:00
Samy Pesse b0b1433594 Fix authors list merge 2015-04-20 07:52:12 -05:00
Samy Pessé 17a2c0a37c Merge pull request #706 from savikko/patch-1
Added Finnish author
2015-04-14 18:56:31 -05:00
Samy Pessé fd68ea1cc2 Merge pull request #705 from savikko/master
Added Finnish
2015-04-14 18:56:21 -05:00
Tommi Savikko 784874c776 Added Finnish author 2015-04-14 22:39:23 +03:00
Thomas Clayton f45c6d3466 Added Finnish 2015-04-14 21:50:46 +03:00
Samy Pessé 98af70902f Merge pull request #701 from anthonyfok/patch-1
Fix typo in lib/book.js: lanuages → languages
2015-04-10 20:50:35 -05:00
Anthony Fok 41a67b5c4c Fix typo in lib/book.js: lanuages → languages 2015-04-10 07:41:12 -06:00
Samy Pessé 83ee903af4 Merge pull request #700 from paulmillr/master
Switch from gaze to chokidar.
2015-04-10 10:39:13 +02:00
Samy Pessé e591b0e485 Merge pull request #696 from sindresorhus/escaperegex-module
use the `escape-string-regexp` module
2015-04-10 10:37:53 +02:00
Paul Miller bcc9a34742 Switch from gaze to chokidar. 2015-04-10 06:09:04 +03:00
Sindre Sorhus 6b56c7de7f use the escape-string-regexp module
no point in hardcoding this.

https://github.com/sindresorhus/escape-string-regexp
2015-04-08 18:24:26 +07:00
Iancu Aurel 7b42719699 korean and japanese added 2015-04-07 17:34:40 +03:00
awrelll 64b8343f67 korean support added 2015-04-07 17:32:33 +03:00
awrelll fcc5089fa6 japan support added 2015-04-07 17:26:45 +03:00
Samy Pessé 334f782aa8 Merge pull request #693 from awrelll/patch-1
Romanian author added
2015-04-07 16:21:56 +02:00
Samy Pessé 1776f2bf77 Merge pull request #691 from awrelll/master
support for romanian language
2015-04-07 16:21:34 +02:00
Iancu Aurel e259412f79 Romanian author added 2015-04-07 17:21:05 +03:00
awrelll 999a02f110 support for romanian language 2015-04-07 17:12:41 +03:00
Samy Pessé 604d0fba65 Update nunjucks@1.3.0 2015-04-03 22:31:55 +02:00
Samy Pessé 0e8f7b870b Bump version to 2.0.1 2015-04-02 19:41:14 +02:00
Samy Pessé 1eebc9a46e Normalize structure parsing error 2015-04-02 19:21:39 +02:00
Samy Pessé 0a94c80c44 Normalize template errors 2015-04-02 18:59:56 +02:00
Samy Pessé c70bb2fbd8 Update gitbook-parsers@0.7.4 2015-04-02 18:31:49 +02:00
Samy Pessé 12c06b384f Don't fail if config doesn't exists 2015-04-02 09:43:48 +02:00
Samy Pessé 82a58e7ac3 Invalidate configuration cache when reloading 2015-04-02 09:38:57 +02:00
Samy Pessé dcb56ef433 Merge pull request #683 from GitbookIO/fix/i18n
Fix i18n in json format
2015-04-01 22:23:23 +02:00
Samy Pessé 8da91de514 Don't update translations 2015-04-01 22:21:13 +02:00
Samy Pessé 4b20685562 Use i18n node module for template translation 2015-04-01 22:17:12 +02:00
Samy Pessé fff7c5cc3a Add back support for options.originalInput
Related to rtCamp/gitbook-plugin-edit-link#2
2015-03-30 16:50:26 +02:00
Samy Pessé 3065742b73 Separate book.contentLink and book.contentPath 2015-03-28 15:54:34 +01:00
Samy Pessé ffd69ad1f2 Add test for summary paths
Related to #674
2015-03-28 15:28:28 +01:00
Samy Pessé 9004011479 Merge pull request #673 from lszeremeta/master
Polish (pl) added in theme/i18n
2015-03-28 14:54:50 +01:00
Łukasz Szeremeta 1046bb4133 Add @lszeremeta to translators 2015-03-28 14:48:16 +01:00
Łukasz Szeremeta 5578505213 Polish (pl) added in theme/i18n 2015-03-27 22:03:28 +01:00
Samy Pessé a61f56662a Bump version to 2.0.0 2015-03-25 10:43:58 +01:00
Samy Pessé f42e48be03 Fix scroll reset on small resolutions (mobile & tablet) 2015-03-24 23:59:03 +01:00
Samy Pessé f640e101ba Fix scroling position when preparing page 2015-03-24 23:52:41 +01:00
Samy Pessé b7da276ae0 Fix title for introduction (with i18n) 2015-03-24 23:49:12 +01:00
Samy Pessé bf7c0989f5 Update gitbook-parsers@0.7.2 2015-03-24 23:35:17 +01:00
Samy Pessé 65fdbe7f55 Simplify examples of commands 2015-03-24 23:19:00 +01:00
Samy Pessé c9af209a93 Merge pull request #667 from GitbookIO/better-testing
Better Unit Tests
2015-03-24 23:14:17 +01:00
Samy Pessé 48ab44a776 Add tests for conrefs 2015-03-24 18:22:44 +01:00
Samy Pessé b2e684af8f Add test for templating context 2015-03-24 17:34:47 +01:00
Samy Pessé b38a2c11a4 Add tests for plugins 2015-03-24 17:31:15 +01:00
Samy Pessé c31acef47a Add tests for images in ebook 2015-03-24 16:26:19 +01:00
Samy Pessé e9a573e18a Add test for default description from readme 2015-03-24 14:57:29 +01:00
Samy Pessé c07ddc77f7 Add tests for links 2015-03-24 14:52:24 +01:00
Samy Pessé 303fc992d4 Add test for git url parsing 2015-03-24 14:44:07 +01:00
Samy Pessé 4b7797f61b Add basic tests for multilingual books 2015-03-24 14:16:03 +01:00
Samy Pessé f775d41933 Add base tests for ebook generation 2015-03-24 13:52:29 +01:00
Samy Pessé 7722e7bdfa Update gitbook-parsers@0.7.1 2015-03-24 13:33:56 +01:00
Samy Pessé 346c05f0de Add tests for configuration parsing 2015-03-24 13:24:20 +01:00
Samy Pessé 73c69923b3 Add test for summary parsing
Update gitbook-parsers
2015-03-24 13:11:29 +01:00
Samy Pessé afbca4bdf5 Improve tests for glossary 2015-03-24 11:54:03 +01:00
Samy Pessé b61371942b Add test for glossary replacements 2015-03-24 11:27:37 +01:00
Samy Pessé 61c07e8876 Add test for glossary parsing 2015-03-24 10:24:49 +01:00
Samy Pessé d317741144 Add basic test for multilingual book 2015-03-24 09:36:51 +01:00
Samy Pessé 275739a778 Add basic test for website generation 2015-03-24 08:49:39 +01:00
Samy Pessé cb3a43ed8a Add string representation for books 2015-03-24 08:49:22 +01:00
Samy Pessé ec8d1d8fc9 Improve test for json format 2015-03-23 23:48:46 +01:00
Samy Pessé 868a3186dd Add assertion to test that a file exists 2015-03-23 23:32:07 +01:00
Samy Pessé 17b546181c Fix cleanup after tests 2015-03-23 23:23:25 +01:00
Samy Pessé 2d1aa15af8 New cleaner helper for testing 2015-03-23 23:18:15 +01:00
Samy Pessé 63ee94ff89 Ignore codeblocks when replacing glossary terms 2015-03-23 11:00:50 +01:00
Samy Pessé 7d9dc08a38 Highlight codeblocks in gitbook instead than the parsers 2015-03-23 10:31:48 +01:00
Samy Pessé a836bdedb4 Bump version to 2.0.0-beta.5 2015-03-17 11:23:35 +01:00
Samy Pessé 15ebae8cb1 Fix #641: fix progress order in json format 2015-03-17 11:22:56 +01:00
Samy Pessé 315556310f Bump version to 2.0.0-beta.4 2015-03-17 10:48:25 +01:00
Samy Pessé 9c0b26304b Merge branch master 2015-03-17 10:46:17 +01:00
Samy Pessé acdaea9f6c Fix #649: add option "author" in book.json to set meta author in html 2015-03-17 10:38:56 +01:00
Samy Pessé e481deb5bb Merge pull request #650 from wcandillon/patch-2
Update default generator
2015-03-14 16:00:09 -07:00
William Candillon 6d3ac6074c 💄 Update default generator 2015-03-14 15:45:15 -07:00
Samy Pessé 5e611bde48 Merge pull request #648 from wcandillon/patch-1
Bump to lodash 3.5.0
2015-03-14 15:25:39 -07:00
Samy Pessé 9448562156 Add editorconfig and normalize indent 2015-03-14 23:23:28 +01:00
William Candillon e7e8fe4d08 ⬆️ Bump to lodash 3.5.0 2015-03-14 11:35:28 -07:00
Samy Pessé 8320484b88 Fix #647: Fix links normalization (content and hash) 2015-03-13 23:59:37 +01:00
Samy Pessé 0e243e6f23 Bump version to 2.0.0-beta.3 2015-03-12 21:23:25 +01:00
Samy Pessé 5cd25b0d21 Update gitbook-parsers@0.5.4 2015-03-12 21:20:51 +01:00
Samy Pessé 3218ee7455 Fix tests to adapt to changes in parsers 2015-03-11 22:05:58 +01:00
Samy Pessé 0552007b8a Bump version to 2.0.0-beta.2 2015-03-11 22:03:54 +01:00
Samy Pessé 50bc89d9d9 Fix define of introduction from summary 2015-03-11 22:02:46 +01:00
Samy Pessé 743a88f53a Fix typo in bin message 2015-03-11 11:40:56 +01:00
Samy Pessé ee92c6dd99 Add changelog for 2.0.0-beta.1 2015-03-11 11:23:48 +01:00
Samy Pessé b6c54c17d1 Bump version to 2.0.0-beta.1 2015-03-11 11:17:56 +01:00
Samy Pessé 992ef1ab74 Use latest commit from nunjucks windows fix branch 2015-03-11 11:17:43 +01:00
Samy Pessé 960848ba34 Ensure inline svgs have xml header 2015-03-11 09:38:18 +01:00
Samy Pessé d9aca7a9df Fix #639: update nunjucks to support windows 2015-03-11 00:57:07 +01:00
Samy Pessé 05a0de2d86 Remove require of old dependency "shell-escape" 2015-03-11 00:50:48 +01:00
Samy Pessé 19e4f498cf Fix inline svg extraction on windows 2015-03-10 16:45:22 -07:00
Samy Pessé 3055139297 Fix run of svgexport on windows 2015-03-10 16:31:43 -07:00
Samy Pessé 3d6b099dea Fix links normalization on windows 2015-03-10 22:44:54 +01:00
Samy Pessé dd970e33b8 Remove --no-exit option from mocha tests runner 2015-03-10 21:31:43 +01:00
Samy Pessé 59ba479465 Test option --no-exit for mocha tests 2015-03-10 16:14:04 +01:00
Samy Pessé 54c9ecf3c2 Use mocha from node_modules/.bin 2015-03-10 15:44:39 +01:00
Samy Pessé 8308ae69a2 Remove command export from "npm test" 2015-03-10 15:01:51 +01:00
Samy Pessé bd6c3287ed Add badge for windows testing 2015-03-10 14:58:23 +01:00
Samy Pessé 24fc36deb1 Add appveyor.yml for windows testing
Related to #639
2015-03-10 14:52:09 +01:00
Samy Pessé 2f44b61cec Merge pull request #638 from wapmorgan/patch-1
Update README.md
2015-03-09 21:13:29 +01:00
wapmorgan 45ee503db1 Update README.md
Fix link
2015-03-10 00:12:53 +04:00
Samy Pessé dc826da99b Update README.md 2015-03-09 10:58:11 +01:00
Samy Pessé 3ea659d582 Improve readme presentation 2015-03-09 10:57:23 +01:00
Samy Pessé 34fc2831e0 Merge branch 'version/2.0' 2015-03-09 10:43:12 +01:00
Samy Pessé 1bf68a5aa0 Merge branch 'master' into version/2.0
Conflicts:
	README.md
2015-03-09 10:42:42 +01:00
Samy Pessé d72c397f23 Update gitbook-parsers@0.5.2 2015-03-08 23:09:50 +01:00
Samy Pessé 2c69525148 Add GitBook as book producer in ebook-convert 2015-03-08 22:53:18 +01:00
Samy Pessé ee3a0ba801 Fix #633: update markdown parser to fix codeblocks
Sort glossary and fix #634
2015-03-08 22:53:18 +01:00
Samy Pessé 7a4179a2a2 Merge pull request #631 from MHM5000/version/2.0
[i18n] - fa: Persian/Farsi
2015-03-07 18:48:05 +01:00
Mohammad Hossein Mojtahedi 1d0083c5f4 added @mhm5000 in translators 2015-03-07 18:22:40 +03:30
Mohammad Hossein Mojtahedi 33a6111a30 [i18n] - fa: Persian/Farsi 2015-03-07 16:48:44 +03:30
Samy Pessé a5d7a87e31 Enable rtl in ebooks 2015-03-06 22:45:53 +01:00
Samy Pessé c7f7c5b5ab Base translation for Arabic (with rtl support) 2015-03-06 22:32:45 +01:00
Samy Pessé 55a7b99b4d Fix #227: Add base rtl support for website 2015-03-06 22:32:25 +01:00
Samy Pessé 8bfba604b3 Update gitbook-parsers@0.5.0 and include page.prepare
Fix #625: escape code blocks in markdown
2015-03-06 16:54:46 +01:00
Samy Pessé 2a5fa1c5fb Fix #629: add generator name in template context 2015-03-06 14:34:55 +01:00
Samy Pessé a3e95feb26 Add instructions to use version from git 2015-03-06 13:58:23 +01:00
Samy Pessé 145b00f590 Fix #628: preserve pure anchor links and hash in relative links 2015-03-06 10:25:06 +01:00
Samy Pessé 5f2785f0a8 Escape svgexport args
Fixes shakiba/svgexport#5 and #624
2015-03-05 10:06:45 +01:00
Samy Pessé 412529c548 Merge pull request #621 from nasirkhan/version/2.0
Bengali (bn) added in theme/i18n
2015-02-27 17:48:07 +01:00
nasirkhan 547ec6ade8 bn language added 2015-02-27 22:29:10 +06:00
nasirkhan eac513cfa3 Merge remote-tracking branch 'upstream/version/2.0' into version/2.0 2015-02-27 22:16:11 +06:00
Aaron O'Mullan 5ec8a1f18c Add en.json
Fixes #620
2015-02-27 16:02:31 +01:00
Samy Pessé c923a7e01a Fix transformation of README.md links in index.html 2015-02-26 01:14:27 +01:00
Samy Pessé 366e6ed105 Bump version to 2.0.0-alpha.9 2015-02-24 13:57:20 +01:00
Samy Pessé 52078eb666 Use latest nunjucks from mozilla/nunjucks 2015-02-24 13:54:08 +01:00
Samy Pessé d9ddbff443 Fix links in sidebar 2015-02-24 13:51:10 +01:00
Samy Pessé 01b160f9a1 Fix normalization of html link (README to index) 2015-02-21 13:40:38 +01:00
Samy Pessé 23fcb817a4 Fix html snippets escaping 2015-02-20 20:52:07 +01:00
Samy Pessé f531a3f984 Update nunjucks-autoescape 2015-02-20 12:24:33 +01:00
Samy Pessé c777023e9f Add introduction to changelog 2015-02-17 14:18:49 +01:00
Samy Pessé 62c99759c1 Bump version to 2.0.0-alpha.8 2015-02-14 16:43:19 +01:00
Samy Pessé 6951c21d19 Update gitbook-parsers@0.4.1 2015-02-14 16:26:16 +01:00
Samy Pessé 3a8289483e Improve language detection from book.json 2015-02-14 15:34:19 +01:00
Samy Pessé 4079de9587 Fix #608: fix chapter name for glossary 2015-02-14 15:29:41 +01:00
Samy Pessé b86d171082 Escape description in title attr of glossary link
Related to #609
2015-02-14 11:53:30 +01:00
Samy Pessé 959b272e65 Fix #609: don't escape html in glossary 2015-02-14 11:52:33 +01:00
Samy Pessé 684440e2d1 Fix generation of multilingual book as ebook 2015-02-14 11:49:42 +01:00
Samy Pessé 4740cd3b06 Merge pull request #605 from GitbookIO/update/lodash
Update lodash to 3.x.x
2015-02-13 08:18:45 +01:00
Samy Pessé b3131d99d2 Update lodash@3.2.0 2015-02-13 08:16:28 +01:00
Samy Pessé b0fd2a67ea Fix test with post in blocks 2015-02-13 08:09:28 +01:00
Samy Pessé 7c83869869 Limit concurrent blocks processed 2015-02-13 00:04:27 +01:00
Samy Pessé 57d5c23eaf Accept post function from block to post process content 2015-02-12 23:36:22 +01:00
Samy Pessé 8d92b74e61 Fix page normalization with empty links or images 2015-02-12 18:43:06 +01:00
Samy Pessé 4e2cda99cc Complete changelog for 2.0.0-alpha.7 2015-02-12 16:40:50 +01:00
Samy Pessé dd250e0339 Bump version to 2.0.0-alpha.7 2015-02-12 16:30:55 +01:00
Samy Pessé 741b158631 Fix #596: fix display of glossary in ebook format 2015-02-12 16:27:52 +01:00
Samy Pessé 843889303e Improve pdf by adding default header and footer 2015-02-12 12:47:08 +01:00
Samy Pessé 4ad2b040b4 Always generate README.json with langs index
remove method langsIndex form generators (moved to finish)
2015-02-12 12:18:52 +01:00
Samy Pessé f5916b5c59 Remove log from test 2015-02-12 11:44:44 +01:00
Samy Pessé d9da4e9a08 Fix GitbookIO/plugin-youtube#2: hash remote image for local path 2015-02-12 11:40:17 +01:00
Samy Pessé 1d0f6370ad Fix default language to english 2015-02-12 08:19:38 +01:00
Samy Pessé 12a7a4c4cf Fix test for lodash 3.1.0 (from git) 2015-02-11 17:53:46 +01:00
Samy Pessé e4127d961e Update to gitbook-parsers@0.4.0 2015-02-09 18:10:46 +01:00
Samy Pessé 8e97655040 Complete zh translations 2015-02-09 11:38:12 +01:00
Samy Pessé 9b61b87873 Add Serif and Sans to all translations 2015-02-09 11:14:47 +01:00
Samy Pessé 4a99e37b2f Fix spaces in zh-tw translation 2015-02-09 11:12:07 +01:00
Samy Pessé 752b5e9b7c Merge pull request #602 from howiehu/version/2.0
add zh-tw (Traditional Chinese) i18n file
2015-02-09 11:09:04 +01:00
Samy Pessé b318f2fe94 Improve i18n to support locale normalization 2015-02-09 11:08:46 +01:00
Hao Hu 01c46030b6 Add @howiehu to authors and normalize zh-tw translation 2015-02-09 17:59:54 +08:00
Hao Hu 9803b05d8a add zh-tw (Traditional Chinese) i18n file 2015-02-09 17:56:25 +08:00
Samy Pessé 1337858fe6 Add @howiehu to authors and normalize zh translation 2015-02-09 10:16:37 +01:00
Aaron O'Mullan 925b9e88ad Merge pull request #601 from howiehu/version/2.0
Add Simplifiled Chinese (zh-cn) i18n file.
2015-02-09 09:58:36 +01:00
Hao Hu 7305011a8b add zh-cn (Simplifiled Chinese) i18n file 2015-02-09 16:53:30 +08:00
Samy Pessé 489f23f74e Fix #595: calcul link to glossary as an absolute path 2015-02-07 20:39:15 +01:00
Samy Pessé 370799ac55 Add test for #595: glossary links in subpages 2015-02-07 20:35:24 +01:00
Samy Pessé 4a9adb9440 Bump version to 2.0.0-alpha.6 2015-02-06 19:42:55 +01:00
Samy Pessé d8898b7a1f Add changelog for version 2.0.0-alpha.* 2015-02-06 15:54:40 +01:00
Samy Pessé bb7e081a37 Fix #588: Fix replacement of glossary terms by links 2015-02-06 15:28:53 +01:00
Samy Pessé c3ffa5e0ef Add test for glossary replacement #588 2015-02-06 15:07:01 +01:00
Samy Pessé 724bc2b59c Add capital to german translation of share links 2015-02-06 15:00:13 +01:00
Samy Pessé 178d2e2a48 Add @RyanOM as spanish translator 2015-02-06 14:35:23 +01:00
Samy Pessé 4d710c129c Merge pull request #590 from RyanOM/patch-2
Created es.json
2015-02-06 14:34:25 +01:00
RyanOM e4dbf62c0f Create es.json 2015-02-06 11:33:26 -02:00
Samy Pessé b0cd23fd34 Add @RyanOM as a translator 2015-02-06 14:32:20 +01:00
Samy Pessé af5764bc3b Merge pull request #589 from RyanOM/patch-1
Create pt.json
2015-02-06 14:29:31 +01:00
RyanOM 6309da1214 Create pt.json 2015-02-06 11:21:22 -02:00
Samy Pessé 38c9bfa357 Fix dom-serializer dependency 2015-02-05 21:10:17 +01:00
Samy Pessé f194cb513c Merge pull request #586 from ludovicofischer/version/2.0
Use tiny-lr instead of old unmaintained fork.
2015-02-05 20:50:02 +01:00
Ludovico Fischer 03ff892727 Use tiny-lr instead of old unmaintained fork. 2015-02-05 19:43:29 +01:00
Samy Pessé 8cc0f64f54 Handle SVG correctly in page normalization
Related to mathjax/MathJax-node#65
2015-02-05 17:36:44 +01:00
Samy Pessé 532e8b0388 Bump version to 2.0.0-alpha.5 2015-02-05 13:56:52 +01:00
Samy Pessé 35b3d50012 Add "finish:before" to the list of valid hooks 2015-02-05 13:56:43 +01:00
Samy Pessé 72ff9996ce Update fs-extra to fix fs.copy issue 2015-02-05 13:51:53 +01:00
Samy Pessé 0759c4dd78 Bump version to 2.0.0-alpha.4 2015-02-04 20:49:09 +01:00
Samy Pessé 82a1a151e4 Correctly copy cover for sub books 2015-02-04 20:29:49 +01:00
Samy Pessé ff6e8387fb Bump version to 2.0.0-alpha.3 2015-02-04 18:31:26 +01:00
Samy Pessé f71601e8d3 Fix generation of multilingual books as ebook 2015-02-04 18:31:07 +01:00
Samy Pessé 234a37726f Improve logs for images and ebook copy 2015-02-04 16:54:02 +01:00
Samy Pessé 65a7979874 Load plugins from the book in priority 2015-02-04 15:25:40 +01:00
Samy Pessé 6a00bf0fc0 Remove plugin list 2015-02-04 11:54:52 +01:00
Samy Pessé 853f3d6482 Add translators on AUTHORS.md
@gbonanome, @kmelve, @AndreyAkinshin, @winniehell
2015-02-04 11:52:00 +01:00
Samy Pessé 27de7cd914 Merge pull request #582 from kmelve/version/2.0
Added Norwegian translation
2015-02-04 11:42:46 +01:00
Knut Melvær 2318cae1e6 Added Norwegian translation 2015-02-04 11:39:40 +01:00
Samy Pessé cb313c0fab Bump version to 2.0.0-alpha.2 2015-02-04 10:02:51 +01:00
Samy Pessé 4f25056017 Update gitbook-parsers@0.3.1 2015-02-03 14:34:20 +01:00
Samy Pessé 5baebb8754 Set "info" as default log level 2015-02-03 10:53:33 +01:00
Samy Pessé 1eea994e73 Fix init command 2015-02-03 10:52:39 +01:00
Samy Pessé 8a597ff3f1 Fix installation instruction 2015-02-03 10:40:22 +01:00
Samy Pessé 42fd7b12c0 Bump version to 2.0.0-alpha.1 2015-02-03 10:37:25 +01:00
Samy Pessé fd78a06b11 Add message in gitbook command line 2015-02-03 10:37:21 +01:00
Samy Pessé 80efc8e086 Accept alpha and beta version of plugins 2015-02-02 22:07:40 +01:00
Samy Pessé c0dcb886ef Improve install command to resolve best plugin version 2015-02-02 21:45:14 +01:00
Samy Pessé df39128894 Fix #575: update logo and use retina favicon 2015-02-02 17:17:54 +01:00
Samy Pessé 3ab5b57b4f Merge pull request #573 from gbonanome/version/2.0
Add italian translation
2015-01-31 09:38:24 +01:00
Giulio Bonanome 49174d1731 Add italian translation 2015-01-31 00:51:10 +01:00
Samy Pessé ed3b77b655 Don't use xmlMode to normalize html 2015-01-30 17:47:19 +01:00
Samy Pessé 55a1aee164 Fix validation of semi-loaded plugins 2015-01-30 17:31:47 +01:00
Samy Pessé d7caf6686e Fix namespacing of plugins resources 2015-01-30 16:53:42 +01:00
Samy Pessé 71dad602ec Merge pull request #572 from AndreyAkinshin/version/2.0
Add theme/i18n/ru.json
2015-01-30 15:42:02 +01:00
Andrey Akinshin 30d8719c4b Add theme/i18n/ru.json 2015-01-30 16:39:16 +02:00
Samy Pessé ad81d38d07 Fix support of iframe in html normalization 2015-01-30 14:29:34 +01:00
Samy Pessé 6740b1b99c Use spaces identation 2015-01-30 13:56:21 +01:00
Samy Pessé f5f2cccbf4 Add "generator" to plugins blocks and filters ctx 2015-01-30 13:16:27 +01:00
Samy Pessé f45a1faa63 Fix #515: Update parsers and add reStructuredText support 2015-01-30 12:51:57 +01:00
Samy Pessé 5a0dbe8cb7 Remove useless log 2015-01-30 11:42:18 +01:00
Samy Pessé 2eb45e4699 Fix #567: Fail hard if book.json is invalid 2015-01-30 11:37:35 +01:00
Samy Pessé f7039a174a Add warning message when gitbook version to use is not fixed 2015-01-30 11:33:31 +01:00
Samy Pessé 5690704444 Download external images in ebook format 2015-01-29 22:42:41 +01:00
Samy Pessé 8a8ffb6134 Fix #565: fix relative path to fonts 2015-01-29 21:22:20 +01:00
Samy Pessé 5b23dd8ffd Fix ebook commands 2015-01-29 18:41:51 +01:00
Samy Pessé 5fc0c6b507 Convert inline svg as png if needed 2015-01-29 18:16:23 +01:00
Samy Pessé c8e72092c7 Fix inline svg image in page 2015-01-29 16:21:36 +01:00
Samy Pessé 9172948c18 Remove used blocks from templates 2015-01-29 14:18:13 +01:00
Samy Pessé 2bec7c5e10 Add option to block to not parse output 2015-01-29 14:09:27 +01:00
Samy Pessé 907ce6dbcd Fix copy of plugins assets to output 2015-01-28 22:54:19 +01:00
Samy Pessé 898000a580 Fix resources loading in plugins 2015-01-28 19:39:41 +01:00
Samy Pessé f95beed58b Fix log option to command line commands 2015-01-28 19:18:01 +01:00
Samy Pessé 4baaa41ac9 Fix for good path resolution of svg image 2015-01-28 18:34:09 +01:00
Samy Pessé 1f7d349aed Fix conversion of svg when cache is empty 2015-01-28 18:27:27 +01:00
Samy Pessé c0d922560d Improve svg conversion and links normalization 2015-01-28 18:23:48 +01:00
Samy Pessé f5ded5e5e1 Fix absolute path calcul
Add tests for links module
2015-01-28 17:52:10 +01:00
Samy Pessé 56d1720aae Improve image conversion to png to avoid doublons 2015-01-28 16:36:17 +01:00
Samy Pessé 02d7102c68 Add svgexport to travis tests 2015-01-28 14:55:59 +01:00
Samy Pessé 592b32b036 Fix error message when svgexport is not installed 2015-01-28 14:54:29 +01:00
Samy Pessé 1213997341 Use svgexport instead of imagemagick 2015-01-28 14:53:27 +01:00
Samy Pessé 4e620f34ad Handle correctly path starting with "/" 2015-01-28 13:17:41 +01:00
Samy Pessé 534edaceac Handle absolute url for images conversion (svg -> png) 2015-01-28 12:46:15 +01:00
Samy Pessé ee13b4bf75 Improve error message when imagemagick is not installed 2015-01-28 12:22:26 +01:00
Samy Pessé 924006d508 Add test for svg conversion 2015-01-28 12:02:36 +01:00
Samy Pessé 350f34561a Show log from ebook-convert in realtime for debugging 2015-01-28 11:52:24 +01:00
Samy Pessé 324fbb2f69 Convert svg images to png in ebook 2015-01-28 11:43:44 +01:00
Samy Pessé 5539ab48a5 Fix init of livereload plugin on serve 2015-01-28 11:28:21 +01:00
Samy Pessé c25157fc40 Fix display of plugins count 2015-01-28 11:10:30 +01:00
Samy Pessé d1b2950993 Check parser used before applying template shortcuts 2015-01-27 22:34:48 +01:00
Samy Pessé d8995200e6 Add options "shortcuts" for blocks from plugins 2015-01-27 22:27:59 +01:00
Samy Pessé bc389ab4a1 Improve tests on blocks extensions 2015-01-27 21:47:14 +01:00
Samy Pessé cf12d09092 Complete parsing of blocks from plugin extensions 2015-01-27 21:39:41 +01:00
Samy Pessé 8e18adbe4c Parse correctly list of blocks and args 2015-01-27 21:21:01 +01:00
Samy Pessé f1b5e3de0c Add test for block defined with special end tag 2015-01-27 17:16:59 +01:00
Samy Pessé 0e0a23b794 Add blocks from plugins to template engine 2015-01-27 17:07:25 +01:00
Samy Pessé d9329295d6 Add test for extending template blocks 2015-01-27 16:04:49 +01:00
Samy Pessé 750fb862d4 Improve tests for plugins with filters 2015-01-27 15:58:28 +01:00
Samy Pessé 131c19dee6 Move plugin helper methods to a specific class 2015-01-27 15:22:42 +01:00
Samy Pessé 870ca4da0c Extend templates filters
Fully remove mathjax from plugins
2015-01-27 12:56:04 +01:00
Samy Pessé 54e1be1e77 Parse plugins in book instead of generator 2015-01-27 12:49:08 +01:00
Samy Pessé ce259eb4ec Remove mathjax plugin from default installed 2015-01-27 12:35:37 +01:00
Samy Pessé 7424395171 Fix invalid log call in website generator 2015-01-27 12:17:20 +01:00
Samy Pessé 6125df5834 Add back "page:before" hook 2015-01-27 11:15:16 +01:00
Samy Pessé 99cd3148ba Log output from ebook-convert when debug is enabled 2015-01-27 09:37:38 +01:00
Samy Pessé 1a1ace0ae1 Transform as absolute output path in configuration 2015-01-26 22:21:09 +01:00
Samy Pessé 22bae559db Fix #273: clean the output without removing .git and .svn 2015-01-26 22:19:17 +01:00
Samy Pessé 5cee07ee8c fs.list take option for files to ignores 2015-01-26 21:59:55 +01:00
Samy Pessé 4250f559b0 Extract filters from plugins 2015-01-26 21:42:30 +01:00
Samy Pessé 3293c39450 Add test for plugin resources 2015-01-26 16:08:39 +01:00
Samy Pessé 5b447d030b Add some tests for plugins validation 2015-01-26 15:51:33 +01:00
Samy Pessé f02680dc73 Transform page after hook "page" 2015-01-26 13:19:42 +01:00
Samy Pessé cee7643f00 Call hook "init" when preparing generator 2015-01-26 12:54:29 +01:00
Samy Pessé a53ec62e4a Fix logs for deprecated hooks 2015-01-26 12:42:01 +01:00
Samy Pessé 795da31af8 Add warning message about deprecated hooks 2015-01-26 12:05:50 +01:00
Samy Pessé f70c29fea5 Improve logs for plugins installation 2015-01-26 11:57:28 +01:00
Samy Pessé decd8dbdc5 Add infos in readme about variables and templating 2015-01-26 10:32:19 +01:00
Samy Pessé edc954f2ac Add chapter in readme about conrefs 2015-01-26 10:19:10 +01:00
Samy Pessé 93bc86a0fe Fix git url parsing for content references 2015-01-26 10:12:26 +01:00
Samy Pessé 75b217fc24 Support ssh urls in git parsing 2015-01-26 09:12:00 +01:00
Samy Pessé d6b44cc149 Add tests for parsing git url 2015-01-26 08:05:07 +01:00
Samy Pessé 0f0ec4cf3d Improve logger 2015-01-25 15:27:40 +01:00
Samy Pessé 06ab84abe3 Improve logger module 2015-01-25 14:55:37 +01:00
Samy Pessé bb5761e885 Change comment start and end in templates
(to avoid conflicts with maths)
2015-01-25 13:54:25 +01:00
Samy Pessé d60a9763cd Fix loading of plugins when book root is relative 2015-01-25 12:08:52 +01:00
Samy Pessé e366c05238 Add logs on plugins loading 2015-01-25 12:06:52 +01:00
Samy Pessé 690cdbe505 Improve output of book.log 2015-01-25 12:03:19 +01:00
Samy Pessé fd701fc37c Add color to output 2015-01-25 11:55:33 +01:00
Samy Pessé 4d38baf7a2 Add _book to list of files to ignore 2015-01-25 11:55:25 +01:00
Samy Pessé 7a999e01d5 Fix link in features list 2015-01-25 11:35:32 +01:00
Samy Pessé f3a5464306 Add AsciiDoc to readme 2015-01-25 11:32:54 +01:00
Samy Pessé 2c57a37afb Add command to init a book 2015-01-24 23:14:32 +01:00
Samy Pessé 244b0f8efc Add back readme 2015-01-24 21:34:18 +01:00
Samy Pessé b4dc31e82b Add command to generate all ebooks 2015-01-24 18:56:18 +01:00
Samy Pessé 1583ede3d7 Add Book.generateFile to output a pdf 2015-01-24 18:54:20 +01:00
Samy Pessé 572994a17e Add more tests for inclusion 2015-01-24 18:18:43 +01:00
Samy Pessé 796dd4c13a Add base loader to resolve git dependencies 2015-01-24 18:04:03 +01:00
Samy Pessé e02f29e763 Add test for local inclusion 2015-01-24 15:33:04 +01:00
Samy Pessé 6805b02c63 Improve german translation of "Introduction" 2015-01-24 12:53:06 +01:00
Samy Pessé 21949ccd04 Update gitbook-parsers@0.2.2 2015-01-24 12:38:36 +01:00
Samy Pessé 7b766f692b Return to version 0.5.1 of gaze 2015-01-24 12:34:01 +01:00
Samy Pessé c9aca86dcc Watch all fiels that can be parsed in serve 2015-01-24 12:29:04 +01:00
Samy Pessé 99d9d49610 Improve navigation with non existant entries
Use i18n for introduction title
2015-01-24 12:18:23 +01:00
Samy Pessé fd98746c2b Update gitbook-parsers and improve summary tests 2015-01-24 11:57:21 +01:00
Samy Pessé 2efd234824 Complete serve command 2015-01-24 11:23:53 +01:00
Samy Pessé 8be4304b5c Fix translation of White theme in german 2015-01-24 10:54:31 +01:00
Samy Pessé c984eba2bc Fix german translation 2015-01-23 23:21:56 +01:00
Samy Pessé 2bb2a2a330 Normalize language to support: "fr-FR" 2015-01-23 23:06:10 +01:00
Samy Pessé f12163534d Add german transalation
Based on PR by @winniehell
2015-01-23 22:51:23 +01:00
Samy Pessé e9d7c71911 Fix fr i18n texts 2015-01-23 22:46:07 +01:00
Samy Pessé 59b3b0fadd Translate ebook 2015-01-23 22:33:24 +01:00
Samy Pessé b426aba846 Add french translations for website 2015-01-23 22:29:40 +01:00
Samy Pessé 89885e17a5 Set translation to use in templates 2015-01-23 22:12:58 +01:00
Samy Pessé b66e9d2bed Load locales to translate layout 2015-01-23 22:05:11 +01:00
Samy Pessé d0f910d65f Fix language parsing test 2015-01-23 18:59:01 +01:00
Samy Pessé 8e41aca8a7 Fix #517: fix weibo sharing class in header 2015-01-23 18:53:48 +01:00
Samy Pessé 4fec7760a1 Fix error in book parsing 2015-01-23 18:50:10 +01:00
Samy Pessé e6cbea9c70 Change name config "lang" to "language" 2015-01-23 18:48:49 +01:00
Samy Pessé 7945f19285 Fix display of log type 2015-01-23 18:40:42 +01:00
Samy Pessé 5bd1269268 Accept argument "log" from commands 2015-01-23 18:39:07 +01:00
Samy Pessé 1fdd8a7611 Improve logs in book parser 2015-01-23 18:21:03 +01:00
Samy Pessé 112782d118 Add logs methods to Book object 2015-01-23 18:03:15 +01:00
Samy Pessé b88b4a0578 Add context configuration to Book object 2015-01-23 17:40:53 +01:00
Samy Pessé a964e19715 Fix paths indexed in search index 2015-01-23 16:17:04 +01:00
Samy Pessé c47166d700 Fix version in generator tag 2015-01-23 16:04:10 +01:00
Samy Pessé 77834f8166 Accept format argument to build command 2015-01-23 15:51:19 +01:00
Samy Pessé 0fc34e0a35 Use npm version of gitbook-parsers 2015-01-23 15:25:13 +01:00
Samy Pessé df16f3d90d Test ebook generation instead of pdf output 2015-01-23 14:10:45 +01:00
Samy Pessé ccd2f6ecdc Check that readme file is not ignored when parsing 2015-01-23 12:11:27 +01:00
Samy Pessé 19f1d31758 Add base for ebook generator 2015-01-23 00:16:46 +01:00
Samy Pessé ee2420cbcc Change name of generator "site" to "website" 2015-01-22 22:57:08 +01:00
Samy Pessé 322cf59a34 Use html link in search index 2015-01-22 22:46:35 +01:00
Samy Pessé 66841b1bb7 Remove glossary from theme js 2015-01-22 22:36:59 +01:00
Samy Pessé 74ea419c53 Write search index to output folder 2015-01-22 22:31:47 +01:00
Samy Pessé 0c8513801c Write glossary for website 2015-01-22 21:52:13 +01:00
Samy Pessé 90789aa5b9 Use container-based Travis CI stack
cc @winniehell
2015-01-22 21:21:27 +01:00
Samy Pessé 1d13624d3d Replace glossary terms by links to glossary 2015-01-22 19:45:14 +01:00
Samy Pessé 9e172549d1 Mark glossary terms in html parsed 2015-01-22 19:09:03 +01:00
Samy Pessé 0ba36c6f4e Use external gitbook parsers 2015-01-22 18:21:30 +01:00
Samy Pessé c47093e82a Add test for generation of multilingual book 2015-01-22 17:15:06 +01:00
Samy Pessé 57bdc102bc Fix tests of generations 2015-01-22 17:12:46 +01:00
Samy Pessé be651f0138 Separate test for geenration 2015-01-22 17:06:33 +01:00
Samy Pessé 974819bafb Remove parent extension for nunjucks 2015-01-22 17:03:51 +01:00
Samy Pessé f31a272b1f Add options "input" that equals root of the book 2015-01-21 23:04:55 +01:00
Samy Pessé a492c66321 Copy files from book to output
Add test for personalised styles
2015-01-21 23:03:09 +01:00
Samy Pessé 85930161f7 Normalize tests 2015-01-21 22:51:59 +01:00
Samy Pessé 4f9ece1ec1 Fix display of summary in website 2015-01-21 20:26:29 +01:00
Samy Pessé 748f004609 Add summary utils 2015-01-21 20:21:55 +01:00
Samy Pessé cb709930bb Normalize summary in gitbook 2015-01-21 20:21:47 +01:00
Samy Pessé 98027cb008 Fix path to assets in website 2015-01-21 20:04:03 +01:00
Samy Pessé 3d8db17bc3 Copy theme assets to output 2015-01-21 19:51:35 +01:00
Samy Pessé 3c605ea809 generate an index.html for entry points 2015-01-21 19:40:40 +01:00
Samy Pessé bd931c5cbd Adapt themes website templates 2015-01-21 19:15:57 +01:00
Samy Pessé c6e3a27284 Add normalization of plugins 2015-01-21 13:36:09 +01:00
Samy Pessé b5d7e7966f Fix site generator polluting basegenerator 2015-01-21 11:43:39 +01:00
Samy Pessé be2da0fab1 Fix json template preparation 2015-01-21 11:33:33 +01:00
Samy Pessé 0da50819d6 Fix asciidoc test generation 2015-01-21 11:28:59 +01:00
Samy Pessé 9f9265ad76 Add asciidoc support 2015-01-21 10:17:58 +01:00
Samy Pessé a5ebbc34c7 Add styles configuration in book.json 2015-01-20 13:30:22 +01:00
Samy Pessé 33e32b20d9 Use latest version fo theme 2015-01-20 11:32:11 +01:00
Samy Pessé 238cd9f7f0 Add back theme 2015-01-20 11:29:26 +01:00
Samy Pessé bac25cdf29 Improve tests for multilingual json output 2015-01-19 22:44:17 +01:00
Samy Pessé c15399613c Normalize paths in html content 2015-01-19 22:39:23 +01:00
Samy Pessé d6f7f1f4fb Add test for parsing of navigation 2015-01-19 21:19:41 +01:00
Samy Pessé a67dad8cbe Fix list of files and parsing of navigation files only 2015-01-19 21:16:06 +01:00
Samy Pessé b549158483 Parse navigation and progress in parsed page 2015-01-19 20:54:59 +01:00
Samy Pessé 9a2b03b183 Handle different structure in json multilingual output 2015-01-19 20:46:05 +01:00
Samy Pessé 2b2b4f46c2 Complete json generator for multilingual book
Add tests
2015-01-19 20:41:34 +01:00
Samy Pessé 6344928580 Write file in json generator 2015-01-19 18:49:02 +01:00
Samy Pessé 2dbf9b0d4a Start adapting json generator 2015-01-19 17:32:59 +01:00
Samy Pessé be4d2679a4 Add base test for generation 2015-01-19 17:25:16 +01:00
Samy Pessé 70189a5ee2 Fix parsing of plugins list 2015-01-19 16:59:42 +01:00
Samy Pessé ad233c0d8e Improve plugins installation to prevent installation of default plugins 2015-01-19 16:53:20 +01:00
Samy Pessé 41c3db4c04 Add command to install plugins 2015-01-19 16:30:52 +01:00
Samy Pessé 7f01f4b048 Add plugin object 2015-01-19 16:23:44 +01:00
Samy Pessé 5ed5844490 Parse list of files and add test for it 2015-01-19 16:00:12 +01:00
Samy Pessé 777963c97c Change name of Book.init to Book.parse 2015-01-19 15:52:35 +01:00
Samy Pessé 2f3d6f8dff Improve test for parsing multilanguages books 2015-01-19 15:48:22 +01:00
Samy Pessé 2ae3924365 Fix parsing of langs 2015-01-19 15:46:34 +01:00
Samy Pessé d172aaefee Add test for glossary parsing 2015-01-19 15:31:58 +01:00
Samy Pessé f0ea7bc53b Add test for readme parsing 2015-01-19 15:28:13 +01:00
Samy Pessé 793600ab2f Improve test to test a all book 2015-01-19 15:26:31 +01:00
Samy Pessé 354b4afba1 Parse readme 2015-01-19 15:12:08 +01:00
Samy Pessé 8569a74103 Use template before parsing glossary, summary and langs 2015-01-19 15:05:13 +01:00
Samy Pessé b314972195 Add configuration to send structures files 2015-01-19 14:51:35 +01:00
Samy Pessé 52179163dd Fix output for sub-books in multi languages 2015-01-19 13:27:17 +01:00
Samy Pessé 8ed9f645fc Fix parsing of langs
Add command to build
2015-01-19 13:22:34 +01:00
Samy Pessé e1594cde2c Remove doc about custom styles 2015-01-19 13:14:52 +01:00
Samy Pessé 60993d3123 Parse langs and glossary 2015-01-19 12:06:04 +01:00
Samy Pessé 39b2aaf489 Add parsing of summary and associated tests 2015-01-19 10:59:43 +01:00
Samy Pessé 58b04da60f Add test for loading configuration from book.js 2015-01-19 10:15:53 +01:00
Samy Pessé d9c020194d Add base object to load configuration 2015-01-19 10:08:49 +01:00
Samy Pessé ec586dd3cd Clear folder 2015-01-19 09:47:36 +01:00
Samy Pessé 8043216170 Merge pull request #555 from GitbookIO/feature/styles
Add custom styles options
2015-01-15 06:29:14 +01:00
Samy Pessé 3c7372dff5 Add doc about custom styles 2015-01-14 22:53:27 +01:00
Samy Pessé 2cab018791 Merge pull request #553 from GitbookIO/fix/summary-whitespace
Fix/summary whitespace
2015-01-14 22:41:34 +01:00
Samy Pessé 9467cda131 Apply styles to ebook output 2015-01-14 22:31:36 +01:00
Samy Pessé 3382f1b084 Include styles in website format 2015-01-14 22:19:40 +01:00
Aaron O'Mullan ae52ef5b78 Handle whitespace between lists in SUMMARY.md 2015-01-14 22:17:15 +01:00
Aaron O'Mullan f88951546d Add test/bin/summary.js
Another small useful tool
2015-01-14 22:16:37 +01:00
Samy Pessé 7d90cd2a9e Add default values for "styles" 2015-01-14 22:08:42 +01:00
Samy Pessé 94a9db3d54 Move theme folder "book" to "website" 2015-01-14 22:08:31 +01:00
Aaron O'Mullan 3f36d83bfb Add test/bin/lex.js utility
Helpful binary when developing / debugging
2015-01-14 21:56:57 +01:00
Aaron O'Mullan c7e3370ac0 Add summary whitespace tests 2015-01-14 21:45:32 +01:00
Samy Pessé bcb34dcd79 Merge pull request #547 from JozoVilcek/patch-2
Change link to mermaid plugin
2015-01-12 00:13:17 +01:00
Jozef Vilcek 71905aa0c8 Change link to mermaid plugin
Repository name for mermaid plugin has changed to better reflect naming conventions
2015-01-12 00:11:02 +01:00
Samy Pessé dcbf115f25 Adapt platform command to gitbook.com 2015-01-11 15:14:50 +01:00
Samy Pessé 668f2f9e2c Update urls in package.json 2015-01-11 15:09:25 +01:00
Samy Pessé 530975b4fb Improve names of plugins 2015-01-11 14:53:57 +01:00
Samy Pessé d35ce31af2 Merge pull request #545 from JozoVilcek/patch-1
Enlist gitbook-mermaid plugin
2015-01-11 14:52:49 +01:00
Jozef Vilcek e5f17cd694 Enlist gitbook-mermaid plugin 2015-01-11 13:52:11 +01:00
Aaron O'Mullan b50dea9c70 Update kramed to 0.4.4 2015-01-06 15:15:48 +01:00
Aaron O'Mullan 6b76032bb1 Bump version to 1.5.0 2014-12-17 17:08:09 +01:00
Aaron O'Mullan 85b09eda56 Add 1.4.2's changes 2014-12-17 17:07:10 +01:00
Aaron O'Mullan c4be78a81f Merge pull request #506 from Nijikokun/feature/clarity-midnight
Clarity: Midnight Theme (Night)
2014-12-16 18:53:09 +01:00
Aaron O'Mullan e7309f71d2 Merge pull request #530 from GitbookIO/fix/cli-error-handling
Robust CLI error handling
2014-12-16 17:46:01 +01:00
Aaron O'Mullan 6c979c9419 Robust CLI error handling
Fixes #528, fixes #524, fixes #518
2014-12-16 16:05:50 +01:00
Aaron O'Mullan 7fd7732345 Bump version to 1.4.2 2014-12-10 23:27:01 +01:00
Aaron O'Mullan 960ef4d945 Fix descriptor and me leak with bad write queues
Node.js for some reason queues up writes from fs.writeFile causing
memory and descriptor leaks, preventing building large books. This is
now fixed

Fixes #336, fixes #454
2014-12-10 16:32:49 +01:00
Aaron O'Mullan 92523fb4b5 Force process.exit at end of build 2014-12-09 17:31:23 +01:00
Samy Pessé 66bb46df22 Merge pull request #516 from jr0cket/patch-1
Add gitbook init command to "how to use" section
2014-12-08 00:46:04 +01:00
John Stevenson 0454710d3b Add gitbook init command to "how to use" section
Highlight that Gitbook can generate the files and directories for a book from its SUMMARY.md file.
2014-12-07 23:44:41 +00:00
Samy Pessé c9a31cc987 Add option isbn for books 2014-12-03 23:19:47 +01:00
Samy Pessé f03c316274 Bump version to 1.4.1 2014-11-30 17:01:47 +01:00
Samy Pessé 001a4f91be Fix command 'install' without arguments 2014-11-30 17:00:12 +01:00
Samy Pessé 44a3bfe296 Bump version to 1.4.0 2014-11-30 14:59:08 +01:00
Samy Pessé a9ce6f808d Add doc about gitbook install 2014-11-30 14:54:34 +01:00
Samy Pessé e5c667e0fa Add test for parsing of plugins list with version 2014-11-30 14:50:47 +01:00
Samy Pessé e36f274dbe Handle specific version for plugins 2014-11-30 14:46:21 +01:00
Samy Pessé 2a88427e74 Improve error message when plugins not found 2014-11-30 13:13:00 +01:00
Samy Pessé ed48f5f3ee Add command "install" to install plugins from book.json 2014-11-30 13:04:38 +01:00
Samy Pessé 7b4accb117 Bump version to 1.3.4 2014-11-25 18:55:33 +01:00
Samy Pessé d6437d31d4 Omit "generator" when building file with config file 2014-11-25 18:53:02 +01:00
Samy Pessé 3dd33f1f3c Merge pull request #502 from tonka3000/X-UA-Compatible-tag
add X-UA-Compatible meta tag for IE
2014-11-25 15:20:14 +01:00
Samy Pessé 3a0f00411b Fix #505: add glossary to ebook file 2014-11-24 22:08:19 +01:00
Samy Pessé 5b655bb29a Fx typo 2014-11-24 21:56:33 +01:00
Samy Pessé faf10605e8 Add hook finish:before 2014-11-24 21:41:50 +01:00
Nijiko Yonskai c52aecdbd5 Initial release 2014-11-22 20:37:06 -08:00
Samy Pessé 5c98b3350b Merge pull request #503 from jr0cket/ebook-command-fix
updated eBook generation commands - resolves #432
2014-11-22 16:41:19 +01:00
John Stevenson 6f4e1d10c1 made commands clearer by seperating output filename option 2014-11-22 14:47:12 +00:00
John Stevenson 870886599a updated eBook generation commands 2014-11-22 11:26:08 +00:00
Michael Aigner 1b9801b8a4 add X-UA-Compatible meta tag for IE (https://github.com/GitbookIO/gitbook/issues/501) 2014-11-20 10:16:40 +01:00
Samy Pessé 897463b22e Bump version to 1.3.3 2014-11-14 22:10:19 +01:00
Samy Pessé aa4894e94c Fix parsing of already lexed content 2014-11-14 22:09:30 +01:00
Samy Pessé 8a0180ae6b Bump version to 1.3.2 2014-11-14 18:53:57 +01:00
Samy Pessé d6776b98d3 Fix bundle task 2014-11-14 18:53:48 +01:00
Samy Pessé 6a04ba89a5 Update gitbook bundle 2014-11-14 18:53:39 +01:00
Samy Pessé 05eaeeb0d0 Fix #441: Improve validity of epub output 2014-11-13 08:34:35 +01:00
Samy Pessé 77043464b2 Fix #496: improve replacement of glossary terms in html 2014-11-12 22:10:38 +01:00
Samy Pessé b90f74a821 Merge pull request #494 from cnDelbert/master
Bug fix for issue#493: 2-level or more deep relative links go wrong when in win32
2014-11-12 19:06:33 +01:00
Aaron O'Mullan f804eb42ac Merge pull request #495 from romanlytkin/patch-1
Update README.md
2014-11-07 15:58:18 +01:00
romanlytkin 74fd8c159b Update README.md
Hi, i add 2 new plugins for gitbook, I hope it will be useful to someone.
2014-11-07 17:37:27 +03:00
Delbert a741ec1350 Bug fix for issue #493: 2-level or more deep relative links may go wrong when in win32 2014-11-06 15:50:59 +08:00
Samy Pessé 4b26c31b3b Remove unnecessary option "repo" from tests 2014-11-03 17:43:44 +01:00
Samy Pessé dfd487692a Adapt new page.parse api for tests 2014-11-03 17:40:38 +01:00
Samy Pessé 195374ecee Merge pull request #489 from codepiano/fork
bugfix,init page object's lexed attribute.
2014-11-03 17:29:54 +01:00
Samy Pessé 1659778a77 Bump version to 1.3.1 2014-11-03 16:58:37 +01:00
Samy Pessé 40c4035afb Fix #491: handle correctly url without path for links 2014-11-03 16:57:35 +01:00
codepiano 1502d65286 Merge branch 'master' of github.com:GitbookIO/gitbook into fork
Conflicts:
	lib/parse/page.js
2014-11-02 01:34:28 +08:00
Samy Pessé 0feb672d70 Bump version to 1.3.0 2014-11-01 15:36:10 +01:00
Samy Pessé 2a4ef5bbf4 Fix dependency in renderer 2014-11-01 15:21:16 +01:00
Samy Pessé c4540332a7 Bundle gitbook parser as a client side library 2014-11-01 15:09:58 +01:00
Samy Pessé 2104404cb3 Remove dependency for path in parser 2014-11-01 15:09:41 +01:00
Samy Pessé 002d685ebb Adapt include in page parsing to works on clientside 2014-11-01 15:00:13 +01:00
codepiano 9da10e2b25 bugfix,init page object's lexed attribute.
the page object's attribute 'lexed' is not correctly inited.so when
use page.lexed to generate the search index file,nothing will be
indexed.
2014-10-31 18:00:09 +08:00
Samy Pessé 1e4632080b Bump version to 1.2.0 2014-10-30 18:27:56 +01:00
Samy Pessé 5191106396 Update documentation in readme 2014-10-30 18:27:26 +01:00
Samy Pessé 6ab5cafaf3 Improve toc in ebook (Fixes #338, #322) 2014-10-30 18:14:06 +01:00
Samy Pessé d1c0cb9c71 Normalize template paths 2014-10-30 18:01:56 +01:00
Samy Pessé 38c750101c Fix #487: Use generated toc as base for ebook generation 2014-10-30 17:52:39 +01:00
Samy Pessé ba0f379a89 Add plugin infinitescroll 2014-10-30 16:19:19 +01:00
Samy Pessé 1d9509b3b6 Merge pull request #485 from citizenmatt/Nested_list_spacing
Fix bottom border on nested ul
2014-10-30 14:15:54 +01:00
Samy Pessé 3c8de4a8ab Add 'variables' to book.json doc 2014-10-29 17:20:30 +01:00
Samy Pessé 591d8fc9ee Use book.json to store variables 2014-10-29 17:19:19 +01:00
Samy Pessé d480e9cea4 Update highlight.js@8.3.0 2014-10-23 17:05:27 +02:00
Matt Ellis 32a71869da Fix bottom border on nested ul 2014-10-23 09:19:02 +01:00
Samy Pessé fdbfda64a6 Merge pull request #483 from dharmeshkakadia/patch-1
Corrected a small typo in Plugins description
2014-10-21 15:45:45 +02:00
Dharmesh Kakadia a6f48be39e Corrected a small typo in Plugins description 2014-10-21 00:47:37 +05:30
Aaron O'Mullan ce50b893e9 Merge pull request #482 from GitbookIO/feature/includes
Add include support, with variables and the whole shebang
2014-10-15 21:29:23 +02:00
Aaron O'Mullan 225ff27dd1 Fix small incompatibility mistake 2014-10-15 21:28:53 +02:00
Aaron O'Mullan 52e8361846 Add include support, with variables and the whole shebang
Fixes #462
2014-10-15 21:20:10 +02:00
Samy Pessé 49e3bbc3d6 Bump version to 1.1.1 2014-10-13 16:03:47 +02:00
Aaron O'Mullan c9ec911d0e Merge pull request #472 from GitbookIO/fix/quizzes
Fix/quizzes
2014-10-13 15:55:32 +02:00
Aaron O'Mullan 84d7662fd8 Allow quiz titles in validation 2014-10-13 15:55:59 +02:00
Aaron O'Mullan 676b2287ee Rewrite quiz logic to be more robust
Fixes #470
2014-10-13 15:50:12 +02:00
Samy Pessé 32a64be407 Fix #460: search for glossary term on all nodes 2014-10-13 15:23:51 +02:00
Samy Pessé 138cddf3d6 Ste GitBook as publisher 2014-10-13 15:23:00 +02:00
Aaron O'Mullan d730a3aac6 Split section classification to separate files
Maybe have a sections folder in the future and one per type
(quiz/exercise/normal) ?
2014-10-13 15:07:46 +02:00
Aaron O'Mullan ffb0b12012 Add unit test for quiz false positivies 2014-10-13 14:17:08 +02:00
Samy Pessé 78e25f8252 Add link to gitbook.gitignore 2014-10-13 11:10:28 +02:00
Samy Pessé 09f42f57e1 Improve comments 2014-10-13 11:01:00 +02:00
Samy Pessé 950ad1d060 Remove reference to single page output 2014-10-13 10:59:32 +02:00
Samy Pessé ed6b29c1a4 Adapt tests 2014-10-13 10:57:47 +02:00
Samy Pessé 36785120b1 Fix default for pdf templates 2014-10-13 10:56:14 +02:00
Samy Pessé 26fad5b888 Remove ref to github options 2014-10-13 10:53:51 +02:00
Samy Pessé f049576575 Merge branch 'alexandreaquiles-pdf_header_and_footer' 2014-10-13 10:48:33 +02:00
Samy Pessé a7ecbb87e4 Force type of header and footer templates 2014-10-13 10:48:02 +02:00
Samy Pessé 1da341741b Merge pull request #471 from GitbookIO/feature/multipages
Use multiple HTML files for ebook generation
2014-10-13 10:41:23 +02:00
Samy Pessé 2dd6192576 Remove old codes 2014-10-12 22:25:39 +02:00
Samy Pessé 52c9347b9c Improve style for exercises and quizzes in ebook 2014-10-12 22:07:37 +02:00
Samy Pessé e2295591ed Handle correctly quizzes 2014-10-12 11:42:32 +02:00
Samy Pessé 0c1cb724d7 Handle correctly exercises in ebook 2014-10-12 11:37:51 +02:00
Samy Pessé 7cee248426 Generate multiple page for ebook 2014-10-12 11:32:45 +02:00
Aaron O'Mullan 6ea5b2b539 Fix incorrect page breaks after h1 and h2 divs
Fixes #463, fixes #337, fixes #293
2014-10-08 20:08:22 +02:00
Alexandre Aquiles a56b559d43 Adding options to set header and footer in PDF generation 2014-10-06 13:17:34 -03:00
Samy Pessé df1a82e0e4 Add changelog for 1.1.0 2014-09-24 14:57:50 +02:00
Samy Pessé f15a1efe71 Bump version to 1.1.0 2014-09-24 14:56:09 +02:00
Samy Pessé b8379fc6fa Update kramed@0.4.3 2014-09-24 14:53:42 +02:00
Samy Pessé d69cc74647 Merge pull request #440 from GitbookIO/feature/ebookplugins
Apply plugins to ebook generation
2014-09-17 15:02:22 +02:00
Samy Pessé f83874a9ca Fix correct folder for assets 2014-09-17 14:16:04 +02:00
Samy Pessé 1968bb79c2 Use correct resources file for ebook 2014-09-17 13:17:30 +02:00
Samy Pessé 60c721db40 Enable css from plugins in page output 2014-09-17 13:10:36 +02:00
Samy Pessé 11b299653f Remove githubId
Enable hook for ebook
2014-09-17 13:08:30 +02:00
Samy Pessé c8c07fe8ce Add base to use plugins in page format 2014-09-17 13:00:28 +02:00
Samy Pessé be0a4f08e9 Merge pull request #435 from markcxz/master
fix radio input uncheck failed
2014-09-10 09:56:12 +02:00
markcxz 4da4e28d07 fix radio input uncheck failed 2014-09-10 10:27:27 +08:00
Samy Pessé 9dc19026c6 Add changelog for version 1.0.3 2014-09-05 17:15:04 +02:00
Samy Pessé 31ca9f7fcb Bump version to 1.0.3 2014-09-05 17:12:03 +02:00
Samy Pessé 6925d39e8d Fix GitbookIO/editor#136: update highlight.js@8.2.0 2014-09-05 17:10:47 +02:00
Samy Pessé a24cafd975 Update plugin-mathjax@0.0.6 2014-09-02 23:25:33 +02:00
Aaron O'Mullan e3fdf8b404 Bump version to 1.0.2 2014-08-20 17:03:31 -07:00
Aaron O'Mullan c861223378 Use gitbook-plugin-mathjax@0.0.5 2014-08-20 17:01:14 -07:00
Aaron O'Mullan f5c6d8df71 Bump version to 1.0.1 2014-08-20 16:30:04 -07:00
Aaron O'Mullan 452c846e90 Update framed to 0.4.2
This uses the new kramdown convention for inline math
2014-08-20 16:27:50 -07:00
Samy Pessé aedd875ab7 Fix url for sharing 2014-08-20 15:54:11 -07:00
Samy Pessé d2ec2f8f02 Add plugins exercises and quizzes by default 2014-08-20 10:33:34 -07:00
Samy Pessé 5af0df93c3 Normalize titles in readme 2014-08-19 16:39:54 -07:00
Samy Pessé 5b4b5e1af7 Bump version to 1.0.0 2014-08-19 16:18:29 -07:00
Samy Pessé 21704c4ac2 Add documentation for glossary format 2014-08-19 16:16:59 -07:00
Aaron O'Mullan 71aff10092 Merge pull request #413 from GitbookIO/feature/glossary
Glossary terms highlight in page
2014-08-19 16:09:47 -07:00
Samy Pessé 4b390667e5 Replace whole word with glossary term 2014-08-19 16:10:02 -07:00
Samy Pessé 14dda3148d Improve replace of words with glossary links 2014-08-19 16:05:57 -07:00
Samy Pessé 511dc9f805 Add action on glossary term in the page 2014-08-19 15:40:37 -07:00
Samy Pessé d0a14dcbcc Write correct glossary to disk 2014-08-19 10:36:27 -07:00
Samy Pessé ec8dc2cdb0 Improve design for glossary page 2014-08-18 22:00:34 -07:00
Samy Pessé 6f1ef585be Show index on glossary page 2014-08-18 21:53:07 -07:00
Samy Pessé d84acd0b82 Dump glossary index to glossary_index.json 2014-08-18 21:32:10 -07:00
Samy Pessé e1723ad3d5 Remove debug 2014-08-18 21:25:27 -07:00
Samy Pessé f77404afe1 Merge pull request #411 from GitbookIO/glossary-search
Glossary search
2014-08-18 19:14:14 -07:00
Aaron O'Mullan fbd7522748 Replace kramed-text-renderer references
with “kramed-text-renderer”
2014-08-18 18:36:38 -07:00
Aaron O'Mullan 90320fd26c Add glossary indexing 2014-08-18 17:25:26 -07:00
Aaron O'Mullan 4f9b474fdd Use kramed 0.4.1 2014-08-18 12:01:26 -07:00
Aaron O'Mullan 4c921bdc09 Use kramed-text-renderer (0.2.1) 2014-08-18 12:01:12 -07:00
Aaron O'Mullan 93e0864063 Fix dump typo in glossary's entryId func 2014-08-17 21:18:42 -07:00
Aaron O'Mullan 80e2f23714 Add "id" attribute to parsed glossary entries 2014-08-17 21:13:39 -07:00
Samy Pessé 00496dbd09 Add link to glossary if exists 2014-08-17 17:46:55 -07:00
Samy Pessé 54fb9a58d7 Add base less for glossary 2014-08-17 11:34:33 -07:00
Samy Pessé 6b0ad22b19 Base template for glossary 2014-08-17 11:26:20 -07:00
Samy Pessé 17f40540ae Parse glossary during build 2014-08-17 11:16:36 -07:00
Samy Pessé d337a500dc Merge pull request #408 from GitbookIO/feature-glossary
Feature glossary
2014-08-15 12:12:20 -07:00
Aaron O'Mullan cbe4e9edec Simplify output of glossary parsing to more simple objects 2014-08-15 12:09:36 -07:00
Samy Pessé 402e88f866 Add best practices for .gitignore 2014-08-15 11:55:01 -07:00
Aaron O'Mullan e0aed828e0 Add very basic glossary parsing test 2014-08-11 19:41:06 -07:00
Aaron O'Mullan 323facbdc8 Add glossary parser 2014-08-11 18:57:39 -07:00
Aaron O'Mullan 2a61c858e4 Add GLOSSARY.md fixture 2014-08-11 18:53:05 -07:00
Aaron O'Mullan d216661f27 Merge pull request #403 from GitbookIO/version/1.0.0
Version 1.0.0
2014-08-11 09:42:18 -07:00
Samy Pessé 50dfee99b6 Fix code coloration in book markdown 2014-08-11 09:37:25 -07:00
Samy Pessé 9e8ed9ac68 Use new markdown content css 2014-08-11 08:42:47 -07:00
Samy Pessé 3a54554713 Normalize markdown rendering with ebook (pdf, epub, mobi) 2014-08-11 08:38:11 -07:00
Samy Pessé fc113ce0c3 Fix style for table on night and sepia themes 2014-08-11 07:36:54 -07:00
Samy Pessé f605f0b6c8 Fix color or title for sepia and night 2014-08-11 07:36:54 -07:00
Samy Pessé 08788edfd3 Change list of plugins to a table 2014-08-11 07:36:54 -07:00
Samy Pessé 4a0e19935f Improve readme doc 2014-08-11 07:36:54 -07:00
Samy Pessé a3454bb7a8 Update preview 2014-08-11 07:36:53 -07:00
Samy Pessé 7245fa8ad7 Add icon for iOS 2014-08-11 07:36:53 -07:00
Samy Pessé d771ff341d Improve spacing between titles 2014-08-11 07:36:53 -07:00
Samy Pessé 8171241666 Remove quizzes handling from core 2014-08-11 07:36:53 -07:00
Samy Pessé 1125e89b49 Fix error with markdown rendering 2014-08-11 07:36:53 -07:00
Samy Pessé 67fd5a060b Add style for buttons 2014-08-11 07:36:52 -07:00
Samy Pessé 4f60eda3ee Add style for alerts
Remove style for exercises
2014-08-11 07:36:52 -07:00
Samy Pessé 6c62d75eae Remove exercises execution 2014-08-11 07:36:52 -07:00
Samy Pessé bcfcf3d979 Fix sharing to instapaper 2014-08-11 07:36:52 -07:00
Samy Pessé b4497029db Improve normalization of variables for dropdown 2014-08-11 07:36:52 -07:00
Samy Pessé 23ac4b846d Add sharing to instapaper 2014-08-11 07:36:51 -07:00
Samy Pessé 691d04e994 Improve dropdown to make it global
Add dropdown for sharing
2014-08-11 07:36:51 -07:00
Samy Pessé a54959ee4f Show title on hover of header 2014-08-11 07:36:51 -07:00
Samy Pessé 76ebca8c55 Fix url.js inclusion 2014-08-11 07:36:51 -07:00
Samy Pessé 786c4f147d Use fontawesome from bower 2014-08-11 07:36:51 -07:00
Samy Pessé 7028fc7118 Remove useless comments from less 2014-08-11 07:36:50 -07:00
Samy Pessé 1c3210e789 Fix display of input in search 2014-08-11 07:36:50 -07:00
Samy Pessé c28b804352 Remove bootstrap dependency 2014-08-11 07:36:50 -07:00
Samy Pessé 6d841c909b Remove appCache handling from client js 2014-08-11 07:36:50 -07:00
Samy Pessé e917fd28e0 Change term "Generated" to "Published" 2014-08-11 07:36:49 -07:00
Samy Pessé ab88459a56 Change default font 2014-08-11 07:36:49 -07:00
Samy Pessé fe95c361be Fix options parsing 2014-08-11 07:36:49 -07:00
Samy Pessé 7e78546516 Change links system for sidebar 2014-08-11 07:36:49 -07:00
Samy Pessé d07b9450b1 Fix defaults for configuration 2014-08-11 07:36:49 -07:00
Samy Pessé c30b431b7b Remove link home in header 2014-08-11 07:36:48 -07:00
Samy Pessé 0fe54fbd57 Fix navigation color for sepia and night 2014-08-11 07:36:48 -07:00
Samy Pessé 1bec19029f Fix navigation on mobile 2014-08-11 07:36:48 -07:00
Samy Pessé 21ccf7757e Improve padding on page content 2014-08-11 07:36:48 -07:00
Samy Pessé ceb766a124 Adapt to latest github markdown style 2014-08-11 07:36:48 -07:00
Samy Pessé 046b789fa8 Fix navigation links position 2014-08-11 07:36:47 -07:00
Samy Pessé cd50a1402f Fix border on search input (sepia and night) 2014-08-11 07:36:47 -07:00
Samy Pessé 1b0ae5a827 Fix border on dropdown selector 2014-08-11 07:36:47 -07:00
Samy Pessé 01b6ca76e8 Limit transitions to positions 2014-08-11 07:36:47 -07:00
Samy Pessé 06b9c345c9 Improve design of search bar 2014-08-11 07:36:47 -07:00
Samy Pessé 152276c1d7 Improve display of sidebar on mobile 2014-08-11 07:36:46 -07:00
Samy Pessé 275eedf076 Change button color on header 2014-08-11 07:36:46 -07:00
Samy Pessé 5e959d65a2 Start new design for website 2014-08-11 07:36:46 -07:00
Samy Pessé 66c1b89da2 Use only default config 2014-08-11 07:36:46 -07:00
Samy Pessé 78c68c7b9e Remove config for github urls 2014-08-11 07:36:46 -07:00
Samy Pessé d914eae40a Remove html5 cache manifest 2014-08-11 07:36:45 -07:00
Samy Pessé 74f95f4d0d Merge pull request #404 from Viv-Rajkumar/master
Fix path operator in Windows for index.html with multi lang
2014-08-11 07:31:10 -07:00
Viv-Rajkumar d803052461 Fix Langs path operator for Windows using 'links.js' 2014-08-11 12:09:07 +01:00
Aaron O'Mullan 633e52c4be Bump version to 0.7.1 2014-08-08 15:37:03 -07:00
Aaron O'Mullan 1512bcf808 Update fs-extra to 0.10.0
Fixes potential race condition on copies
2014-08-08 15:31:49 -07:00
Samy Pessé 4e46d088ca Add build for search results 2014-08-05 09:47:08 -07:00
Samy Pessé 388c7ffd32 Merge pull request #396 from codepiano/hold-search-keyword
keep the search result list after user click a link
2014-08-05 09:44:54 -07:00
codepiano 7ba8653935 keep the search result list after user click a link
Record search keyword to LocalStorage, when navigate to a new url,fetch
keyword from LocalStorage, init the search input element,then filter the
sidebar menu.
So User can iterator the result list without type the keyword every
time.
2014-08-05 15:14:10 +08:00
Samy Pessé a4403aad1e Add changes for 0.7.0 2014-08-01 14:01:20 -07:00
Samy Pessé b629b78dba Bump version to 0.7.0 2014-08-01 13:58:36 -07:00
Samy Pessé f62c218735 Fix #278: Add page break between chapters/articles 2014-08-01 13:55:19 -07:00
Aaron O'Mullan 725510028f Use marked-text-renderer@0.1.0 2014-08-01 00:09:45 -07:00
Aaron O'Mullan ad7927242d Add comments to default introduction chapter code
Fixes #388
2014-07-31 08:43:57 -07:00
Aaron O'Mullan 5692bdd229 Merge pull request #386 from codepiano/china-social-network-sharing
add sharing to weibo.com.
2014-07-31 01:41:56 -07:00
codepiano 3402746719 add sharing to weibo.com.
google、facebook and twitter are block by GFW in China,Chinese can
not visit these websites.
add 'weibo' config in option links.sharing,the share link will not be
used by default,users should set the value of 'weibo' to true to turn
on sharing to weibo.com.
2014-07-31 16:31:31 +08:00
Aaron O'Mullan 30a8414b06 Switch to graceful-fs, fix #373 2014-07-30 20:45:33 -07:00
Aaron O'Mullan 9d46899ea7 Replace "marked" with "kramed" 2014-07-30 16:17:47 -07:00
Samy Pessé 58f14fd9ca Fix font settings apply 2014-07-30 11:17:28 -07:00
Samy Pessé b6af14b13e Remove github count stars and watchers 2014-07-30 10:43:10 -07:00
Aaron O'Mullan ba2134c480 Bump version to 0.6.3 2014-07-30 10:23:11 -07:00
Aaron O'Mullan 4705548860 Fix resource normalization in when loading plugins
Fixes #384
2014-07-30 10:17:07 -07:00
Samy Pessé 7d51ae3689 Add changelogs for 0.6.2 2014-07-30 00:26:44 -07:00
Aaron O'Mullan b9360de3e3 Bump version to 0.6.2 2014-07-30 00:22:49 -07:00
Aaron O'Mullan 9f241457bb Fix minor issues with new plugin additions 2014-07-29 23:45:54 -07:00
Aaron O'Mullan 60a7c28e66 Support generating a plugin's book info dynamically 2014-07-29 21:50:26 -07:00
Samy Pessé 5dff9b795e Fix #345: Improve navigation on dark theme 2014-07-29 21:33:47 -07:00
Aaron O'Mullan 0134677e0e Improve path normalization when parsing SUMMARY.md 2014-07-29 20:49:11 -07:00
Aaron O'Mullan 39ef4fa199 Add invalid paths in SUMMARY.md fixture
To test for correct path normalization
2014-07-29 20:46:14 -07:00
Samy Pessé b507a30301 Bump version to 0.6.1 2014-07-23 16:49:57 -07:00
Samy Pessé 539c2d0c57 Update plugin-mathjax@0.0.4 2014-07-23 16:28:38 -07:00
Samy Pessé aa6f3530f9 Fix readme spacing 2014-07-22 23:28:13 -07:00
Samy Pessé 98057af219 Merge pull request #372 from justanotheranonymoususer/patch-1
Update summary.html (fixed an HTML typo)
2014-07-20 14:04:12 -07:00
justanotheranonymoususer bb48c8233c Update summary.html 2014-07-20 23:57:56 +03:00
Aaron O'Mullan 8f14db64df Merge pull request #370 from nightwing/patch-1
Add keyboard shortcut for submitting exercise
2014-07-15 21:33:58 -07:00
Harutyun Amirjanyan 37d40dc66c Add keyboard shortcut for submitting exercise 2014-07-16 08:07:22 +04:00
Samy Pessé 6c96680cca Merge pull request #366 from shaform/ignore
Ignore config files by default in fs.list
2014-07-14 10:08:29 -07:00
Shaform 4e475857d5 Ignore config files by default in fs.list 2014-07-13 08:40:23 -07:00
Samy Pessé f8ff0453dd Merge pull request #359 from jcouyang/patch-1
add jsbin embedded plugin
2014-07-12 07:02:18 -07:00
Samy Pessé 3cc5c47535 Bump version to 0.6.0 2014-07-12 23:28:07 +02:00
Samy Pessé a2046814b4 Change command "git:push" to "publish" 2014-07-12 23:25:40 +02:00
Samy Pessé 82f814fdbd Fix #303: generate header id the same as github 2014-07-12 23:23:03 +02:00
Jichao Ouyang cd382dc8fc add jsbin embedded support 2014-07-12 21:42:52 +08:00
Samy Pessé 3842e5bf4a Merge pull request #358 from GitbookIO/featureplatform
Add base command git:push and git:remote
2014-07-11 17:42:16 -07:00
Samy Pessé f05b138fd6 Add base command git:push and git:remote 2014-07-12 09:23:15 +02:00
Samy Pessé 1b87cec893 Merge pull request #266 from shaform/ref_links
Add reference links support
2014-07-11 17:20:43 -07:00
Samy Pessé 4a894b1e18 Merge pull request #268 from rlmv/master
Fix page.path for plugins
2014-07-11 17:19:26 -07:00
Samy Pessé c7c98009e7 Merge pull request #347 from rlmv/custom_links
Add custom links to TOC
2014-07-11 17:15:37 -07:00
Samy Pessé 356322e0ed Merge pull request #353 from citizenmatt/active_page
Highlight active page in summary
2014-07-11 17:14:36 -07:00
Samy Pessé 7a47049367 Merge pull request #354 from citizenmatt/summary_hooks
Plugin hooks for summary data
2014-07-11 17:13:40 -07:00
Samy Pessé a9f473260c Merge pull request #356 from GitbookIO/feature/includes
Support importing code snippets
2014-07-10 17:59:34 -07:00
Aaron O'Mullan d16577e8bf Add tests for includes 2014-07-10 17:49:50 +02:00
Aaron O'Mullan 15b4053d6b Support code includes for exercises 2014-07-10 17:30:12 +02:00
Aaron O'Mullan 925a9b1388 Support importing code snippets
Allowing to keep code in separate files, which can be cleaner in a
quite a few scenarios
2014-07-11 01:22:07 +02:00
Matt Ellis fc942fdeca Hooks for summary data 2014-07-09 17:17:40 +01:00
Matt Ellis 75a6ecbf52 Highlight active page in summary 2014-07-09 16:06:55 +01:00
Aaron O'Mullan 520045441b Merge pull request #352 from citizenmatt/links_with_fragments
Convert links with fragments from md to html
2014-07-08 21:45:01 +02:00
Matt Ellis 00c3e966d3 Convert links with fragments from md to html 2014-07-08 16:25:39 +01:00
Samy Pessé 8b6ebe86b8 Merge pull request #348 from rlmv/anchors_readme
Add anchor plugin to README
2014-07-06 17:12:57 +02:00
Bo Marchman d5bd3453e1 add heading anchors plugin to readme 2014-07-02 23:49:07 -04:00
Bo Marchman ddacbbe73b update readme with custom links 2014-07-02 23:40:57 -04:00
Bo Marchman f7d52f0eff Add custom link capability
Users can add custom links at the top of the table of contents by
adding a links.custom object to book.json. Issue #304
2014-07-02 23:38:14 -04:00
Robert Marchman 39c50640ea pass 'rawPath' page path to plugins 2014-06-24 12:33:19 -04:00
Samy Pessé 16128c7e60 Bump version to 0.5.6 2014-06-24 12:35:13 +02:00
Samy Pessé 8b6a80cffb Fix error when chapters list is empty
Fix GitbookIO/gitbook.io#101 and GitbookIO/gitbook.io#102
2014-06-24 12:34:29 +02:00
Aaron O'Mullan 86f8a9d8fb Remove useless (and bad) sort on progress
Fixes bad ordering of chapters on gitbook.io
2014-06-20 03:40:47 -07:00
Aaron O'Mullan 790dfd601e Add csharp language highlight mapping
Fixes #327
2014-06-18 11:26:50 -07:00
Aaron O'Mullan 3426428142 Bump version to 0.5.5 2014-06-18 00:25:23 -07:00
Aaron O'Mullan 6c5c8e6eb7 Fix LANGS.md parsing
And cleanup Summary parsing
2014-06-17 16:18:08 -07:00
Aaron O'Mullan 3aefcaea73 Bump version to 0.5.4 2014-06-17 10:56:45 -07:00
Aaron O'Mullan 04c025774d Improve robustness of link utility functions
Fixes #321, fixes #323
2014-06-17 10:56:13 -07:00
Aaron O'Mullan 80aac7f581 Support --verbose flag, fixes #325 2014-06-17 10:46:56 -07:00
Samy Pessé 266f7ca73d Add infos about debugging 2014-06-17 18:45:44 +02:00
Shaform 6bbefad24e Merge remote-tracking branch 'upstream/master' into ref_links 2014-06-17 22:08:46 +08:00
Aaron O'Mullan d6eb8e4c60 Support URLs in "github" config
Fixes GitbookIO/gitbook.io#90
2014-06-16 18:52:36 -07:00
Aaron O'Mullan c87edb155a Better string slicing in parse.git.githubID() 2014-06-16 17:48:18 -07:00
Samy Pessé ef0468ad5d Fix #310: improve display of long title in header 2014-06-16 14:03:28 +02:00
Samy Pessé f03153eb0c Remove page break between articles in ebook
Add title for exercise solutions sections
2014-06-16 13:55:07 +02:00
Samy Pessé 3d8b6e550a Merge pull request #319 from GitbookIO/enchancement/custom_intro
Enchancement/custom intro
2014-06-16 13:02:38 +02:00
Aaron O'Mullan 4c3dbca5ca Normalize intro node in Summary parsing 2014-06-16 00:26:11 -07:00
Aaron O'Mullan a258feea37 Remove special case in navigation
For intro node
2014-06-16 00:25:59 -07:00
Aaron O'Mullan 3a3332d0b9 Adapt summary tests to new summary parsing
We now insert default README.md (introduction) node in parsing the
SUMMARY.md logic
2014-06-16 00:25:33 -07:00
Aaron O'Mullan 4259283f32 Refactor Summary rendering
Introduction is no longer an edge case
2014-06-16 00:09:48 -07:00
Aaron O'Mullan 243d977cd6 Add test for level regarding #318 2014-06-15 23:36:40 -07:00
Aaron O'Mullan 94bbbecedf Support custom intro node, fixes #318 2014-06-15 23:30:43 -07:00
Aaron O'Mullan f49eab42a9 Fix test for #318 2014-06-15 23:29:24 -07:00
Aaron O'Mullan ce6b2bc47d Add extra navigation tests for #318 2014-06-15 23:19:28 -07:00
Aaron O'Mullan 3245d7e430 Drop Travis tests for Node 0.8 2014-06-15 22:49:15 -07:00
Aaron O'Mullan 6ee17c32ae Bump version to 0.5.3 2014-06-15 22:39:18 -07:00
Aaron O'Mullan bf7ffe6d4c Skip extra files and folders in copy phase of generation 2014-06-15 22:37:15 -07:00
Aaron O'Mullan ec7bc6b347 Add link to gitbook.io in readme 2014-06-15 22:36:51 -07:00
Aaron O'Mullan b425db0979 Allow external links in summary, fixes #300 2014-06-08 12:31:52 -07:00
Samy Pessé 30c6d1c9de Remove useless log 2014-06-08 02:21:05 +02:00
Samy Pessé cee1d90fc6 Bump version to 0.5.2 2014-06-08 01:09:51 +02:00
Samy Pessé 522342667c Fix font size for mono font on pdf output 2014-06-08 00:27:18 +02:00
Samy Pessé d1c1277bb9 Fix cover picture for multilangs book convertion to ebook 2014-06-08 00:11:50 +02:00
Aaron O'Mullan 9a66f56c79 Bump version to 0.5.1 2014-06-07 11:42:37 -07:00
Samy Pessé 087ca28ca2 Fix style for main languages index page 2014-06-07 16:30:11 +02:00
Samy Pessé 3d5281ff3a Fix GitbookIO/gitbook.io#69: copy cover files at multi-langs root 2014-06-07 16:27:40 +02:00
Samy Pessé f62cf340c5 Fix title and description for pages in website 2014-06-07 16:04:03 +02:00
Samy Pessé 7e12bd3588 Don't use cdn for ace 2014-06-07 16:02:02 +02:00
Samy Pessé 4dbdb95ebe Show quiz inside ebook 2014-06-06 22:20:02 +02:00
Samy Pessé 2c5ddbcd8f Use base style for ebook instead of bootstrap 2014-06-06 21:47:59 +02:00
Samy Pessé be4fd74f90 Improve navigation links design 2014-06-06 20:06:03 +02:00
Samy Pessé 57491e3a8b Improve meta tags for books 2014-06-06 20:00:38 +02:00
Samy Pessé f7a442d297 Improve font sizes and spacing on content 2014-06-06 19:33:41 +02:00
Samy Pessé cfebdc6f6b Fix #296: fix static links on windows 2014-06-06 18:37:35 +02:00
Samy Pessé 65319e8fd6 Bump version to 0.5.0 2014-06-03 22:30:42 +02:00
Samy Pessé 55db44a3b4 Fix #289: center images on ebook 2014-06-03 22:20:51 +02:00
Samy Pessé 13b6045300 Font Merriweather 600 doesn't exists 2014-06-03 20:45:55 +02:00
Samy Pessé b7ff879c31 Remove fonts Anonymous Pro and EB Garamond 2014-06-03 20:43:47 +02:00
Samy Pessé 57ade87fe1 Fix #275: fix emphasized font path 2014-06-03 20:30:04 +02:00
Samy Pessé 907e9ea5a7 Improve font on title
Set sans-serif as default
2014-06-03 20:14:44 +02:00
Samy Pessé 215488dc45 Improve design (more flat) 2014-06-03 18:43:13 +02:00
Samy Pessé a195b3eac2 Improve less files organisation 2014-06-03 18:11:03 +02:00
Samy Pessé 77c6f0e967 Merge pull request #291 from bebraw/book.js
Allow book.js to be used in addition to book.json
2014-06-03 17:20:26 +02:00
Juho Vepsalainen f0e18afec1 In case there's no config file, do not fail 2014-06-03 17:59:26 +03:00
Juho Vepsalainen b6d11d88b7 Allow book.js to be used in addition to book.json
Now it's possible to comment configuration properly and do some dynamic
things if needed.

Closes #287.
2014-06-03 17:42:30 +03:00
Samy Pessé c803270af8 Add option pdf.pageNumber
Fix GitbookIO/editor#38
2014-06-03 16:24:35 +02:00
Samy Pessé 5d51263a58 Remove mixpanel as a default addon 2014-06-03 15:29:15 +02:00
Samy Pessé 7e30720b2c Merge pull request #292 from bebraw/typofix
Fix build success message typo
2014-06-03 15:07:29 +02:00
Juho Vepsalainen 771c5e8b68 Fix build success message typo 2014-06-03 15:58:22 +03:00
Samy Pessé 8f53afab6b Fix #286: fix doc about formats 2014-06-02 20:12:56 +02:00
Samy Pessé 0ad0403d41 Merge pull request #283 from GitbookIO/feature/pdfoptions
Add more options for PDF
2014-06-02 18:22:07 +02:00
Samy Pessé 2515c1dd73 Remove useless command "gitbook ebook" 2014-06-02 18:17:02 +02:00
Samy Pessé 7dfcd102dd Fix calcul of output format for ebook 2014-06-02 18:16:44 +02:00
Samy Pessé a91245d575 Add options paperSize and margin for pdf 2014-06-02 17:57:47 +02:00
Samy Pessé 5f207f5e14 Add options pdf.toc and pdf.fontSize 2014-06-02 17:49:05 +02:00
Samy Pessé 718692de3b Langs index page now use direct link to html file 2014-06-02 14:49:40 +02:00
Samy Pessé 9856a51255 Fix #282: stop generation of langs index for page format 2014-06-02 14:13:52 +02:00
Samy Pessé 58eaaf5514 Fix error when plugin don't extend book 2014-06-02 12:51:22 +02:00
Samy Pessé c0ae0138f8 Improve documentation about book.json 2014-06-02 11:41:16 +02:00
Samy Pessé b1b9dc5b0a Fix error during generation 2014-06-02 11:37:25 +02:00
Samy Pessé f85c5a6498 Add error message when generator is invalid
Fixes #276, #277
2014-06-02 11:32:09 +02:00
Aaron O'Mullan 32eafefc45 Bump version to 0.4.8 2014-05-29 16:36:56 -07:00
Aaron O'Mullan 336999a34e Set default pdf font size to 12 2014-05-29 15:57:56 -07:00
Samy Pessé 1bf5f3b984 Force paper format to A4 fro pdf 2014-05-30 00:33:35 +02:00
Samy Pessé c76d070237 Merge pull request #274 from emmanuel-keller/patch-1
Adding a new plugin (Piwik Open Analytics plugin)
2014-05-30 00:11:38 +02:00
Emmanuel Keller 8c7da1351f Adding a new plugin.
I Just published a first version of the Piwik Open Analytics plugin, on both GIT and NPM.
2014-05-29 23:31:38 +02:00
Samy Pessé 34588c6092 Add margin on pdf output 2014-05-29 18:53:08 +02:00
Samy Pessé 9f00bf8060 Add toc at the end of pdf 2014-05-29 18:33:05 +02:00
Samy Pessé f4a17b182f Improve ebook generation (toc, ...) 2014-05-29 18:28:09 +02:00
Samy Pessé 5c3b345fa6 Generate valid first level table of content for ebook 2014-05-29 17:28:18 +02:00
Samy Pessé 46321fffd9 Use ebook-convert for pdf generation 2014-05-29 17:07:03 +02:00
Shaform 1f4cf33dd0 Improve code syntax for links assignment 2014-05-28 06:57:50 +08:00
Shaform 7274aa6940 fix links error 2014-05-27 22:24:23 +08:00
Shaform 125e804cd5 Add reference links support
This commit resolves #184
2014-05-27 17:24:47 +08:00
Aaron O'Mullan 89ba17de84 Bump version to 0.4.7 2014-05-26 12:14:32 -07:00
Aaron O'Mullan 115fba837c Merge pull request #265 from GitbookIO/feature/levels
More than two section level in summary
2014-05-26 11:27:27 -07:00
Samy Pessé 4df51546b2 Remove command log in ebook convert 2014-05-26 18:02:32 +02:00
Samy Pessé f68aaf7ff9 Fix cover option for ebook 2014-05-26 18:02:09 +02:00
Samy Pessé e3d1746ba3 Fix use of cover.jpg in ebook 2014-05-26 17:58:08 +02:00
Samy Pessé a0d5646034 Adapt navigation parsing to third and more levels in summary 2014-05-26 17:42:05 +02:00
Samy Pessé 2f8af5f136 Improve design of summary for deep articles 2014-05-26 17:33:10 +02:00
Samy Pessé 8b7abbd6f4 Render articles of level > 2 in summary 2014-05-26 17:31:35 +02:00
Samy Pessé f228f646eb Remove useless method parseArticle 2014-05-26 17:23:19 +02:00
Samy Pessé 45891d80c7 Parse more than two level in summary 2014-05-26 17:21:23 +02:00
Samy Pessé ac900aa37f Merge pull request #263 from jpoesen/patch-1
Minor typo, grammar and style corrections.
2014-05-26 10:44:25 +02:00
Joeri Poesen 422cbed796 Minor typo, grammar and style corrections. 2014-05-26 08:13:35 +02:00
Samy Pessé 38cbbe46aa Fix cache manifest generation 2014-05-25 20:47:57 +02:00
Aaron O'Mullan c1b57a387b Bump version to 0.4.6 2014-05-23 16:35:44 -07:00
Samy Pessé aaa9ae8bb7 Fix loading button display on navigation 2014-05-24 01:32:39 +02:00
Samy Pessé 6340a64cff Fix #235: search after navigation to another page 2014-05-23 22:28:36 +02:00
Samy Pessé 96bcfa4e20 Fix #218: keep state of font settings 2014-05-23 22:20:36 +02:00
Samy Pessé af0f56b26b Change position of menu action in header 2014-05-23 21:49:11 +02:00
Samy Pessé aed5befa48 Fix display of divider in lateral menu 2014-05-23 21:48:04 +02:00
Samy Pessé 8e37da672d Minor css improvements 2014-05-23 21:43:47 +02:00
Samy Pessé c0f68c45e2 Fix #249: fix links.toAbsolute on windows 2014-05-23 21:10:58 +02:00
Samy Pessé 47fdd73791 Fix cache manifest in the html tag
Serve command disable cache
2014-05-23 17:45:46 +02:00
Samy Pessé 7c0b88cf2e Plugins can extend html 2014-05-23 17:00:37 +02:00
Samy Pessé bf21633b6c Support multi-languages book in json format 2014-05-23 16:35:34 +02:00
Samy Pessé ad9b1fd6f7 Fix order of progress for level superior to x.9
Related to GitbookIO/gitbook.io#23
2014-05-21 23:31:57 +02:00
Samy Pessé d245895085 Add link to documentation 2014-05-21 20:22:28 +02:00
Samy Pessé c7439d12f7 Add livereload as default plugins only for serve 2014-05-21 17:34:36 +02:00
Samy Pessé 8d6923ce2c Merge pull request #234 from davidagraf/livereload
Livereload
2014-05-21 17:17:08 +02:00
David Graf b21fb24a82 gitbook-plugin-livereload dependency to npm 2014-05-21 16:35:55 +02:00
David Graf e7be132194 Merge branch 'master' into livereload 2014-05-21 16:24:07 +02:00
Samy Pessé 0e1717f4bb Improve grammar (thanks to @theoutlander ) 2014-05-21 10:46:26 +02:00
Aaron O'Mullan 276dbe29c7 Bump version to 0.4.5 2014-05-20 23:29:39 -07:00
Aaron O'Mullan 21fd5924b8 Fix generate failing on README parsing
Failed if no title or description could be extracted
2014-05-20 23:29:06 -07:00
Aaron O'Mullan 443def6cfd Bump version to 0.4.4 2014-05-20 22:59:26 -07:00
Samy Pessé 75464574d7 For multi-langs, run build one by one 2014-05-21 00:09:40 +02:00
Samy Pessé 86f05c68c5 Improve parsing of readme (extraction of title and description as plain text and not markdown) 2014-05-20 23:45:35 +02:00
Samy Pessé 8dd407eaa8 Fix merge of output for multi-languages books 2014-05-20 23:31:22 +02:00
Samy Pessé ea7ad10e8a Add support for multi-languages books in JSON format 2014-05-20 23:21:12 +02:00
Samy Pessé 62ec695dc8 Extract title and description from readme before switching to multi-languages handling 2014-05-20 23:07:41 +02:00
Samy Pessé ca37ac73a9 Add more infos about gitbook.io 2014-05-20 14:40:22 +02:00
Samy Pessé 96edd50c8f Add norm for small cover 2014-05-20 01:23:49 +02:00
Samy Pessé 3993c1e35a Change advised ratio for cover 2014-05-19 21:47:41 +02:00
Aaron O'Mullan 5298558925 Bump version to 0.4.3 2014-05-18 02:25:53 -07:00
Samy Pessé c6ba147917 Print stack only when env DEBUG is set 2014-05-17 20:35:41 +02:00
Samy Pessé 7efecea3d6 Exit process with -1 when error occurs 2014-05-17 20:35:13 +02:00
Aaron O'Mullan a73fed3ebd Merge pull request #240 from ajschumacher/patch-1
typo: "blockin" to "block in"
2014-05-16 09:06:15 -07:00
Aaron Schumacher 50ef7bcd23 typo: "blockin" to "block in" 2014-05-16 12:02:06 -04:00
Aaron O'Mullan 82e422cb89 Fix issue of disabling issues and contribute
Improve robustness of template display conditions
2014-05-15 21:35:09 -07:00
Aaron O'Mullan dab46c779d Allow github support to be disabled in book.json
Fixes #238
2014-05-15 21:24:28 -07:00
David Graf 7c65adc9b2 disable cache manifest import if cache is disabled 2014-05-15 12:07:51 +02:00
David Graf 9b96ef9bae added livereload dependency 2014-05-15 11:41:59 +02:00
David Graf e97d1941dc Introducing livereload server 2014-05-15 08:09:02 +02:00
David Graf 0b0ac46e34 Introducing option to disable cache manifest generation 2014-05-15 08:07:24 +02:00
David Graf 622bbcb8ea ignore vim swap files 2014-05-15 07:43:59 +02:00
Samy Pessé 58a5245d21 Merge pull request #233 from embreinhardt/master
Add LESS variable for sidebar full-width breakpoint
2014-05-14 20:10:02 +02:00
Erika Reinhardt 612f9a6dc7 Add LESS variable for sidebar full-width breakpoint 2014-05-14 11:01:57 -07:00
Samy Pessé 90d4dff263 Merge pull request #232 from embreinhardt/master
Make font-settings.html indentation consistent
2014-05-14 10:35:32 +02:00
Erika Reinhardt 0f38385c7d Make font-settings.html indentation consistent
[Minor] Was mix of tabs and spaces, which messed with text edit display
2014-05-14 01:25:18 -07:00
Samy Pessé 2b50616251 Merge pull request #231 from embreinhardt/master
Add HTML classes to make plugins easier to write
2014-05-14 10:20:42 +02:00
Erika Reinhardt 5b7f37f0d4 Add HTML classes to make plugins easier to write 2014-05-14 01:14:21 -07:00
Aaron O'Mullan 6ca8e26741 Merge pull request #229 from weitzman/patch-1
Fix recent typo in README.MD
2014-05-12 14:04:52 -07:00
Moshe Weitzman a3ada05598 Fix recent typo in README.MD 2014-05-12 16:18:50 -04:00
Samy Pessé 42eb11aaff Add infos about cover 2014-05-11 16:47:30 +02:00
Samy Pessé b581859afd Merge pull request #223 from cef62/fix-windows-paths
Force forward slashes on SUMMARY.md path for articles
2014-05-08 22:54:40 +02:00
Matteo Ronchi 2e22fae52a Force forward slashes on SUMMARY.md paths
this prevent windows user to generate invalid path on unix OS
Reference to issue #39 on gitbook-editor
2014-05-08 22:46:53 +02:00
Aaron O'Mullan 603ac8b91d Merge pull request #221 from frodsan/patch-1
Don't show divider even if githubId is present.
2014-05-08 09:58:06 -07:00
Francesco Rodríguez 5faa4841ca Don't show divider even if githubId is present. 2014-05-08 13:40:15 -03:00
Samy Pessé 7416b826e0 Fix #218: Add settings for client theme (font family, size, theme) 2014-05-08 13:16:30 +02:00
Aaron O'Mullan 82afc34755 Merge pull request #219 from BjoernSchotte/feature/doc-theme
added documentation for theme option
2014-05-07 23:08:53 -07:00
Björn Schotte da39631a5a added documentation for theme option 2014-05-08 07:57:33 +02:00
Aaron O'Mullan fc8685a7c1 Merge pull request #216 from ianmcburnie/accessibility
Accessibility: added aria-labels to header
2014-05-06 12:34:43 -07:00
Ian McBurnie 5e0204a980 Accessibility: added aria-labels to header
Feel free to change any of the label text that I have chosen :-)
2014-05-06 11:27:54 -07:00
Samy Pessé 6bb0f33f39 Fix #211: read config file before cleaning output folder 2014-05-06 12:08:27 +02:00
Aaron O'Mullan ed4fd565b2 Merge pull request #213 from ianmcburnie/accessibility
Accessibility: aria-label added to navigation links
2014-05-05 22:37:21 -07:00
Ian McBurnie 79cff28abd Accessibility: aria-label added to navigation links
Current behavior: Screenreader just reads ‘link’ when landing on the
previous and next navigation links, giving the user no indication of
what the link does or where it goes. New Behaviour: Screenreader reads
“Previous page: {page title}” and “Next page: {page title}”
respectively.
2014-05-05 22:29:22 -07:00
Samy Pessé 27329239f7 Fix #208: correct name for edit/contribute link in doc 2014-05-05 17:55:19 +02:00
Samy Pessé 9de86fc0e4 Add tests for book generation 2014-05-05 15:25:15 +02:00
Samy Pessé 7fa7826372 Merge pull request #203 from GitbookIO/improve/generate
Improve generate's reliability, fixes #202
2014-05-04 22:37:42 +02:00
Aaron O'Mullan 96ecfd098b Improve generate's reliability, fixes #202
This also improves speed on multi language books
2014-05-04 12:53:24 -07:00
Samy Pessé f7fe976c7e Fix #197: use URI.js for calculation of relative url
Use bower for client dependencies
2014-05-04 15:15:18 +02:00
Samy Pessé 756629b91d Add bower dependencies 2014-05-04 15:03:47 +02:00
Samy Pessé e640d124d4 Add bower vendors to gitignore 2014-05-04 14:58:45 +02:00
Samy Pessé 7f41466297 Remove vendors directory 2014-05-04 14:58:01 +02:00
Samy Pessé 57dfc062d2 Create CHANGES.md 2014-05-04 13:09:27 +02:00
Aaron O'Mullan 799815d85a Bump version to 0.4.2 2014-05-01 16:17:05 -07:00
Samy Pessé 2946246834 Fix #191: remove log for changes in files 2014-05-01 18:55:45 +02:00
Samy Pessé 6d276d1e79 Add option to remove home link 2014-05-01 18:53:49 +02:00
Samy Pessé 6a3a369b3e Add options to remove sharing links 2014-05-01 18:37:30 +02:00
Samy Pessé 5d8afa2135 Merge pull request #196 from mrpotes/new-plugins
New plugins
2014-05-01 18:33:30 +02:00
Samy Pessé ab3e6aa8ce Fix font-size for titles in markdown content 2014-05-01 18:29:42 +02:00
James Phillpotts 822092736e New plugins 2014-05-01 17:00:38 +01:00
Samy Pessé 7497acd2e3 Center navigation button on mobile on start page 2014-05-01 17:37:38 +02:00
Samy Pessé ae137885b8 Fix book content padding on mobile 2014-05-01 17:27:03 +02:00
Samy Pessé b964cc7009 Fix #162: hide watch/star buttons on mobile 2014-05-01 17:16:09 +02:00
Samy Pessé c2ea126c5f Fix #182: Replace all book body when page changes 2014-05-01 14:05:14 +02:00
Samy Pessé b668dba479 Update gaze version to 0.5.1 2014-05-01 13:26:50 +02:00
Samy Pessé 2cae5a0310 Secure .book position 2014-05-01 13:26:19 +02:00
Samy Pessé b6a0f3ff67 Fix #164: use position absolute instead of fixed 2014-04-30 17:01:25 +02:00
Samy Pessé fa00b52fb5 Fix #127: add configuration for changing links in sidebar 2014-04-30 16:46:24 +02:00
Samy Pessé 2999d90907 Merge pull request #188 from snipe/feature/json-doc
Added quotes for JSON example, per #127
2014-04-30 12:48:28 +02:00
snipe b6696bcad2 Added quotes for JSON example, per #127 2014-04-30 06:46:28 -04:00
Samy Pessé 728c87c525 Merge pull request #187 from snipe/feature/typo-fixes
Fixed typos
2014-04-30 12:05:12 +02:00
snipe ace394ee2d Fixed typos 2014-04-30 05:28:18 -04:00
Samy Pessé 076ee98f64 Fix #186: Plugins that don't have assets should be skipped 2014-04-30 11:15:01 +02:00
Samy Pessé 2e472654ca Fix error when calling hooks in site generation 2014-04-30 10:54:45 +02:00
Aaron O'Mullan d46bd14678 0.4.1 2014-04-29 10:23:54 -07:00
Samy Pessé b3e5b3d106 Fix #183: normalize hooks and transformation of page (content, progress, ..° 2014-04-29 17:45:54 +02:00
Samy Pessé b830ef5dca Merge pull request #179 from erixtekila/master
Update README.md
2014-04-29 08:23:33 +02:00
Eric Priou 45326c4ad2 Update README.md 2014-04-29 03:45:03 +02:00
Aaron O'Mullan 603b61e8c8 Bump version to 0.4.0 2014-04-28 13:26:40 -07:00
Samy Pessé efb066c8e3 Update doc about how to configure gitbook 2014-04-28 20:45:10 +02:00
Samy Pessé c30db427b1 Remove some options from command line (moved to book.json) 2014-04-28 20:33:25 +02:00
Samy Pessé 23056fc85d Use a global configuration file for a book (default to book.json) 2014-04-28 20:29:36 +02:00
Samy Pessé 5f1bfc0280 Fix #163: Move logic of git infos extraction to lib 2014-04-28 20:16:30 +02:00
Samy Pessé b715901f92 Add hooks "page:before" and "page:after" 2014-04-28 19:56:40 +02:00
Samy Pessé 38fea06cf9 Use hook to allow plugins to edit page content during generation (Fixes #176) 2014-04-28 17:21:06 +02:00
Aaron O'Mullan 4481b5f556 Bump version to 0.3.2 2014-04-27 13:46:20 -07:00
Samy Pessé 0e0d051f7c Merge pull request #173 from erixtekila/master
Update README.md
2014-04-27 22:26:56 +02:00
Eric Priou a1b649a279 Update README.md 2014-04-27 22:24:37 +02:00
Eric Priou e6bc0a0fb7 Update README.md
3rd party plugins done in the weekend
2014-04-27 22:18:09 +02:00
Samy Pessé 93e4016c09 Add link to disqus plugin 2014-04-27 21:55:50 +02:00
Samy Pessé 20c741a248 Fix stupid typo thanks to @erixtekila 2014-04-27 21:21:48 +02:00
Samy Pessé 54f530c7c3 Merge pull request #171 from GitbookIO/feature/offlineCache
Improve pages loading
2014-04-27 18:05:13 +02:00
Samy Pessé 9fdc5da22d Update page when new version of application cache 2014-04-27 17:57:34 +02:00
Samy Pessé 99ce48b146 Add base loading indicator for navigation
#161
2014-04-27 17:36:12 +02:00
Samy Pessé 6a33ad9ef7 Add base cache manifest 2014-04-27 17:14:57 +02:00
Samy Pessé ca94055adf Adapt tests for plugins 2014-04-27 15:45:16 +02:00
Samy Pessé 36a67e4c91 Fix #169: fix resolve of external plugins 2014-04-27 15:41:02 +02:00
Samy Pessé 69431e1bbb Fix #165: replace separator from ":" to "," 2014-04-27 09:14:39 +02:00
Samy Pessé a3fc4ee2b0 Fix display of code element in sepia/night 2014-04-25 18:14:41 +02:00
Samy Pessé e505fd6d54 Improve summary divider for theme sepia and night 2014-04-25 18:12:39 +02:00
Samy Pessé 93a3785e4c Improve highlight theme for sepia and night themes 2014-04-25 18:05:09 +02:00
Samy Pessé a02de84812 Change highlight theme to tomorrow 2014-04-25 17:56:48 +02:00
Samy Pessé c0521f0ec7 Improve display of pre in markdown content 2014-04-25 17:48:31 +02:00
Samy Pessé 83d8c16853 Add file watcher in "gitbook serve" command (Fix #47, #89, #140) 2014-04-25 16:23:13 +02:00
Samy Pessé 47e9506397 Fix #153 and Improve pushState navigation 2014-04-25 15:12:19 +02:00
Samy Pessé b8a3d0e254 Merge pull request #144 from attomos/master
Make quiz easier to click by surround it with label.
2014-04-25 14:29:04 +02:00
Samy Pessé 001d7ec44e Merge pull request #155 from pborreli/patch-1
Fixed typo
2014-04-24 22:44:36 +02:00
Pascal Borreli 5cb0ec447a Fixed typo 2014-04-24 21:43:32 +01:00
Aaron O'Mullan 67e7d77302 Bump version to 0.3.1 2014-04-24 10:45:55 -07:00
Aaron O'Mullan 8cbd8b2b48 Reorder plugin names
Improves #149 and improves GitBookIO/editor#12
2014-04-24 01:38:42 -07:00
Aaron O'Mullan 7c404dbf96 Fix plugin tests 2014-04-24 01:34:35 -07:00
Aaron O'Mullan c4a67b6f2f Require plugin names to contain gitbook-*
Fixes #149, fixes GitBookIO/editor#12
2014-04-24 01:28:04 -07:00
Samy Pessé 3b70347625 Fix #146: complete license 2014-04-24 09:00:15 +02:00
Aaron O'Mullan bb0a7935e9 Merge pull request #141 from frodsan/niceties
Niceties
2014-04-23 11:34:08 -07:00
Nattaphoom Ch 8f4b799d3c Make quiz easier to click by surround it with label. 2014-04-24 01:19:13 +07:00
Francesco Rodriguez 931e0c66c9 Update color themes for highlight.js link. 2014-04-23 12:30:05 -03:00
Francesco Rodriguez 0212084862 Fix typo. 2014-04-23 12:28:44 -03:00
Samy Pessé 9abbabbce3 Merge pull request #138 from Hermanya/patch-1
Add @Hermanya as a contributor
2014-04-22 23:47:13 +02:00
Hermanya ac610487e8 Add @Hermanya as a contributor 2014-04-22 17:45:41 -04:00
Aaron O'Mullan a9a0f89892 Bump version to 0.3.0 2014-04-22 14:05:52 -07:00
Samy Pessé 305f221077 Fix #136: replace links to .md by links to .html
Add more tests for links in page
2014-04-22 17:45:12 +02:00
Samy Pessé 53514f2602 Improve sepia theme sidebar 2014-04-22 14:27:48 +02:00
Samy Pessé 00327778cb Improve font-settings dropdown design 2014-04-22 14:12:53 +02:00
Samy Pessé 37fadec787 Merge branch 'master' of https://github.com/Hermanya/gitbook into Hermanya-master 2014-04-22 14:02:19 +02:00
Samy Pessé ada11d0b59 Add section in readme about plugins 2014-04-22 12:51:10 +02:00
Aaron O'Mullan 4c90fdb7b2 Merge pull request #123 from GitbookIO/feature/plugins
Fix #65: Plugins Architecture
2014-04-21 14:26:09 -07:00
Samy Pessé 98c133df3c Change plugins separator to "," 2014-04-21 23:23:53 +02:00
Samy Pessé f86c27b090 Add option --pluginsConfig 2014-04-21 22:58:51 +02:00
Samy Pessé b5b8ed72a5 Update default addons 2014-04-21 22:39:23 +02:00
Samy Pessé 5beff86548 Change js interface for plugins and add configuration 2014-04-21 22:20:41 +02:00
Samy Pessé dd395edae1 Use mathjax plugin version 0.0.2 2014-04-21 16:30:02 +02:00
Aaron O'Mullan d1c1d7b75b Bump version to 0.2.4 2014-04-20 16:41:09 -07:00
Samy Pessé 4a380e9279 Fix #36: add mathjax plugin as default 2014-04-20 15:20:21 +02:00
Samy Pessé 878c105def Use complete assets folder for plugins 2014-04-20 02:04:15 +02:00
Samy Pessé 74d628676b Add option to change templates from plugin 2014-04-20 00:10:46 +02:00
Samy Pessé 6fdd98ec3a Trigger event on document when ready 2014-04-19 20:39:58 +02:00
Samy Pessé 2ed1be3533 Add global js interface for plugins and remove mixpanel 2014-04-19 20:10:03 +02:00
Samy Pessé 0ac04e1584 Add call for hooks "init" and "finish" 2014-04-19 19:50:32 +02:00
Herman Starikov 2a38d33d8a Font settings, closes #102 2014-04-19 13:46:14 -04:00
Samy Pessé fb14caf5b3 Add resources to site build 2014-04-19 19:31:02 +02:00
Samy Pessé cf51772f54 Add command line option "plugins" 2014-04-19 18:00:24 +02:00
Samy Pessé cc8516df83 Load plugins during generation 2014-04-19 17:57:40 +02:00
Samy Pessé c6a624bc6b Add method to load a list of plugins from generator options 2014-04-19 17:54:15 +02:00
Samy Pessé 8be8b825ee Add base loading of default addons
Add mixpanel as default addon
2014-04-19 17:28:44 +02:00
Samy Pessé 56eb4a2897 Add base plugin object and test validation of plugin 2014-04-19 15:41:29 +02:00
Samy Pessé 7a461eaa61 Remove theme readme
Add semver dependency
2014-04-19 14:40:46 +02:00
Samy Pessé fd64c05809 Fix #118: fix single page generation when file from summary doesn't exists 2014-04-18 23:42:02 +02:00
Aaron O'Mullan 6bce93d893 Bump version to 0.2.3 2014-04-18 11:53:18 -07:00
Aaron O'Mullan c9db068227 Refactor navigation generation to be functional
This makes it a lot less error prone and far more robust. As well as a
lot easier to understand
2014-04-18 11:49:55 -07:00
Samy Pessé 8a6d36ac4d Improve stability of mixpanel tracking 2014-04-18 20:42:18 +02:00
Samy Pessé 64622c5945 Load css before content 2014-04-18 20:19:45 +02:00
Samy Pessé 837813edb0 Add warning about theme 2014-04-18 20:16:21 +02:00
Aaron O'Mullan 0d9d62f1a9 Merge pull request #117 from GitbookIO/fix/99
Fix #99
2014-04-18 10:17:20 -07:00
Samy Pessé f7e9abf984 Fix quiz interractivity 2014-04-18 19:10:13 +02:00
Samy Pessé dd0579b60d Update tests for relative images 2014-04-18 17:23:33 +02:00
Samy Pessé b5bb953e47 Fix image path calcul 2014-04-18 17:15:03 +02:00
Samy Pessé ef4a8ea1b6 Fix #116: update url before updating html content 2014-04-18 15:49:53 +02:00
Samy Pessé 49cde96ee7 Add contributors to package.json and change homepage 2014-04-18 15:00:40 +02:00
Samy Pessé 627be20e48 Add editor and twitter links in the readme 2014-04-18 14:48:03 +02:00
Samy Pessé e45bb84b02 Fix navigation on chrome for iOS: disable pushState 2014-04-18 13:09:16 +02:00
Aaron O'Mullan 4e8876c725 Update README.md 2014-04-17 16:39:06 -07:00
Aaron O'Mullan 6d5be15ec9 Bump version to 0.2.2 2014-04-17 15:31:57 -07:00
Samy Pessé 1a8db646f2 Improve styling for pdf and ebook 2014-04-17 12:15:28 +02:00
Samy Pessé d3aba2c906 Fix state update after navigation 2014-04-17 11:48:04 +02:00
Samy Pessé 457a83282f Improve style for pdf and ebook 2014-04-17 11:27:21 +02:00
Samy Pessé 48e94c937d Remove useless caracter from page format 2014-04-17 11:17:40 +02:00
Samy Pessé 6e613e9f71 Fix #107: Render all the page in single page format 2014-04-17 11:16:18 +02:00
Aaron O'Mullan b698d43d7d Bump version to 0.2.1 2014-04-17 01:10:11 -07:00
Aaron O'Mullan a36b9a6088 Normalize code language before highlighting 2014-04-17 01:09:26 -07:00
Samy Pessé 20acd89c8a Merge pull request #104 from GitbookIO/fix/auto_highlighting
Disable automatic highlighting
2014-04-17 09:24:56 +02:00
Aaron O'Mullan 7bed9a257d Merge pull request #105 from ptagell/master
Removed duplicate line of readme
2014-04-16 14:38:49 -07:00
Paul Tagell 19c83aa5a8 Removed duplicate line of readme 2014-04-17 07:35:28 +10:00
Aaron O'Mullan 52610d7d61 Disable automatic highlighting
Fallback to no highlighting rather that potentially funky highlighting
2014-04-16 13:15:35 -07:00
Aaron O'Mullan 9e4b393b7a In parse/page remove global marked settings
Highlighter settings were global, moved them to the render function
(where they should have been)
2014-04-16 13:07:35 -07:00
Samy Pessé a0ae34a3b7 Fix #100: fix section test isQuiz 2014-04-16 17:16:18 +02:00
Samy Pessé 413dc5d004 Add more test for quiz (related to #100) 2014-04-16 17:15:45 +02:00
Aaron O'Mullan c9eb27bfe7 Do not pass SUMMARY.md to generator, fixes #93
We want to parse SUMMARY.md but not generate a file from it, thus it
should be removed from the list of files to be processed by the
generator
2014-04-16 00:18:35 -07:00
Aaron O'Mullan b78505c290 Ignore .gitignore file by default in fs.list
Partial fix of #93
2014-04-16 00:11:54 -07:00
Samy Pessé 95f9ae83d0 Fix #97: keep scroll position during page changement 2014-04-15 17:42:46 +02:00
Samy Pessé 9304289315 Fix progress display when page change 2014-04-14 23:00:40 +02:00
Samy Pessé 1b726ca293 Update preview 2014-04-14 22:35:10 +02:00
Samy Pessé 656ca18929 Improve languages list design 2014-04-14 21:29:26 +02:00
Aaron O'Mullan b8cacaee00 Bump to version 0.2.0 2014-04-14 11:48:29 -07:00
Samy Pessé f349012f0f Add analytics on page changement 2014-04-14 20:33:45 +02:00
Samy Pessé ddd49509ce Improve design of header buttons 2014-04-14 20:21:57 +02:00
Samy Pessé 28257e1ce7 Fix search with pusState navigation 2014-04-14 20:15:04 +02:00
Samy Pessé 24d8e15ee2 Fix scrolling on new design 2014-04-14 20:08:55 +02:00
Samy Pessé d6d9223ea1 Revert "Fix ebook and pdf generator"
This reverts commit f43e630528.
2014-04-14 20:00:15 +02:00
Samy Pessé 05f1eed9ce Fix #91: Extract defaults title and description from README.md 2014-04-14 19:48:12 +02:00
Samy Pessé c0ca055bf4 Add readme parsing for extracting title and description 2014-04-14 19:21:43 +02:00
Samy Pessé f43e630528 Fix ebook and pdf generator 2014-04-14 19:05:23 +02:00
Samy Pessé e4fa8aaca7 Fix generate.file method 2014-04-14 18:56:20 +02:00
Samy Pessé 1b147d3e30 Merge branch 'master' of https://github.com/tcorral/gitbook into tcorral-master
Conflicts:
	theme/javascript/app.js
2014-04-14 16:44:11 +02:00
Samy Pessé 5848f5db51 Merge pull request #88 from GitbookIO/feature/clarity
Feature/clarity
2014-04-14 16:36:12 +02:00
Samy Pessé 9f1ba8483b Merge head styles so that ace stays stable 2014-04-14 16:34:19 +02:00
Samy Pessé 6da48764e8 Fix header interractive actions: buttons and github 2014-04-14 16:29:02 +02:00
Samy Pessé 8c4cfed609 Add complete refresh of head and body on page navigation 2014-04-14 16:16:34 +02:00
Samy Pessé 1ff7e88cea Focs and reset scroll on page body 2014-04-14 15:43:11 +02:00
Samy Pessé c3ba975d6c Improve quiz sections design 2014-04-14 15:37:13 +02:00
Samy Pessé 8c02e949fc Fix exercises binding when page changed
Add base binding for quiz
2014-04-14 12:43:45 +02:00
Samy Pessé 56e1803b34 Fix title update with pushState navigation 2014-04-14 12:32:22 +02:00
Samy Pessé c511037f46 New languages page 2014-04-14 01:04:58 +02:00
Samy Pessé 730fe982f5 Add @Nijikokun as a contributor 2014-04-14 00:49:25 +02:00
Samy Pessé ca71a1c9e6 Fix regression on github as an option 2014-04-14 00:49:09 +02:00
Samy Pessé 01bc283638 Add fonts locally 2014-04-14 00:40:02 +02:00
Samy Pessé 4ca719b108 Fix fonts path 2014-04-14 00:23:38 +02:00
Samy Pessé 889183ccc9 Improve search input design 2014-04-14 00:17:16 +02:00
Samy Pessé 4a6ae8d4e0 Switch to 4spaces indentations for less files 2014-04-14 00:15:35 +02:00
Samy Pessé b77debae24 Made progress bar static 2014-04-14 00:11:51 +02:00
Samy Pessé 9ffa462111 Add base from clarity theme from @Nijikokun 2014-04-14 00:06:58 +02:00
Samy Pessé 1bbef54015 Remove logs from core module 2014-04-13 23:55:13 +02:00
Samy Pessé 3c7cae6262 Move more build logic to the core generation module 2014-04-13 23:53:34 +02:00
tcorral 646a4513e3 Allow scroll in computers that put the navigation over scroll control. When the document is ready it will check the difference between the body-inner and the page-wrapper width to move the layer only this width allowing the user to scroll. 2014-04-13 04:24:07 +02:00
tcorral d9e34fc671 Allow scroll in computers that put the navigation over scroll control. When the document is ready it will check the difference between the body-inner and the page-wrapper width to move the layer only this width allowing the user to scroll. 2014-04-13 03:09:50 +02:00
tcorral 2242963258 Allow scroll in computers that put the navigation over scroll control. When the document is ready it will check the difference between the body-inner and the page-wrapper width to move the layer only this width allowing the user to scroll. 2014-04-13 03:07:44 +02:00
Aaron O'Mullan 555c0d63ee Add gitbook init command, fixes #67 2014-04-12 12:27:13 -07:00
Aaron O'Mullan fb05609e09 Refactor binary's buildCommand
Be more “commander-like”
2014-04-12 11:58:55 -07:00
Aaron O'Mullan 78cb9a56ba Merge pull request #85 from GitbookIO/pr/63
Pr/63
2014-04-12 01:51:06 -07:00
Aaron O'Mullan 6173fb76ad Refactor, document, improve section type detection
Especially for quiz types
2014-04-12 01:50:48 -07:00
Aaron O'Mullan ca25511d7a Fixup page lexing in test/page 2014-04-12 01:34:36 -07:00
James Phillpotts b07681a16a Quiz with GFM checkbox lists 2014-04-12 01:26:03 -07:00
James Phillpotts f6595f5111 Tabular quiz 2014-04-12 01:25:07 -07:00
Samy Pessé ab27725b99 Update AUTHORS.md 2014-04-11 23:31:39 +02:00
Samy Pessé 32b1be3dee Create AUTHORS.md 2014-04-11 23:30:40 +02:00
Samy Pessé d715b5b154 Merge pull request #84 from Tim-Zhang/master
Fix title problem when repo url doesn't have .git suffix
2014-04-11 23:15:30 +02:00
TimZhang 177ca32b9b Fix title problem when repo url doesn't have .git suffix 2014-04-11 18:04:01 +08:00
Aaron O'Mullan 892ec04f52 Merge pull request #78 from mrpotes/mocha-windows
Fix URL creation on windows
2014-04-10 11:44:33 -07:00
James Phillpotts 8f457a752e Use OS-agnostic path generation for images too 2014-04-10 11:00:52 +01:00
James Phillpotts 435a4b8c99 Use API from node 0.8 2014-04-10 10:45:54 +01:00
Samy Pessé 02d8272c74 Merge pull request #77 from GitbookIO/improve/sections_lexing
Improve/sections lexing
2014-04-10 11:34:56 +02:00
Aaron O'Mullan e54b808093 Improve section detection, fixes #68 2014-04-10 02:32:37 -07:00
James Phillpotts fb7653bd14 Fix URL creation on windows 2014-04-10 10:31:32 +01:00
Aaron O'Mullan 04774df372 Add better tests for ambiguous section detection 2014-04-10 02:27:42 -07:00
Aaron O'Mullan 619ded93ad Improve language normalization
Check for null before converting to lower case
2014-04-10 02:21:54 -07:00
Samy Pessé 2e85380cd8 Merge pull request #62 from oliverh855/master
Changes the default font from Helvetica to Open Sans
2014-04-09 11:13:56 +02:00
Oliver Hoffmann 241ad7cb0e Removes unused font-family appLight 2014-04-09 11:09:31 +02:00
Oliver Hoffmann 0171c32996 Removes helvetica font from repository 2014-04-09 11:08:39 +02:00
Oliver Hoffmann d275bd516a Changes the default font from Helvetica to Open Sans. See #14 2014-04-09 10:55:52 +02:00
Samy Pessé 99594791e0 Merge Optional github 2014-04-09 08:23:11 +02:00
Samy Pessé 1b432288f0 Merge branch 'optional-github' of https://github.com/mrpotes/gitbook into mrpotes-optional-github 2014-04-09 08:17:37 +02:00
Aaron O'Mullan 2cc23b7e34 Bump version to 0.1.3 2014-04-08 17:03:13 -07:00
Aaron O'Mullan 61b6848a95 Uglify output JS theme/assets/app.js 2014-04-08 17:01:43 -07:00
Aaron O'Mullan 9265b0185a Add context code support to exercises (optional)
Partial #52, fixes #49, fixes #46
2014-04-08 16:58:04 -07:00
Aaron O'Mullan 392573a990 Add lexing support for content code in exercises
#52, #49, #46
2014-04-08 15:01:12 -07:00
Aaron O'Mullan 554d6a6170 Fix URL rewriting error on empty URLs
Fixes #54, fixes #59
2014-04-08 14:47:36 -07:00
James Phillpotts fa2f82d52f Tidy up use of github, and make error more descriptive 2014-04-08 10:00:10 +01:00
Samy Pessé 2182baa2e9 Merge pull request #51 from calmdev/fix/gh-enterprise
Fixes --githubHost option for use with Github Enterprise.
2014-04-07 10:42:55 -07:00
Levi Lewis 7fe189907e Fixes --githubHost option for use with Github Enterprise. 2014-04-07 13:11:44 -04:00
James Phillpotts 58a90886da Whoops, missed a couple of extra uses of githubId 2014-04-07 10:51:41 +01:00
James Phillpotts 80794997a4 Make use of github optional 2014-04-07 10:38:06 +01:00
Samy Pessé 9d541a0a4d Bump version to 0.1.2 2014-04-07 01:22:58 -07:00
Samy Pessé 8f3df085d8 Center images in markdown body 2014-04-07 01:11:08 -07:00
Samy Pessé b7e04b5475 Don't use caching for search index 2014-04-07 01:08:11 -07:00
Samy Pessé ee8bf6dc4c Fix display of table in page body 2014-04-07 01:06:44 -07:00
Samy Pessé 9670f564d9 Improve new navigation on mobile 2014-04-07 01:03:35 -07:00
Samy Pessé b541df2b93 Add new lateral navigations 2014-04-07 00:44:30 -07:00
Samy Pessé cf3a641350 Fix progress link to README 2014-04-07 00:02:00 -07:00
Samy Pessé ec719891a1 Remove need for README.md for multi-languages 2014-04-06 23:53:39 -07:00
Samy Pessé 1bfa8c186c Fix overflow on languages page 2014-04-06 23:51:16 -07:00
Samy Pessé 5887f1de28 Merge pull request #42 from GitbookIO/feature/ebook
Fix #10: Add generation to ebook
2014-04-06 22:28:17 -07:00
Samy Pessé a9a66bc240 Add format ebook to README.md 2014-04-06 22:09:52 -07:00
Samy Pessé 742229a989 Add command "ebook" to generate an ebook 2014-04-06 22:03:44 -07:00
Samy Pessé 9fe80b878e Add option cover for ebook generation 2014-04-06 21:46:11 -07:00
Samy Pessé 4b64c87011 Add base ebook generator using ebook-convert 2014-04-06 19:10:22 -07:00
Samy Pessé 4c36c592c1 Merge pull request #40 from GitbookIO/feature/searchclient
Feature/searchclient
2014-04-06 17:13:32 -07:00
Samy Pessé 9ffb1a062f Use cache in localstorage to store search index 2014-04-06 17:13:10 -07:00
Samy Pessé 536c480969 Fix loading of search index in sub directories 2014-04-06 17:06:01 -07:00
Samy Pessé d14bd7245f Open sidebar when opening search 2014-04-06 16:51:14 -07:00
Samy Pessé 6fc8255b7f Reset search results when hidding search bar 2014-04-06 16:47:28 -07:00
Samy Pessé a42f287a92 Filter summary using search bar 2014-04-06 16:46:29 -07:00
Samy Pessé d2f62fd109 Move search bar as global 2014-04-06 16:20:31 -07:00
Samy Pessé f24b66f2c4 Blur search input when hidding search bar 2014-04-06 16:17:54 -07:00
Samy Pessé 607b45f172 Change norm of core/state 2014-04-06 16:10:25 -07:00
Aaron O'Mullan c166a9863e Resolve image URLs, fixes #38
Using outidr & dir options
2014-04-06 16:05:12 -07:00
Aaron O'Mullan 1a4b196851 Add outdir option to generators' generateFile 2014-04-06 16:04:28 -07:00
Samy Pessé ff52a2317b Hide the search bar when pressing ESC key 2014-04-06 16:02:43 -07:00
Samy Pessé b598c9a272 Add keyboard shortcut "f" for opening search bar 2014-04-06 15:58:00 -07:00
Samy Pessé 9cd7c9ad0e Focus search input when opening 2014-04-06 15:56:28 -07:00
Aaron O'Mullan 75a8d3069d Fix dir option in site generator
Use relative folder not absolute
2014-04-06 15:55:24 -07:00
Samy Pessé ed41429d58 Add base search bar in sidebar 2014-04-06 15:53:53 -07:00
Aaron O'Mullan eecb33baa8 Fix relative link detection in renderer 2014-04-06 15:46:20 -07:00
Aaron O'Mullan b8f2da734e Fix minor repetion in README
.gitignore was repeated twice
2014-04-06 15:25:39 -07:00
Aaron O'Mullan 3687a1701b Fix a few typos in README 2014-04-06 15:23:07 -07:00
Aaron O'Mullan c8f83e2684 Document ignores in README, fixes #37 2014-04-06 15:21:57 -07:00
Aaron O'Mullan aa7835e913 Add .bookignore to ignoreFiles #37 2014-04-06 15:19:31 -07:00
Samy Pessé 74edc4f279 Merge pull request #39 from GitbookIO/feature/search
Feature/search
2014-04-06 15:03:27 -07:00
Aaron O'Mullan 696cbdc3b1 Generate section.id in lexer
This allows generating correct URLs for our search index
2014-04-06 14:53:33 -07:00
Aaron O'Mullan 2f8543d710 Generate search_index.json when generating site
Fixes #24
2014-04-06 14:50:11 -07:00
Aaron O'Mullan aee33d67b6 Add lunr@0.5.2 dependency 2014-04-06 14:49:44 -07:00
Samy Pessé 52ccc2b46d Fix #33: copy files when generating pdf or single page 2014-04-06 14:37:33 -07:00
Aaron O'Mullan 9270d7949a In page parser, lex only if not already lexed 2014-04-06 14:13:48 -07:00
Samy Pessé 855c9b9aef Add documentation about multi-languages books 2014-04-06 14:08:11 -07:00
Aaron O'Mullan c98ba22b08 Move page lexer to separate module
Allow lexer to be used independently of page parser/renderer
2014-04-06 14:02:49 -07:00
Samy Pessé d1e55aef8e Add support of multi-languages book in command pdf 2014-04-06 13:59:58 -07:00
Aaron O'Mullan ef059c8737 Add marked-text-renderer@0.0.1 dependency 2014-04-06 13:50:44 -07:00
Samy Pessé fde66ed849 bin/build after generation return all the options 2014-04-06 13:49:51 -07:00
Samy Pessé abce29866e Return options after generate 2014-04-06 13:47:29 -07:00
Samy Pessé 014b2f9c69 Merge pull request #35 from GitbookIO/feature/multilangs
Fix #34: Feature/multilangs
2014-04-06 13:44:14 -07:00
Samy Pessé 65cb23feab Fix generation for page format 2014-04-06 13:43:20 -07:00
Samy Pessé 2b3c67a26b Fix commands options 2014-04-06 13:16:06 -07:00
Samy Pessé 174ce965d9 Fix command build 2014-04-06 13:09:42 -07:00
Samy Pessé adf20e6a16 Add base style for languages index page 2014-04-06 13:07:57 -07:00
Samy Pessé 53f714b7f3 Add base for generating languages index 2014-04-06 12:52:35 -07:00
Samy Pessé d19906d5b2 Add base for multi-languages book 2014-04-06 12:11:43 -07:00
Samy Pessé fb26b634ce Fix page format when chapters are not yet written 2014-04-06 01:59:53 -07:00
Samy Pessé a34dc458c9 Fix footer link when no chapters is ready yet 2014-04-06 00:36:44 -07:00
Aaron O'Mullan eeb715d5d6 Prevent renderer from mutating sections 2014-04-06 00:21:55 -07:00
Samy Pessé a8e026a642 Add information about output format 2014-04-05 23:30:48 -07:00
Samy Pessé cc096d2253 Rename Index.js to index.js 2014-04-06 05:25:22 +02:00
Samy Pessé a4c1cf9334 Refactor bin/gitbook.js 2014-04-05 20:22:27 -07:00
Samy Pessé 9ffec175a5 Add command gitbook pdf to generate PDF 2014-04-05 20:22:27 -07:00
Aaron O'Mullan 465188cae6 Remove useless console.log in test/summary.js 2014-04-05 20:09:50 -07:00
Aaron O'Mullan 4547ec73fd Merge pull request #31 from GitbookIO/feature/lang
Feature/lang
2014-04-05 20:06:38 -07:00
Aaron O'Mullan cae6267665 Adapt test to new code language normalization 2014-04-05 20:04:54 -07:00
Aaron O'Mullan 58bee15f37 Add basic code language normalization 2014-04-05 20:04:24 -07:00
Samy Pessé 761cfb4a2c Add pdf generator using gitbook-pdf 2014-04-05 19:52:51 -07:00
Samy Pessé 8e3339ead2 Fix link to introduction 2014-04-05 18:45:56 -07:00
Aaron O'Mullan b330277ed7 Normalize paths on Windows to Unix convention
Convert “\” to “/“ in relative paths in fs.list
2014-04-05 18:44:53 -07:00
Samy Pessé 12b5baf433 Start exercise index at 1 on pdf format 2014-04-05 18:44:17 -07:00
Samy Pessé f38d68c355 Improve style of exercises in pdf format 2014-04-05 18:42:21 -07:00
Samy Pessé 865bf40e1a Add exercise solutions at the end of the pdf book 2014-04-05 18:08:25 -07:00
Samy Pessé 562ee2b77f Add README introduction to page/pdf generation 2014-04-05 17:33:09 -07:00
Samy Pessé 8b0f2f6329 Fix rendering of code in exercises 2014-04-05 17:28:46 -07:00
Samy Pessé 44717a3e3e Generate an index.html instead of a README.html 2014-04-05 17:15:22 -07:00
Samy Pessé 6f7e3fda02 Fix conflict in app.js 2014-04-05 13:54:13 -07:00
Samy Pessé 511fc7bd46 Merge branch 'master' of https://github.com/GitbookIO/gitbook
Conflicts:
	theme/assets/app.js
2014-04-05 13:54:00 -07:00
Aaron O'Mullan 4987beec2b Add test for exercise language detection 2014-04-05 13:53:44 -07:00
Aaron O'Mullan e414cbd6d1 Detect exercise language
And ensure that all code blocks use the same language
2014-04-05 13:53:31 -07:00
Samy Pessé 694afeccc5 Add base for exercise for others languages 2014-04-05 13:53:22 -07:00
Aaron O'Mullan 959a2d830a Improve robustness of analytics.isAvailable
Fixes GitbookIO/javascript#18

Safari has issues with loading mixpanel, this adds and extra check so
Safari doesn’t fail on event tracking
2014-04-05 12:47:49 -07:00
Aaron O'Mullan 4850c0f302 Bump version to 0.1.1 2014-04-05 01:10:51 -07:00
Aaron O'Mullan ac258329ff Copy README.html to index.html instead of symlimk
Fixes #28
2014-04-05 01:05:31 -07:00
Samy Pessé d5bd08dcd2 Show exercise in page format 2014-04-04 20:12:22 -07:00
Samy Pessé 6c414ec400 Fix link for chapters in page format 2014-04-04 20:01:50 -07:00
Samy Pessé 881a0c6f6d Add info about --theme option 2014-04-04 18:21:40 -07:00
Samy Pessé 0071594300 Fix error with mixpanel loading 2014-04-04 18:18:50 -07:00
Samy Pessé 460799828f Merge pull request #27 from qrohlf/fix-sidebar-mobile
don't show the sidebar by default on mobile
2014-04-05 02:56:57 +02:00
Samy Pessé 02b75288d2 No need to include highlight twice (style.css and print.css) 2014-04-04 17:50:35 -07:00
Samy Pessé b108be0c3b Add separation line between pages 2014-04-04 17:46:59 -07:00
Samy Pessé 7ab285832b Improve style for page printing 2014-04-04 17:40:37 -07:00
Quinn Rohlf 0bc288fe96 don't show the sidebar by default on mobile 2014-04-04 16:44:25 -07:00
Samy Pessé 9fbe240843 Add summary to page generator 2014-04-04 16:40:21 -07:00
Samy Pessé 0c7e2b3557 Add base style for printing 2014-04-04 16:02:57 -07:00
Samy Pessé e34e65813c Fix pages order in page generator 2014-04-04 15:53:30 -07:00
Samy Pessé 63f946ced9 In page generator, add break for printing between pages 2014-04-04 15:47:45 -07:00
Samy Pessé af9f3cf89f Don't generate folder when using generator "page" 2014-04-04 15:41:22 -07:00
Samy Pessé 355094bbb3 Change option for changing generator to format 2014-04-04 15:38:01 -07:00
Samy Pessé b3adedb468 Add base for generating single page html 2014-04-04 14:40:27 -07:00
Samy Pessé 026e4362d8 Move mixpanel to app.js 2014-04-04 14:27:32 -07:00
Samy Pessé 9cf5384fbe Change template name for site generation to site 2014-04-04 14:22:48 -07:00
Samy Pessé 9bc0bf19da Add command line options for changing theme 2014-04-04 14:15:06 -07:00
Samy Pessé f49a1a484e Remove lex command 2014-04-04 14:11:43 -07:00
Samy Pessé 446d486a0f Add base for theming 2014-04-04 14:10:56 -07:00
Samy Pessé 07101deaef Move generator to specific folder 2014-04-04 13:57:07 -07:00
Samy Pessé 76b3fcb41c Add base for page generator 2014-04-04 13:55:43 -07:00
Samy Pessé febda9aba1 Add Travis CI badge 2014-04-04 20:07:05 +02:00
Aaron O'Mullan f952fa47b9 Use relative symlink between index & README
Fixes #19, fixes #21
2014-04-04 11:04:58 -07:00
Samy Pessé 1984660930 Rename PAGE.MD to PAGE.md 2014-04-04 20:04:49 +02:00
Aaron O'Mullan d475affd3b Merge pull request #25 from GitbookIO/feature/generators
Feature/generators
2014-04-04 10:59:13 -07:00
Samy Pessé fe3de93e06 Create .travis.yml 2014-04-04 19:57:51 +02:00
Samy Pessé 5cae311edf Log error in command line tool 2014-04-04 10:55:48 -07:00
Samy Pessé 26701a2a73 Remove logs from generation 2014-04-04 10:50:59 -07:00
Samy Pessé 5125e04814 Update tests 2014-04-04 10:47:44 -07:00
Samy Pessé 0a6194340f Remove file template.js 2014-04-04 10:46:11 -07:00
Samy Pessé e0d96b3163 Fix links in templates 2014-04-04 10:45:36 -07:00
Samy Pessé f656390783 Base for new site generator 2014-04-04 10:39:27 -07:00
Samy Pessé 88c480ba4f Complete json generator 2014-04-04 10:27:45 -07:00
Samy Pessé 3da53d56a2 Add option -g to choice generator
Add base json generator
2014-04-04 09:53:05 -07:00
Samy Pessé 91359fab1e _path is not used anymore 2014-04-04 09:47:34 -07:00
Samy Pessé a52a4bed1a Change normalization of parser to give link in .md 2014-04-04 09:47:06 -07:00
Samy Pessé 9dce855113 Add class BaseGenerator 2014-04-04 09:45:04 -07:00
Samy Pessé 57e2595a3e Merge pull request #20 from mintbridge/github-host-url
Adding config option for github host
2014-04-04 16:51:28 +02:00
Paul Dixon b1314273bb Adding config option for github host
- this config option allows the github host url to be set to
something other than github.com, mainly so that github enterprise
users can change the url to their private host but will also
work with bitbucket
2014-04-04 14:55:08 +01:00
Samy Pessé cb9a0b82ba Fix some typos in lib 2014-04-04 00:00:12 -07:00
Samy Pessé 57ecfe4a54 Make templates more modular 2014-04-03 23:54:03 -07:00
Samy Pessé 405792fd8f Fix #17: Remember state of book summary panel 2014-04-03 23:17:45 -07:00
Samy Pessé fc6d911340 Merge pull request #16 from wh0/patch-1
GiBook -> GitBook
2014-04-04 05:00:29 +02:00
wh0 1e6307b69b GiBook -> GitBook 2014-04-03 19:59:56 -07:00
Aaron O'Mullan af87dc8d7c Bump version to 0.1.0 2014-04-03 16:19:49 -07:00
Aaron O'Mullan 1699028688 Handle empty repoID and print error, fixes #11 2014-04-03 16:10:47 -07:00
Samy Pessé 55d9bfbf18 Enable use of spacebar for scrolling into book body 2014-04-03 15:53:50 -07:00
Samy Pessé c964b53137 Add keyboard shortcut 's' to toggle sidebar 2014-04-03 15:39:05 -07:00
Samy Pessé 510f7bacb4 Show sidebar by default 2014-04-03 15:29:34 -07:00
Samy Pessé c934238f3d Fix #9: add keyboard navigation using right/left 2014-04-03 15:24:57 -07:00
Samy Pessé ab48959968 Update screenshot preview 2014-04-02 21:25:33 -07:00
Samy Pessé eb6204aa42 Bump version to 0.0.4 2014-04-02 20:26:08 -07:00
Samy Pessé a70439f375 Update app.js build 2014-04-02 20:25:52 -07:00
Samy Pessé a3b562b4e8 Prevent default click action on sharing 2014-04-02 20:24:07 -07:00
Samy Pessé aa4e3abc33 Add sharing links in header 2014-04-02 20:17:46 -07:00
Samy Pessé f24a7fbb6e Fix selection of all buffer when clicking on "Solution" 2014-04-02 19:00:50 -07:00
Samy Pessé f3a49306b1 Use prefix for storage key 2014-04-02 18:57:36 -07:00
Samy Pessé f312472abd Add button to edit current chapter in sidebar 2014-04-02 18:53:58 -07:00
Aaron O'Mullan ecb07468f6 Resolve relative links to GitHub repo, fixes #6
Useful for linking to blobs and other files …
2014-04-02 18:40:53 -07:00
Aaron O'Mullan 8fc09e2e05 Add github link resolution test 2014-04-02 18:40:53 -07:00
Aaron O'Mullan ed7798237a Add GITHUB_LINKS.md fixture
For testing github link resolution
2014-04-02 18:40:52 -07:00
Samy Pessé faf63566df Hide articles in progress bar on mobile 2014-04-02 17:48:35 -07:00
Samy Pessé c88382aea0 Update favicon 2014-04-02 17:01:30 -07:00
Samy Pessé 9ee5f48aef Add meta tag generator 2014-04-02 16:53:28 -07:00
Samy Pessé e1dfe5c0f6 Improve meta tags 2014-04-02 16:48:12 -07:00
Aaron O'Mullan 3adcd77ae4 Merge sections together, fixes #7 2014-04-02 16:40:51 -07:00
Aaron O'Mullan 4bdcfd07a9 Add tests for section merging 2014-04-02 16:40:51 -07:00
Aaron O'Mullan a9967df6eb Add HR_PAGE.md fixture
This is for testing that non exercise sections are merged correctly
together and united with HRs
2014-04-02 16:40:51 -07:00
Samy Pessé 62a2e8f81c Fix #8: Improve page title 2014-04-02 16:38:24 -07:00
Aaron O'Mullan 6bcc2d8cf2 Expose titles in navigation of current nodes 2014-04-02 16:33:31 -07:00
Samy Pessé ad1867e4d8 Add preview on readme 2014-04-02 10:40:47 +02:00
Samy Pessé 445c2327c4 Bump version to 0.0.3 2014-04-02 01:36:03 -07:00
Samy Pessé 7a33881b3b Fix mixpanel tracking 2014-04-02 01:35:41 -07:00
Aaron O'Mullan 417ee789c4 Improve README.md, fix minor typos 2014-04-02 01:34:43 -07:00
Samy Pessé 22c118779c Add preview screenshot 2014-04-02 01:27:54 -07:00
Samy Pessé 53dc206d71 Fix format for exercise 2014-04-02 10:20:44 +02:00
Samy Pessé 3c9d8878df Add informations about exercises format 2014-04-02 01:14:15 -07:00
Samy Pessé 03cbe7b18f Add information about summary format 2014-04-02 01:04:01 -07:00
Samy Pessé 85f4c3be58 Add base information on installation in readme 2014-04-02 00:56:02 -07:00
Samy Pessé eb09f61029 Fix usage of highlight.js 2014-04-01 23:00:22 -07:00
Samy Pessé 2cee253be4 Bump version to 0.0.2 2014-04-01 19:32:55 -07:00
Samy Pessé 25162ceaa2 Fix #5: Add favicon 2014-04-01 19:20:38 -07:00
Samy Pessé 840113a48f Improve design of page content (sections and exercises) 2014-04-01 19:10:15 -07:00
Samy Pessé ddffd02b2e Add border radius to sections and footer navigation button 2014-04-01 18:59:59 -07:00
Samy Pessé 520ea847da Make chapter in progress bar clickable 2014-04-01 18:57:48 -07:00
Samy Pessé e77e3b724e Improve footer navigation 2014-04-01 18:49:20 -07:00
Samy Pessé d313589736 Mark chapter as read after the page is viewed 2014-04-01 18:42:43 -07:00
Samy Pessé 466ceb581c Fix execution when contains && 2014-04-01 18:21:01 -07:00
Samy Pessé 835953d8dd Improve lisibility of text in page 2014-04-01 17:57:20 -07:00
Samy Pessé a69e8ec328 Add highlight.js dependency 2014-04-01 17:39:22 -07:00
Samy Pessé 970107c656 Fix #3: Add syntax highlighting 2014-04-01 17:01:44 -07:00
Samy Pessé 7121b7efe3 Fix #4: Add option for defining description 2014-04-01 16:42:15 -07:00
Samy Pessé d02581a21c Add base analytic using mixpanel 2014-04-01 15:39:28 -07:00
Samy Pessé fd5c2f6706 Fix transition on header 2014-04-01 14:42:04 -07:00
Samy Pessé b93f67c84a Save sidebar state 2014-04-01 13:26:06 -07:00
Aaron O'Mullan 86cf2d9d9d Bump version to 0.0.1 2014-04-01 02:51:16 -07:00
Samy Pessé 1e719cf773 Improve footer navigation on mobile 2014-04-01 02:48:00 -07:00
Samy Pessé c66b37d91c Improve progress bar design 2014-04-01 02:38:19 -07:00
Samy Pessé ca2d499f63 Change style of bottom navigation 2014-04-01 02:36:36 -07:00
Samy Pessé b30132d8c8 Fix link to issues 2014-04-01 02:00:53 -07:00
Samy Pessé 71dee7717d Fix summary display on firefox 2014-04-01 01:58:04 -07:00
Samy Pessé 4d880fc05b Improve animation and display of progress bar 2014-04-01 01:51:18 -07:00
Samy Pessé 7b0d50fc45 Fix position of progress bar 2014-04-01 01:23:17 -07:00
Samy Pessé 256d1ba35a Add progress calcul 2014-04-01 01:21:44 -07:00
Aaron O'Mullan cc340db0fa Add cli command serve
This does a build, then spins up a HTTP server to serve the books
contents
2014-04-01 01:14:56 -07:00
Aaron O'Mullan f776748437 Don't add chapters/articles with null paths to navigation 2014-04-01 00:45:52 -07:00
Aaron O'Mullan bb96433fe3 Adjust summary test for new SUMMARY.md fixture 2014-04-01 00:45:51 -07:00
Aaron O'Mullan 6a63708939 Add tests for null paths in navigation
Unfinished chapters/articles should be put in navigation
2014-04-01 00:45:51 -07:00
Samy Pessé e08b09f3cf Fix execution of code 2014-04-01 00:24:09 -07:00
Samy Pessé b3c865ef58 Add execution of exercise 2014-04-01 00:12:26 -07:00
Aaron O'Mullan 2aebb38e58 Add jsrepl to static assets 2014-03-31 23:47:13 -07:00
Samy Pessé 93a0f52b85 Add base for full optimized markdown github style 2014-03-31 23:35:02 -07:00
Samy Pessé 202355729e Fix font-awesome path 2014-03-31 23:18:10 -07:00
Samy Pessé 70569affc2 Fix overflow on header 2014-03-31 23:06:08 -07:00
Samy Pessé d36dfee40b Mark as disabled articles not yet finished in the summary 2014-03-31 23:02:43 -07:00
Samy Pessé eed1dfb243 Only convert markdown file from the navigation 2014-03-31 22:54:22 -07:00
Samy Pessé aefbfaf057 Move getFiles to fs module 2014-03-31 22:45:45 -07:00
Samy Pessé 0f0128fa49 Show level in summary page 2014-03-31 22:35:59 -07:00
Samy Pessé 8edd5e4b3b Signal and mark progress 2014-03-31 22:27:25 -07:00
Samy Pessé 642a338cb0 Mark levels done in local storage 2014-03-31 19:41:29 -07:00
Aaron O'Mullan 77136705fc Add level attribute in navigation 2014-03-31 19:39:38 -07:00
Aaron O'Mullan b16f6d548c Add tests for level attribute in navigation 2014-03-31 19:39:38 -07:00
Samy Pessé 07c10da91f Add base for handling and storing progress 2014-03-31 19:34:50 -07:00
Aaron O'Mullan 0ad6533f12 Add level attribute to chapters/articles 2014-03-31 19:34:06 -07:00
Aaron O'Mullan 2234026153 Add tests for level attribute to chapters/articles 2014-03-31 19:33:55 -07:00
Aaron O'Mullan a6d18e89df Symlink README.html to index.html for book output 2014-03-31 19:25:14 -07:00
Aaron O'Mullan ec570ca68d Remove extra "q" dependency in package.json 2014-03-31 19:19:52 -07:00
Aaron O'Mullan 6bcd483351 Replace glob with better fstream-ignore
It ignores according to .gitignore and other folders
2014-03-31 19:19:52 -07:00
Samy Pessé 347ae52e67 Fix star and watch count 2014-03-31 19:08:06 -07:00
Samy Pessé 5ff6896ee5 Move all javascript to the bundle 2014-03-31 19:04:26 -07:00
Samy Pessé 68e35758c3 Add base for javascript compilation using requirejs 2014-03-31 19:01:01 -07:00
Aaron O'Mullan 84d703c6f5 Ensure destination dir exists before building 2014-03-31 18:28:51 -07:00
Aaron O'Mullan 138dc1f2de Add target _blank support in renderer for external links 2014-03-31 18:15:05 -07:00
Samy Pessé 1ab31ede81 Fix display of long title in summary 2014-03-31 18:01:35 -07:00
Samy Pessé e0a97f2f4b Improve footer navigation display 2014-03-31 17:49:21 -07:00
Samy Pessé 885e451054 Mark as active current chapter 2014-03-31 17:43:07 -07:00
Aaron O'Mullan a7b8e24e7a Fix tiny typo
In string not code
2014-03-31 17:41:37 -07:00
Aaron O'Mullan abf8c59946 Improve navigation from 1st chapter back to intro
1st chapter’s prev, now links to the intro page
2014-03-31 17:40:57 -07:00
Samy Pessé 91a916e146 Improve navigation on mobile resolutions 2014-03-31 17:38:28 -07:00
Aaron O'Mullan 752b26e963 Fix previous/next chapter navigation 2014-03-31 17:36:01 -07:00
Aaron O'Mullan 45574cf7a5 Add better tests for chapter navigation
Proves previous and next chapter logic is broken
2014-03-31 17:36:01 -07:00
Aaron O'Mullan 4607f406ab Add navigation tests for first page for README of a chapter 2014-03-31 17:36:01 -07:00
Samy Pessé bc5d963c5e Fix title position for small screen 2014-03-31 17:28:40 -07:00
Samy Pessé d85ae0a36e Improve title position with summary open in header 2014-03-31 17:27:14 -07:00
Samy Pessé 9c211ab214 Mark active chapter in summary 2014-03-31 17:25:00 -07:00
Samy Pessé ce3e103024 Add navigation parsed in footer 2014-03-31 17:17:34 -07:00
Samy Pessé 8ecaeb86f9 Improve spacing of navigation links in footer 2014-03-31 17:17:24 -07:00
Samy Pessé 1b00fc9620 Add footer for navigation links 2014-03-31 17:06:40 -07:00
Aaron O'Mullan 39f1ed055e Add parse.navigation module
With tests
2014-03-31 17:06:39 -07:00
Aaron O'Mullan 3f3bade58e Change summary data format
Simplify chapter objects, by making them identical to article objects
besides the .articles attribute
2014-03-31 17:06:39 -07:00
Samy Pessé 0821b10e18 Improve page section design 2014-03-31 16:22:28 -07:00
Samy Pessé 37aaab3bae Remove test.js 2014-03-31 16:08:10 -07:00
Aaron O'Mullan fcdb12f4ca Set size of exercise code editor according to solution
Use the number of lines in solution to set editor’s size
2014-03-31 15:55:06 -07:00
Aaron O'Mullan 2d29121e2e Add lex sub-command to gitbook binary
The lex command is useful for debugging files and seeing how they are
parsed
2014-03-31 15:54:26 -07:00
Aaron O'Mullan 36b961c539 Clean output folder before generating 2014-03-31 15:24:38 -07:00
Aaron O'Mullan e9e94a7344 Filter out empty sections when generating pages 2014-03-31 15:14:31 -07:00
Aaron O'Mullan a8e0de86e9 Generate a unique Id for each section 2014-03-31 15:03:06 -07:00
Samy Pessé 6261d42b95 Add base for full display of exercises 2014-03-31 15:01:02 -07:00
Aaron O'Mullan 8e22d80c7c Add content & code generation for exercise sections 2014-03-31 15:00:03 -07:00
Samy Pessé 82b99189b1 Add base display of exercise 2014-03-31 13:59:51 -07:00
Aaron O'Mullan 3f7f5667e4 Merge pull request #1 from GitbookIO/feature/cli
Initial gitbook binary
2014-03-31 13:52:41 -07:00
Aaron O'Mullan a88ea48206 Initial gitbook binary 2014-03-31 13:51:31 -07:00
Samy Pessé c3a181a50d Fix author link 2014-03-31 12:59:26 -07:00
Samy Pessé 0fdd31dc39 Fix link for watcher and stargazers 2014-03-31 12:54:53 -07:00
Samy Pessé d44fd91181 Get watcher and stargazer count using github api 2014-03-31 12:51:27 -07:00
Aaron O'Mullan 264a506e8b Fix bug with exercise classification 2014-03-31 12:40:53 -07:00
Samy Pessé d98669958d Fix header link and display 2014-03-31 12:39:16 -07:00
Samy Pessé 4210794de6 Fix all relative links 2014-03-31 12:31:01 -07:00
Samy Pessé 77a4c1042c Merge branch 'master' of https://github.com/GitbookIO/gitbook 2014-03-31 12:16:16 -07:00
Samy Pessé 6df59745b1 Fix link in summary (absolute to relative) 2014-03-31 12:15:45 -07:00
Samy Pessé 0b08663b70 Fix font path 2014-03-31 12:14:40 -07:00
Samy Pessé 19a3981475 Copy assets to build 2014-03-31 12:10:26 -07:00
Aaron O'Mullan 89593f46ab Normalize .md links to .html when rendering pages 2014-03-31 12:09:28 -07:00
Samy Pessé 1f3f062841 Add base for generation 2014-03-31 12:00:22 -07:00
Aaron O'Mullan 1d321207b0 Normalize chapter & article paths 2014-03-31 12:00:13 -07:00
Aaron O'Mullan bd7531f3cc Add tests for path normalization
.md to .html
2014-03-31 11:58:31 -07:00
Aaron O'Mullan 75073d47a2 Add link to PAGE.md fixture 2014-03-31 11:57:16 -07:00
Aaron O'Mullan 0af1886358 Move summary & page parsing code to lib/parse/ 2014-03-31 01:50:21 -07:00
Aaron O'Mullan d18da55a18 Improve section classification 2014-03-31 01:34:37 -07:00
Aaron O'Mullan 7ab78b420a Change lib entry point to lib/index.js 2014-03-31 01:02:35 -07:00
Aaron O'Mullan 5e183f24de Expose page module in index.js 2014-03-30 22:52:27 -07:00
Aaron O'Mullan 2c36a21938 Render normal sections' content to HTML 2014-03-30 22:51:30 -07:00
Aaron O'Mullan 7b4974209b Add tests for page content rendering 2014-03-30 22:51:02 -07:00
Aaron O'Mullan c21303c762 Add section type detection 2014-03-30 22:36:22 -07:00
Aaron O'Mullan 4c1435f27f Test for section types 2014-03-30 22:36:08 -07:00
Aaron O'Mullan 0199e56000 Add initial page parsing
(Split sections)
2014-03-30 22:30:45 -07:00
Aaron O'Mullan 9284eb4115 Add basic page tests 2014-03-30 22:30:30 -07:00
Aaron O'Mullan cfbdadd6e4 Add title and path parsing for chapters & articles 2014-03-30 22:02:07 -07:00
Aaron O'Mullan 603870ee07 Add test for titles & paths 2014-03-30 22:01:37 -07:00
Aaron O'Mullan 39a80421fc Add summary parsing 2014-03-30 21:30:33 -07:00
Aaron O'Mullan 1d28ab441a Add tests for summary parsing 2014-03-30 21:30:21 -07:00
Aaron O'Mullan d5070c0bf1 Add base dependencies 2014-03-30 20:13:47 -07:00
Aaron O'Mullan 71e9d7bd80 Initial package.json 2014-03-30 20:10:04 -07:00
Aaron O'Mullan 0a104b1f85 Initial commit 2014-03-30 20:01:56 -07:00
1037 changed files with 16588 additions and 120228 deletions
-8
View File
@@ -1,8 +0,0 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
-11
View File
@@ -1,11 +0,0 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
+10
View File
@@ -0,0 +1,10 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
+4
View File
@@ -0,0 +1,4 @@
docs/**/*
_book/**/*
node_modules/**/*
test/**/*
+22
View File
@@ -0,0 +1,22 @@
{
"rules": {
"indent": [ 2, 4 ],
"quotes": [ 2, "single" ],
"linebreak-style": [ 2, "unix" ],
"semi": [ 2, "always" ],
"no-unused-vars": [ 2, {
"vars": "all",
"args": "none"
} ],
"spaced-comment": [ 2, "always" ]
},
"env": {
"node": true,
"browser": true,
"mocha": true
},
"globals": {
"expect": true
},
"extends": "eslint:recommended"
}
-3
View File
@@ -1,3 +0,0 @@
# Changes to the API data cache functions can invalidate all existing data cache
# causing a massive amount of revalidation, impacting our API.
packages/gitbook/src/lib/data/api.ts @SamyPesse
-111
View File
@@ -1,111 +0,0 @@
# Welcome to GitBook's contributing guide!
> _For help, support, feature requests, and product questions - head to our [GitHub Community](https://github.com/orgs/GitbookIO/discussions) 🤖_
Thank you for investing your time in contributing to GitBook. Any contribution you make will be reviewed by our team. In this guide, you'll learn the different ways you can contribute.
## Types of Contributions
This repository contains code related to the rendering engine of GitBook's published content. Depending on what you'd like to contribute to, head to the section below to find the necessary steps.
### Add a feature
Because this portion of GitBook is open source and available for you to use - if you think you can provide extra value through a new feature - you're welcome to add it! If you plan to distribute the code, keep the source code public to comply with GNU GPLv3. To clone in a private repository, you must first acquire a [commercial license](https://www.gitbook.com/pricing).
### Create a new issue
If you spot a problem within a repository, [search if an issue already exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). If a related issue doesn't exist, you can open a new issue here!Please make sure any added issues are
- Descriptive
- Thoughtful
- Organized
We recommend adding as many relevant links, minimal reproductions of the issue, and other materials that will help our team solve the issue fast.
### Solve an issue
If you're interested in solving an issue in our repository, start by scanning through it's exisiting issues to find one that you're interested in working on. If you find an issue to work on, you are welcome to open a PR with a fix. See the following sections below for more information on contributing for specific sections.
### Documentation
The official documentation on GitBook open can be found directly in this Readme. Any updates or changes you would like to make, you can make directly to the README of this repository.
## Contributing
### Make changes locally
Any contribution you make can be made to the code located in this repository. In order to contribute, you'll need to start off of a local version of this repository.
#### 1. Fork the repository
##### Using GitHub Desktop:
- [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) will guide you through setting up Desktop.
- Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)!
##### Using the command line:
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.
#### 2. Create a working branch and start with your changes
After forking this repository, you'll want to [create a branch](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-a-branch-for-an-issue) to work off of.
#### 3. Install dependencies and run the project locally
##### Prerequisites:
- Node.js (Version: >=20.6)
- Use `nvm` for easy Node management
- [Bun](https://bun.sh/) (Version: >=1.2.15)
- We use a text-based lockfile which isn't supported below 1.2.15
##### Setup steps:
1. Ensure you are using the project's version of Node:
```bash
nvm use
```
2. Install dependencies using Bun:
```bash
bun install
```
3. Start the development server:
```bash
bun dev
```
Additional development commands:
- `bun format`: Format the code using Biome
- `bun typecheck`: Run TypeScript type checking
- `bun unit`: Run unit tests
- `bun e2e`: Run end-to-end tests
#### 4. Preview your changes
When running the development server, published GitBook sites can be rendered through your local version at `http://localhost:3000/url`.
For example, our published docs can be viewed using the local version by visiting `http://localhost:3000/url/gitbook.com/docs` after running the development server.
You can visit any published GitBook site behind your development server. Please make sure your site is [published publicly](https://gitbook.com/docs/published-documentation/publish-your-content-as-a-docs-site) to ensure you can view the site correctly in your development version.
### Commit your update
[Commit your changes](https://github.com/git-guides/git-commit) once you are happy with them. See [Atom's contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages) to know how to use emoji for commit messages!
Once your changes are ready, don't forget to self-review your code to double check that your chagnes are ready to be added.
### Pull Request
When you're finished with the changes, [create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request), also known as a PR.
- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one.
- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge. Once you submit your PR, a GitBook team member will review your proposal. We may ask questions or request for additional information.
- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
- If you run into any merge issues, checkout this [git tutorial](https://lab.github.com/githubtraining/managing-merge-conflicts) to help you resolve merge conflicts and other issues.
### Your PR is merged
Congratulations 🎉 Thank you for your contribution! Once your PR is merged, your contributions will be publicly visible on the relevant repository.
-18
View File
@@ -1,18 +0,0 @@
---
name: Bug report
about: Something not working as expected? Let us look into it
labels: bug
---
## Bug description
_Please describe._
_If this affects the front-end, screenshots would be of great help._
## How to reproduce
1.
2.
3.
## Additional context
@@ -1,83 +0,0 @@
name: Gradual Deploy to Cloudflare
description: Use gradual deployment to deploy to Cloudflare. This action will upload the middleware and server versions to Cloudflare and kept them bound together
inputs:
apiToken:
description: 'Cloudflare API token'
required: true
accountId:
description: 'Cloudflare account ID'
required: true
environment:
description: 'Cloudflare environment to deploy to (staging, production, preview)'
required: true
middlewareVersionId:
description: 'Middleware version ID to deploy'
required: true
serverVersionId:
description: 'Server version ID to deploy'
required: true
outputs:
deployment-url:
description: "Deployment URL"
value: ${{ steps.deploy_middleware.outputs.deployment-url }}
runs:
using: 'composite'
steps:
- id: wrangler_status
name: Check wrangler deployment status
uses: cloudflare/wrangler-action@v3.14.0
with:
apiToken: ${{ inputs.apiToken }}
accountId: ${{ inputs.accountId }}
workingDirectory: ./
wranglerVersion: '4.10.0'
environment: ${{ inputs.environment }}
command: deployments status --config ./packages/gitbook/openNext/customWorkers/defaultWrangler.jsonc
# This step is used to get the version ID that is currently deployed to Cloudflare.
- id: extract_current_version
name: Extract current version
shell: bash
run: |
version_id=$(echo "${{ steps.wrangler_status.outputs.command-output }}" | grep -A 3 "(100%)" | grep -oP '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
echo "version_id=$version_id" >> $GITHUB_OUTPUT
- id: deploy_server
name: Deploy server to Cloudflare at 0%
uses: cloudflare/wrangler-action@v3.14.0
with:
apiToken: ${{ inputs.apiToken }}
accountId: ${{ inputs.accountId }}
workingDirectory: ./
wranglerVersion: '4.10.0'
environment: ${{ inputs.environment }}
command: versions deploy ${{ steps.extract_current_version.outputs.version_id }}@100% ${{ inputs.serverVersionId }}@0% -y --config ./packages/gitbook/openNext/customWorkers/defaultWrangler.jsonc
# Since we use version overrides headers, we can directly deploy the middleware to 100%.
- id: deploy_middleware
name: Deploy middleware to Cloudflare at 100%
uses: cloudflare/wrangler-action@v3.14.0
with:
apiToken: ${{ inputs.apiToken }}
accountId: ${{ inputs.accountId }}
workingDirectory: ./
wranglerVersion: '4.10.0'
environment: ${{ inputs.environment }}
command: versions deploy ${{ inputs.middlewareVersionId }}@100% -y --config ./packages/gitbook/openNext/customWorkers/middlewareWrangler.jsonc
- name: Deploy server to Cloudflare at 100%
uses: cloudflare/wrangler-action@v3.14.0
with:
apiToken: ${{ inputs.apiToken }}
accountId: ${{ inputs.accountId }}
workingDirectory: ./
wranglerVersion: '4.10.0'
environment: ${{ inputs.environment }}
command: versions deploy ${{ inputs.serverVersionId }}@100% -y --config ./packages/gitbook/openNext/customWorkers/defaultWrangler.jsonc
- name: Outputs
shell: bash
env:
DEPLOYMENT_URL: ${{ steps.deploy_middleware.outputs.deployment-url }}
run: |
echo "URL: ${{ steps.deploy_middleware.outputs.deployment-url }}"
@@ -1,37 +0,0 @@
name: 'Setup Playwright'
description: 'Install Playwright and dependencies'
runs:
using: 'composite'
steps:
# Run npm ci and get Playwright version
- name: 🏗 Prepare Playwright env
shell: bash
run: |
PLAYWRIGHT_VERSION=$(npm ls --json @playwright/test | jq --raw-output '.dependencies["gitbook"].dependencies["@playwright/test"].version')
echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
# Cache browser binaries, cache key is based on Playwright version and OS
- name: 🧰 Cache Playwright browser binaries
uses: actions/cache@v4
id: playwright-cache
with:
path: '~/.cache/ms-playwright'
key: '${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}'
restore-keys: |
${{ runner.os }}-playwright-
# Install browser binaries & OS dependencies if cache missed
- name: 🏗 Install Playwright browser binaries & OS dependencies
if: steps.playwright-cache.outputs.cache-hit != 'true'
shell: bash
working-directory: packages/gitbook
run: |
bun x playwright install --with-deps chromium
# Install only the OS dependencies if cache hit
- name: 🏗 Install Playwright OS dependencies
if: steps.playwright-cache.outputs.cache-hit == 'true'
shell: bash
working-directory: packages/gitbook
run: |
bun x playwright install-deps
@@ -1,138 +0,0 @@
name: 'Deploy cloudflare'
description: 'Deploy GitBook to Cloudflare'
inputs:
opItem:
description: '1Password item to load secrets from'
required: true
opServiceAccount:
description: '1Password service account token'
required: true
apiToken:
description: 'Cloudflare API token'
required: true
accountId:
description: 'Cloudflare account ID'
required: true
environment:
description: 'Cloudflare environment to deploy to (staging, production, preview)'
required: true
deploy:
description: 'Deploy as main version for all traffic instead of uploading versions'
required: true
commitTag:
description: 'Commit branch to associate with the deployment'
required: true
commitMessage:
description: 'Commit message to associate with the deployment'
required: true
outputs:
deployment-url:
description: "Deployment URL"
value: ${{ steps.upload_middleware.outputs.deployment-url }}
runs:
using: 'composite'
steps:
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
shell: bash
env:
PUPPETEER_SKIP_DOWNLOAD: 1
- name: Load secret
uses: 1password/load-secrets-action@v2
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ inputs.opServiceAccount }}
GITBOOK_URL: ${{ inputs.opItem }}/GITBOOK_URL
GITBOOK_ICONS_URL: ${{ inputs.opItem }}/GITBOOK_ICONS_URL
GITBOOK_ICONS_TOKEN: ${{ inputs.opItem }}/GITBOOK_ICONS_TOKEN
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: ${{ inputs.opItem }}/NEXT_SERVER_ACTIONS_ENCRYPTION_KEY
GITBOOK_SECRET: ${{ inputs.opItem }}/GITBOOK_SECRET
GITBOOK_APP_URL: ${{ inputs.opItem }}/GITBOOK_APP_URL
GITBOOK_API_URL: ${{ inputs.opItem }}/GITBOOK_API_URL
GITBOOK_API_PUBLIC_URL: ${{ inputs.opItem }}/GITBOOK_API_PUBLIC_URL
GITBOOK_API_TOKEN: ${{ inputs.opItem }}/GITBOOK_API_TOKEN
GITBOOK_INTEGRATIONS_HOST: ${{ inputs.opItem }}/GITBOOK_INTEGRATIONS_HOST
GITBOOK_IMAGE_RESIZE_SIGNING_KEY: ${{ inputs.opItem }}/GITBOOK_IMAGE_RESIZE_SIGNING_KEY
GITBOOK_IMAGE_RESIZE_URL: ${{ inputs.opItem }}/GITBOOK_IMAGE_RESIZE_URL
GITBOOK_IMAGE_RESIZE_MODE: ${{ inputs.opItem }}/GITBOOK_IMAGE_RESIZE_MODE
GITBOOK_ASSETS_PREFIX: ${{ inputs.opItem }}/GITBOOK_ASSETS_PREFIX
GITBOOK_FONTS_URL: ${{ inputs.opItem }}/GITBOOK_FONTS_URL
- name: Build worker
run: bun run turbo build:cloudflare
env:
GITBOOK_RUNTIME: cloudflare
shell: bash
- name: Upload the DO worker
uses: cloudflare/wrangler-action@v3.14.0
with:
apiToken: ${{ inputs.apiToken }}
accountId: ${{ inputs.accountId }}
workingDirectory: ./
wranglerVersion: '4.10.0'
environment: ${{ inputs.environment }}
command: deploy --config ./packages/gitbook/openNext/customWorkers/doWrangler.jsonc
- id: upload_server
name: Upload server to Cloudflare
uses: cloudflare/wrangler-action@v3.14.0
with:
apiToken: ${{ inputs.apiToken }}
accountId: ${{ inputs.accountId }}
workingDirectory: ./
wranglerVersion: '4.10.0'
environment: ${{ inputs.environment }}
command: ${{ format('versions upload --tag {0} --message "{1}"', inputs.commitTag, inputs.commitMessage) }} --config ./packages/gitbook/openNext/customWorkers/defaultWrangler.jsonc
- name: Extract server version worker ID
shell: bash
id: extract_server_version_id
run: |
version_id=$(echo '${{ steps.upload_server.outputs.command-output }}' | grep "Worker Version ID" | awk '{print $4}')
echo "version_id=$version_id" >> $GITHUB_OUTPUT
- name: Run updateWrangler scripts
shell: bash
run: |
bun run ./packages/gitbook/openNext/customWorkers/script/updateWrangler.ts ${{ steps.extract_server_version_id.outputs.version_id }}
- id: upload_middleware
name: Upload middleware to Cloudflare
uses: cloudflare/wrangler-action@v3.14.0
with:
apiToken: ${{ inputs.apiToken }}
accountId: ${{ inputs.accountId }}
workingDirectory: ./
wranglerVersion: '4.10.0'
environment: ${{ inputs.environment }}
command: ${{ format('versions upload --tag {0} --message "{1}"', inputs.commitTag, inputs.commitMessage) }} --config ./packages/gitbook/openNext/customWorkers/middlewareWrangler.jsonc
- name: Extract middleware version worker ID
shell: bash
id: extract_middleware_version_id
run: |
version_id=$(echo '${{ steps.upload_middleware.outputs.command-output }}' | grep "Worker Version ID" | awk '{print $4}')
echo "version_id=$version_id" >> $GITHUB_OUTPUT
- name: Deploy server and middleware to Cloudflare
if: ${{ inputs.deploy == 'true' }}
uses: ./.github/actions/gradual-deploy-cloudflare
with:
apiToken: ${{ inputs.apiToken }}
accountId: ${{ inputs.accountId }}
opServiceAccount: ${{ inputs.opServiceAccount }}
opItem: ${{ inputs.opItem }}
environment: ${{ inputs.environment }}
serverVersionId: ${{ steps.extract_server_version_id.outputs.version_id }}
middlewareVersionId: ${{ steps.extract_middleware_version_id.outputs.version_id }}
deploy: ${{ inputs.deploy }}
- name: Outputs
shell: bash
env:
DEPLOYMENT_URL: ${{ steps.upload_middleware.outputs.deployment-url }}
run: |
echo "URL: ${{ steps.upload_middleware.outputs.deployment-url }}"
echo "Output server: ${{ steps.upload_server.outputs.command-output }}"
@@ -1,80 +0,0 @@
name: 'Deploy vercel'
description: 'Deploy GitBook to Vercel'
inputs:
vercelOrg:
description: 'Vercel organization'
required: true
vercelProject:
description: 'Vercel project'
required: true
vercelToken:
description: 'Vercel token'
required: true
opItem:
description: '1Password item to load secrets from'
required: true
opServiceAccount:
description: '1Password service account token'
required: true
environment:
description: 'Environment to deploy to'
required: true
outputs:
deployment-url:
description: "Deployment URL"
value: ${{ steps.deploy.outputs.deployment-url }}
runs:
using: 'composite'
steps:
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
shell: bash
env:
PUPPETEER_SKIP_DOWNLOAD: 1
- name: Pull Vercel Environment Information
run: bun run vercel pull --yes --environment=${{ inputs.environment }} --token=${{ inputs.vercelToken }}
shell: bash
env:
VERCEL_ORG_ID: ${{ inputs.vercelOrg }}
VERCEL_PROJECT_ID: ${{ inputs.vercelProject }}
- name: Load secret
uses: 1password/load-secrets-action@v2
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ inputs.opServiceAccount }}
GITBOOK_URL: ${{ inputs.opItem }}/GITBOOK_URL
GITBOOK_ICONS_URL: ${{ inputs.opItem }}/GITBOOK_ICONS_URL
GITBOOK_ICONS_TOKEN: ${{ inputs.opItem }}/GITBOOK_ICONS_TOKEN
GITBOOK_SECRET: ${{ inputs.opItem }}/GITBOOK_SECRET
GITBOOK_APP_URL: ${{ inputs.opItem }}/GITBOOK_APP_URL
GITBOOK_API_URL: ${{ inputs.opItem }}/GITBOOK_API_URL
GITBOOK_API_PUBLIC_URL: ${{ inputs.opItem }}/GITBOOK_API_PUBLIC_URL
GITBOOK_API_TOKEN: ${{ inputs.opItem }}/GITBOOK_API_TOKEN
GITBOOK_INTEGRATIONS_HOST: ${{ inputs.opItem }}/GITBOOK_INTEGRATIONS_HOST
GITBOOK_IMAGE_RESIZE_SIGNING_KEY: ${{ inputs.opItem }}/GITBOOK_IMAGE_RESIZE_SIGNING_KEY
GITBOOK_IMAGE_RESIZE_URL: ${{ inputs.opItem }}/GITBOOK_IMAGE_RESIZE_URL
GITBOOK_IMAGE_RESIZE_MODE: ${{ inputs.opItem }}/GITBOOK_IMAGE_RESIZE_MODE
GITBOOK_ASSETS_PREFIX: ${{ inputs.opItem }}/GITBOOK_ASSETS_PREFIX
GITBOOK_FONTS_URL: ${{ inputs.opItem }}/GITBOOK_FONTS_URL
- name: Build Project Artifacts
run: bun run vercel build --target=${{ inputs.environment }} --token=${{ inputs.vercelToken }}
shell: bash
env:
VERCEL_ORG_ID: ${{ inputs.vercelOrg }}
VERCEL_PROJECT_ID: ${{ inputs.vercelProject }}
GITBOOK_RUNTIME: vercel
- name: Deploy Project Artifacts to Vercel
id: deploy
shell: bash
run: |
DEPLOYMENT_URL=$(bun run vercel deploy --prebuilt --target=${{ inputs.environment }} --token=${{ inputs.vercelToken }})
echo "deployment-url=$DEPLOYMENT_URL" >> "$GITHUB_OUTPUT"
env:
VERCEL_ORG_ID: ${{ inputs.vercelOrg }}
VERCEL_PROJECT_ID: ${{ inputs.vercelProject }}
- name: Outputs
shell: bash
run: |
echo "URL: ${{ steps.deploy.outputs.deployment-url }}"
-9
View File
@@ -1,9 +0,0 @@
name: 'Setup Bun'
description: 'Install Bun and cache dependencies'
runs:
using: 'composite'
steps:
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: 'package.json'
-68
View File
@@ -1,68 +0,0 @@
name: CI
on:
pull_request:
push:
branches:
- main
env:
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
jobs:
format:
runs-on: ubuntu-latest
name: Format
timeout-minutes: 6
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: 1
- run: bun format:check
test:
runs-on: ubuntu-latest
name: Test
timeout-minutes: 6
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: 1
- run: bun unit
build-oss:
# CI to check that the repository builds correctly on a machine without the credentials
runs-on: ubuntu-latest
name: Build (Open Source)
timeout-minutes: 6
env:
NPM_TOKEN_READONLY: ''
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install
env:
PUPPETEER_SKIP_DOWNLOAD: 1
- run: bun run build
typecheck:
runs-on: ubuntu-latest
name: Typecheck
timeout-minutes: 6
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: 1
- run: bun typecheck
-202
View File
@@ -1,202 +0,0 @@
name: Preview
on:
pull_request:
push:
branches:
- main
env:
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
jobs:
deploy-v2-vercel:
name: Deploy v2 to Vercel (preview)
runs-on: ubuntu-latest
environment:
name: 2v-preview
url: ${{ steps.deploy.outputs.deployment-url }}
outputs:
deployment-url: ${{ steps.deploy.outputs.deployment-url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy to Vercel
id: deploy
uses: ./.github/composite/deploy-vercel
with:
environment: preview
vercelOrg: ${{ secrets.VERCEL_ORG_ID }}
vercelProject: ${{ secrets.VERCEL_PROJECT_ID }}
vercelToken: ${{ secrets.VERCEL_TOKEN }}
opItem: op://gitbook-open/2v-preview
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
deploy-v2-cloudflare:
name: Deploy v2 to Cloudflare Worker (preview)
runs-on: ubuntu-latest
environment:
name: 2c-preview
url: ${{ steps.deploy.outputs.deployment-url }}
outputs:
deployment-url: ${{ steps.deploy.outputs.deployment-url || steps.extract-worker-id.outputs.worker-url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy to Cloudflare
id: deploy
uses: ./.github/composite/deploy-cloudflare
with:
environment: preview
deploy: ${{ github.ref == 'refs/heads/main' }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
opItem: op://gitbook-open/2c-preview
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
commitTag: ${{ github.ref == 'refs/heads/main' && 'main' || format('pr{0}', github.event.pull_request.number) }}
commitMessage: ${{ github.sha }}
- name: Extract Worker ID
id: extract-worker-id
if: ${{ !steps.deploy.outputs.deployment-url }}
run: |
if [[ "${{ steps.deploy.outputs.command-output }}" =~ Worker\ Version\ ID:\ ([0-9a-f]{8})-([0-9a-f-]+) ]]; then
WORKER_ID_FIRST_PART="${BASH_REMATCH[1]}"
echo "worker-url=https://${WORKER_ID_FIRST_PART}-gitbook-open-v2-preview.gitbook.workers.dev/" >> $GITHUB_OUTPUT
fi
- name: Outputs
run: |
echo "URL: ${{ steps.deploy.outputs.deployment-url || steps.extract-worker-id.outputs.worker-url }}"
comment-deployments:
runs-on: ubuntu-latest
name: Comment Deployments (preview)
if: always() && !startsWith(github.ref, 'refs/heads/main')
needs:
- deploy-v2-vercel
- deploy-v2-cloudflare
steps:
- name: Find GitHub Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Summary of the deployments'
- name: Create or update GitHub comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Summary of the deployments:
| Version | URL | Status |
| --- | --- | --- |
| Vercel | [${{ needs.deploy-v2-vercel.outputs.deployment-url }}](${{ needs.deploy-v2-vercel.outputs.deployment-url }}) | ${{ needs.deploy-v2-vercel.result == 'success' && '✅' || '❌' }} |
| Cloudflare | [${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}](${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}) | ${{ needs.deploy-v2-cloudflare.result == 'success' && '✅' || '❌' }} |
### Test content
| Site | `2v` | `2c` |
| --- | --- | --- |
| GitBook | [${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/gitbook.com/docs](${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/gitbook.com/docs) | [${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/gitbook.com/docs](${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/gitbook.com/docs) |
| E2E | [${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open](${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open) | [${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open](${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open) |
edit-mode: replace
visual-testing-v2-vercel:
runs-on: ubuntu-latest
name: Visual Testing v2
needs: deploy-v2-vercel
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
- name: Run Playwright tests
run: bun e2e
env:
BASE_URL: ${{ needs.deploy-v2-vercel.outputs.deployment-url }}
SITE_BASE_URL: ${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
ARGOS_BUILD_NAME: 'v2-vercel'
visual-testing-v2-cloudflare:
runs-on: ubuntu-latest
name: Visual Testing v2 (Cloudflare)
needs: deploy-v2-cloudflare
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
- name: Run Playwright tests
run: bun e2e
env:
BASE_URL: ${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}
SITE_BASE_URL: ${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
ARGOS_BUILD_NAME: 'v2-cloudflare'
visual-testing-customers-v2:
runs-on: ubuntu-latest
name: Visual Testing Customers v2
needs: deploy-v2-vercel
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
- name: Run Playwright tests
run: bun e2e-customers
env:
BASE_URL: ${{ needs.deploy-v2-vercel.outputs.deployment-url }}
SITE_BASE_URL: ${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
ARGOS_BUILD_NAME: 'customers-v2'
visual-testing-customers-v2-cloudflare:
runs-on: ubuntu-latest
name: Visual Testing Customers v2 (Cloudflare)
needs: deploy-v2-cloudflare
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
- name: Run Playwright tests
run: bun e2e-customers
env:
BASE_URL: ${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}
SITE_BASE_URL: ${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
ARGOS_BUILD_NAME: 'customers-v2'
pagespeed-testing-v2:
runs-on: ubuntu-latest
name: PageSpeed Testing v1
needs: deploy-v2-vercel
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: 1
- name: Run pagespeed tests
run: bun ./packages/gitbook/tests/pagespeed-testing.ts
env:
BASE_URL: ${{needs.deploy-v2-vercel.outputs.deployment-url}}
PAGESPEED_API_KEY: ${{ secrets.PAGESPEED_API_KEY }}
-55
View File
@@ -1,55 +0,0 @@
name: Production
on:
push:
branches:
- main
env:
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
jobs:
deploy-v2-vercel:
name: Deploy v2 to Vercel (production)
runs-on: ubuntu-latest
environment:
name: 2v-production
url: ${{ steps.deploy.outputs.deployment-url }}
outputs:
deployment-url: ${{ steps.deploy.outputs.deployment-url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
id: deploy
uses: ./.github/composite/deploy-vercel
with:
environment: production
vercelOrg: ${{ secrets.VERCEL_ORG_ID }}
vercelProject: ${{ secrets.VERCEL_PROJECT_ID }}
vercelToken: ${{ secrets.VERCEL_TOKEN }}
opItem: op://gitbook-open/2v-production
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
deploy-v2-cloudflare:
name: Deploy v2 to Cloudflare Worker (production)
runs-on: ubuntu-latest
environment:
name: 2c-production
url: ${{ steps.deploy.outputs.deployment-url }}
outputs:
deployment-url: ${{ steps.deploy.outputs.deployment-url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
id: deploy
uses: ./.github/composite/deploy-cloudflare
with:
environment: production
deploy: true
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
opItem: op://gitbook-open/2c-production
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
commitTag: main
commitMessage: ${{ github.sha }}
- name: Outputs
run: |
echo "URL: ${{ steps.deploy.outputs.deployment-url }}"
-55
View File
@@ -1,55 +0,0 @@
name: Staging
on:
push:
branches:
- main
env:
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
jobs:
deploy-v2-vercel:
name: Deploy v2 to Vercel (staging)
runs-on: ubuntu-latest
environment:
name: 2v-staging
url: ${{ steps.deploy.outputs.deployment-url }}
outputs:
deployment-url: ${{ steps.deploy.outputs.deployment-url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
id: deploy
uses: ./.github/composite/deploy-vercel
with:
environment: staging
vercelOrg: ${{ secrets.VERCEL_ORG_ID }}
vercelProject: ${{ secrets.VERCEL_PROJECT_ID }}
vercelToken: ${{ secrets.VERCEL_TOKEN }}
opItem: op://gitbook-open/2v-staging
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
deploy-v2-cloudflare:
name: Deploy v2 to Cloudflare Worker (staging)
runs-on: ubuntu-latest
environment:
name: 2c-staging
url: ${{ steps.deploy.outputs.deployment-url }}
outputs:
deployment-url: ${{ steps.deploy.outputs.deployment-url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy
id: deploy
uses: ./.github/composite/deploy-cloudflare
with:
environment: staging
deploy: true
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
opItem: op://gitbook-open/2c-staging
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
commitTag: main
commitMessage: ${{ github.sha }}
- name: Outputs
run: |
echo "URL: ${{ steps.deploy.outputs.deployment-url }}"
-42
View File
@@ -1,42 +0,0 @@
name: Publish
on:
push:
branches:
- main
env:
NPM_TOKEN_READONLY: ${{ secrets.NPM_TOKEN_READONLY }}
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Setup Bun
uses: ./.github/composite/setup-bun
- name: Install dependencies
run: bun install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: 1
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
version: npm run changeset-version
env:
# Using a PAT instead of GITHUB_TOKEN because we need to run workflows when releases are created
# https://github.com/orgs/community/discussions/26875#discussioncomment-3253761
GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+28 -20
View File
@@ -1,27 +1,35 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Logs
logs
*.log
# dependencies
node_modules
/.pnp
.pnp.js
# Runtime data
pids
*.pid
*.seed
# misc
.DS_Store
*.pem
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Coverage directory used by tools like istanbul
coverage
# Turbo
.turbo
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Vercel
.vercel
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Env files
.env.local
# Dependency directory
# Deployed apps should consider commenting this line out:
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
/node_modules
# TypeScript
*.tsbuildinfo
# vim swapfile
*.swp
# Output of documentation
_book
book.pdf
book.epub
book.mobi
-1
View File
@@ -1 +0,0 @@
v20.6
+9
View File
@@ -0,0 +1,9 @@
sudo: false
language: node_js
node_js:
- "stable"
- "4.1"
before_install:
- npm install svgexport -g
after_success:
- npm run lint
-3
View File
@@ -1,3 +0,0 @@
{
"recommendations": ["biomejs.biome"]
}
-21
View File
@@ -1,21 +0,0 @@
{
"tailwindCSS.experimental.classRegex": [
["Style \\=([^;]*);", "'([^']*)'"],
["Style \\=([^;]*);", "\"([^\"]*)\""],
["Style \\=([^;]*);", "\\`([^\\`]*)\\`"],
["style \\=([^;]*);", "'([^']*)'"],
["style \\=([^;]*);", "\"([^\"]*)\""],
["style \\=([^;]*);", "\\`([^\\`]*)\\`"]
],
"tailwindCSS.classAttributes": ["class", "className", "style", ".*Style"],
"prettier.enable": false,
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
+68
View File
@@ -0,0 +1,68 @@
Authors
=======
Also see https://github.com/GitbookIO/gitbook/graphs/contributors.
Names below are ordered by first contribution.
Author
------
- Samy Pessé <samy@gitbook.com> (@SamyPesse)
- Aaron O'Mullan <aaron@gitbook.com> (@AaronO)
- Johan Preynat <johan@gitbook.com> (@jpreynat)
- Nicolas Gaborit <nicolas@gitbook.com> (@soreine)
Contributors
------------
- Nijiko Yonskai (@Nijikokun)
- Herman Starikov (@Hermanya)
Translators
------------
- German
- Winnie (@winniehell)
- Italian
- Giulio Bonanome (@gbonanome)
- Russian
- Andrey Akinshin (@AndreyAkinshin)
- Norwegian
- Knut Melvær (@kmelve)
- Persian (Farsi)
- Mohammad Hossein Mojtahedi (@mhm5000)
- Polish
- Łukasz Szeremeta (@lszeremeta)
- Portuguese
- Ryan O'Mullan (@RyanOM)
- Spanish
- Ryan O'Mullan (@RyanOM)
- Simplifiled Chinese
- Hu Hao (@howiehu)
- Traditional Chinese
- Hu Hao (@howiehu)
- French
- Samy Pessé (@SamyPesse)
- Romanian
- Iancu Aurel (@awrelll)
- Finnish
- Tommi Savikko (@savikko)
- Japanese
- Iancu Aurel (@awrelll)
- Korean
- Iancu Aurel (@awrelll)
- SangYeob Yu (@deminoth)
- Vietnamese
- Hong Nguyen (@nghong)
- Hebrew
- @a-moses
- Ukrainian
- @Karnaukhov
- Czech
- @mjanda
- Swedish
- Jacob Burenstam (@buren)
- Turkish
- Turan Konan (@turankonan)
- Catalan
- Esaú García Sánchez-Torija (@egasato)
+368
View File
@@ -0,0 +1,368 @@
# Release notes
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 3.1.1
- Fix order of plugins during loading
- Fix error when using math and conrefs
- Fix target attribute for external links
- Fix serve command
## 3.1.0
- Always load themes after plugins
- README/Introduction doesn't require to be the first entry in the summary
- Highlight active entry in summary when scrolling a page with anchors
- Support empty parts in summary
## 3.0.3
- Fix redirection in `gitbook serve` when accessing a folder without trailing slash
- Fix links/annotations for glossary not being correctly resolved
- Fix regression for supporting uppercase filenames in structure files
- Fix `gitbook install` when using Git URLs for plugins
## 3.0.2
- Fix crash for anchor links
## 3.0.1
- Fix regression in link resolution when contain anchor
- Fix `structure.<name>` configuration not supporting filenames with dots
## 3.0.0
- Summary can contain external links and anchors (Fix [#776](https://github.com/GitbookIO/gitbook/issues/776))
- Summary can contain differents entitled sections
- Glossary is generated as a normal page
- Headings are no longer annotated with glossary terms
- Themes are now published as a plugin, with ability to extend it from the book source
- `links.sidebar` configuration is no longer supported, use summary sections instead
- `pdf.headerTemplate` and `pdf.footerTemplate` have been replaced by a template in theme/book: `_layout/ebook/pdf_header.html` and `_layout/ebook/pdf_footer.html`
- Markdown parser is now using CommonMark
- Root folder for the book can be specified in the `"root"` property of the `book.json` file
- Multi-lingual books share assets folder
- YAML front matter is parsed and can extend page's properties
- Fix `uk` translation
- Fix heading ID including dashes
- Fix error in code highlighting for unknown languages
- Fix data-uri images being handled as external images
- Accept SSH url as plugin version
- Add templating blocks `markdown`, `asciidoc` and `markup`
- Better search experience
- Better default theme, more responsive and cleaner
## 2.6.7
- Fix bug with filenames including spaces
- Add Turkish and Catalan translations
## 2.6.6
- Fix custom CSS that are generated by plugins for PDF output
## 2.6.5
- Fix support for plugins generating custom stylesheets (`styles-less` and `styles-sass`)
- Fix glossary terms being replaced in script (ex: math)
## 2.6.4
- Fix regression introduced by `2.6.3` of single HTML tags in markdown
## 2.6.3
- Fix parsing bug with inline HTML in Markdown
## 2.6.2
- Fix `gitbook.state.bookRoot`, `gitbook.state.root` now has a trailing slash
- Update nunjucks to 2.2.0
## 2.6.1
- Use CamelCase for `gitbook.state.innerLanguage`
## 2.6.0
- Close sidebar after clicking a link on mobile
- Add root for multilingual books: `gitbook.state.bookRoot`
- Fix color of h6 headings
- Fix bottom margin of lists and blockquotes
- Add Swedish translation (`sv`)
- Add Czech translation (`cs`)
- Fix locale names for `zh-hans` and `jp`
- Update plugin `search` to fix crashes
- Aceept case-incensitive structure files (README, GLOSSARY, etc)
## 2.5.2
- Fix custom stylesheets for ebook generation
- Trigger event `start` before `page.change`
## 2.5.1
- Fix calcul of `gitbook.state.root` when serving HTML index as `/`
## 2.5.0
- Font settings, sharing and search are externalized as default plugins
- Plugins can define a configuration schema in the manifest, this schema will be used to validate configuration during build
- New Node.js API for plugin: `book.formatString(type, content)`
- New client side API for website plugins: `gitbook.toolbar.createButton(opts)`
- Better header/footer for PDF, CSS wil be inlined to easily style the header/footer
- Cleaner table of contents for ebooks
- Support for RTL in ebook's table of contents
- Better colors for mobi (links and code blocks)
- Fix installation of plugins when using a pre-release
- Fix support for pre-releases
- Update asciidoc parser to remove git dependency
- Fix templating in imported content
- Fix querystring in image urls
- Normalize heading IDs like GitHub
- Use Arial as default font for PDFs
- Add `root`, `chapterTitle` and `filepath` to `gitbook.state` JS API
## 2.4.3
- Add ukrainian translation (`uk`)
- Add `book.json` configuration for maximum size of search index
- Improve reliability of summary parser
## 2.4.2
- Default plugins should not be installed by `gitbook install`
- Limit search index size to avoid crash during generation
- Fix code highlighting for html without language specified
- Fix warning message for gitbook version when building a multilingual book
## 2.4.1
- Fix disabling of default plugins, ex: `-highlight`
## 2.4.0
- Fix page being updated when user wants to open a link in a new tab
- Plugins can now replaced default code highlighter
- Add semantic information for screen readers (web version)
- Content references accept absolute paths, resolved to book folder
- Improve overall reliability
## 2.3.3
- Fix bug in SUMMARY parsing preventing multiple entries without filenames
## 2.3.2
- Fix blocks (like maths) in Asciidoc
- Fix error when checking gitbook version
## 2.3.1
- Fix black font color for ebooks (mobi, pdf and epub)
- Fix ISO code for korean language
- Fix korean translation
- Fix syntax highlighting for asciidoc
- Fix inline html escaping in markdown
- Add warning for file outside SUMMARY
- Force SUMMARY entries to be unique by filename
## 2.3.0
- Fix nunjucks issue with multiple `{% raw %}` blocks
- Fix crash when git conref failed
- Fix crash when failed to download remote image (better error message)
- Fix flicking effect when changing page (big UX improvement)
- Add Hebrew translation (`he`)
- Add utility method `book.config.get` for plugins
- Hooks `page:before` and `page` are no longer deprecated
- Remove webfonts to make website lighter
- Make glossary's order case insensitive
## 2.2.0
- Fix direction in code blocks (always LTR)
- Add options `chapterMark` and `pageBreaksBefore` for PDF
- Update code highlighting library
- `book.json` accessible as `config` in templating syntax
- Add Vietnamese translation (`vi`)
## 2.1.0
- Fix error in calcul of `levels` in table of contents, error introduced a few versions ago
- Add optional `styles/print.css` to replace `print.css` used in ebook
## 2.0.4
- Fix `{% raw %}`, got confused with "fake" variable declarations
- Fix title of language chooser
- Fix the X-UA-Compatible meta tag
- Move style sheets to the <head> section
## 2.0.3
- Fix `gitbook init` for SUMMARY with empty entries
- Fix escaping of code blocks in markdown
## 2.0.2
- Fix relative links in windows
- Improve watcher in serve command (switch to chokidar)
- Add Romanian translation (`ro`)
- Add Finish translation (`fi`)
- Add Japanese translation (`jp`)
- Add Korean translation (`kr`)
## 2.0.1
- Improve error logging (display file, line and column)
- Add back support for `options.originalInput`
- Don't process math in markdown parser (delegated to `mathjax` plugin)
- Fix some cases of code blocks escaping
- Fix i18n for introduction title in json format
- Fix reload when book configuration is updated
- Fix backslashes in url when building on windows
## 2.0.0
- Fix page title of introduction
- Ignore codeblocks when replacing glossary terms
- Improve Unit Tests
- Fix scrolling position in website when preparing page
## 2.0.0-beta.5
- Fix progress order in json format
## 2.0.0-beta.4
- Fix default generator for use programmatically
- Add option "author" for html meta tags
- Fix links normalization (content and hash)
## 2.0.0-beta.3
- Fix odd cases with code blocks escaping
## 2.0.0-beta.2
- Fix definition of entry point title using SUMMARY.md
## 2.0.0-beta.1
- Fix windows incompatibility
- Add support for rtl (enabled by default for `ar` and `fa`)
- Escape code blocks in markdown parser
- Add Persian/Farsi translation (`fa`)
- Add Arabic translation (`ar`)
- Add Bengali translation (`bn`)
- Provide generator name in template context
## 2.0.0-alpha.9
- Fix links in sidebar
- Fix normalization of html link (README to index)
- Fix html snippets escaping
## 2.0.0-alpha.8
- Improve locale detection for i18n
- Fix chapter name for Glossary in pdf
- Don't escape html in glossary items
- Fix generation of multilingual book as ebook
- Add "post" block attribute to post-process
## 2.0.0-alpha.7
- Fix display of glossary in ebook formats
- Add default footer and header to pdf
- Fix generation of json format compatible with 1.x.x
- Add Simplifiled Chinese and Traditional Chinese translations
## 2.0.0-alpha.6
- Add es and pt translations
- Fix replacement of glossary terms
## 2.0.0-alpha.5
- Fix copy of files/covers
- Add back `finish:before` hook
## 2.0.0-alpha.4
- Fix copy of cover for multilingal books
## 2.0.0-alpha.3
- Norwegian translation
- Load plugins from book in priority
## 2.0.0-alpha.3
- Fix init command
- Update parsers to fix spaces in summary (`gitbook-parsers@0.3.1`)
## 2.0.0-alpha.1
- Externalize parsing into `gitbook-parsers` module
- Supports AsciiDoc and reStructuredText
- Hooks for page (`page:*`) are now deprecated, plugins should extend filters and blocks instead
- Hooks `summary` and `glossary` (after and before) have been removed
- Exercises and Quizzes are no longer parsed in the markdown parser
- Support for more markdown extensions: `.markdown`, `.mdown`
- Templates are rendered with nunjucks instead of swig, syntax is almost compatible, there is some changes with contexts and filters. `{{ super() }}` should be use instead of `{% parent %}`
- Clean output folder on build without removing `.git` and `.svn`
- MathJAX is no longer a default plugin
- SVG images are converted to PNG during generation of ebooks
- i18n in website and ebook (ru, it, de, fr)
- New templating syntax
- Content references (both internal and external)
- Glossary terms are handled during generation (also in ebook format)
## 1.5.0
- Fix `serve` command, broken by `1.4.2`
- Add nicer `dark` theme :)
## 1.4.2
- Force `process.exit` after builds, to prevent (possibly) lingering plugins
## 1.4.1
- Fix command 'install' without arguments
## 1.4.0
- Add command `gitbook install` to install plugins from book.json
- `package.json` is no longer necessary
## 1.3.4
- Add glossary to ebooks
- Fix autocover with new hook "finish:before"
- Add X-UA-Compatible meta tag for IE
## 1.3.3
- Fix parsing of lexed content using the client library
## 1.3.2
- ePub files are now passing validation from epubcheck
- Fix replacement of multiple glossary terms in a single sentence
- Fix on windows deep relative links
- Fix search indexer
## 1.3.1
- Fix error with links in markdown
## 1.3.0
- Bundle gitbook parsing library as a client side library in `gitbook.js` and `gitbook.min.js`
## 1.2.0
- Improvements on ebook generation
- Fix incorrect follow of links in ebook generation
- Move Table of Contents at the beginning of the ebook
- Update to last highlight.js (includes Swift)
- Includes of templates and variables (from book.json)
## 1.1.1
- Rewrite quiz logic to be more robust
- Improve integration of glossary
- Improve generation of ebook by using a multiple HTML pages input source
- Fix incorrect page breaks after h1 and h2 divs
- New options to set header and footer in PDF generation
## 1.1.0
- Plugins can now extend the ebook generation (pdf, epub, mobi)
- Update `kramed` to version 0.4.3
## 1.0.3
- Update `mathjax` plugin and MathJAx to version 2.4
- Update `highlight.js` to 8.2.0
## 1.0.2
- Update `mathjax` plugin, fixes issues with inline math rendering (no longer wanted)
## 1.0.1
- New inline math convention (kramdown's), using `$$` rather than `$` as delimiters
- Fix instapaper sharing
- The `exercises` & `quizzes` plugins are now by default
## 1.0.0
- New design
- Support for glossary
- Support for sharing to instapaper
- Support for footnotes
## 0.7.1
- Update `fs-extra` to `0.10.0` (fixes potential race conditions)
## 0.7.0
- Add page break in ebook (pdf, epub, mobi) between chapters/articles
- Start using kramed instead of marked
- Fix display of inline math
- Switch to graceful-fs to fix EMFILE errors
- Add sharing to weibo.com
## 0.6.2
- Support generating a plugin's book info dynamically
- Improve navigation on dark theme
- Improve path normalization when parsing SUMMARY.md
## 0.6.0
- Generate header id the same as github
- Custom links can be added at top of sidebar
- Summary can now be transformed by plugins
- Support importing code snippets
+201 -674
View File
@@ -1,674 +1,201 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2014 FriendCode Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+32 -157
View File
@@ -1,176 +1,51 @@
<h1 align="center">GitBook</h1>
GitBook
=======
<p align="center">
<a href="https://gitbook.com/docs/">Docs</a> - <a href="https://github.com/GitbookIO/community">Community</a> - <a href="https://developer.gitbook.com/">Developer Docs</a> - <a href="https://changelog.gitbook.com/">Changelog</a> - <a href="https://github.com/GitbookIO/gitbook/issues/new?assignees=&labels=bug&template=bug_report.md">Bug reports</a> - <a href="https://github.com/orgs/GitbookIO/discussions/categories/feature-requests">Feature requests</a>
</p>
[![NPM version](https://badge.fury.io/js/gitbook.svg)](http://badge.fury.io/js/gitbook)
[![Linux Build Status](https://travis-ci.org/GitbookIO/gitbook.png?branch=master)](https://travis-ci.org/GitbookIO/gitbook)
[![Windows Build status](https://ci.appveyor.com/api/projects/status/63nlflxcwmb2pue6?svg=true)](https://ci.appveyor.com/project/GitBook/gitbook)
[![Slack Status](https://slack.gitbook.com/badge.svg)](https://slack.gitbook.com)
<p align="center">
<a href="https://gitbook.com"><img src="https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1"></a>
<a href="#"><img src="https://img.shields.io/badge/Open_Source-❤️-FDA599?"/></a>
<a href="/LICENSE"><img src="https://img.shields.io/badge/License-GNU_GPLv3-F4E28D"/></a>
<a href="/.github/CONTRIBUTING.md"><img src="https://img.shields.io/github/contributors/gitbookIO/gitbook"/></a>
<a href="https://github.com/gitbookIO/gitbook/issues"><img src="https://img.shields.io/github/issues/gitbookIO/gitbook"/></a>
</p>
GitBook is a command line tool (and Node.js library) for building beautiful books using GitHub/Git and Markdown (or AsciiDoc). Here is an example: [Learn Javascript](https://www.gitbook.com/book/GitBookIO/javascript).
<p align="center">Welcome to GitBook, the platform for managing technical knowledge for teams.</p>
You can publish and host books easily online using [gitbook.com](https://www.gitbook.com). A desktop editor is [also available](https://www.gitbook.com/editor).
<p align="center">This repository contains the open source code used to render GitBook's published content.</p>
Check out the [GitBook Community Slack Channel](https://slack.gitbook.com), Stay updated by following [@GitBookIO](https://twitter.com/GitBookIO) on Twitter or [GitBook](https://www.facebook.com/gitbookcom) on Facebook.
<p align="center">
<img alt="GitBook Open Published Site" src="./assets/published-site.png">
</p>
Complete documentation is available at [toolchain.gitbook.com](http://toolchain.gitbook.com/).
## Table of Contents
![Image](https://raw.github.com/GitbookIO/gitbook/master/preview.png)
- [Getting Started](#getting-started)
- [Contributing](#contributing)
- [Types of contributions](#types-of-contributions)
- [Licensing](#license)
- [Acknowledgements](#acknowledgements)
- [Legacy GitBook](#legacy-gitbook-deprecated)
## Getting started
## Getting Started
GitBook can be used either on your computer for building local books or on GitBook.com for hosting them. To get started, check out [the installation instructions in the documentation](docs/setup.md).
To run a local version of this project, please follow these simple steps.
## Usage examples
### Prerequisites
GitBook can be used to create book, public documentation, enterprise manual, thesis, research papers, etc.
- Node.js (Version: >=20.6)
- Use nvm for easy Node management
- [Bun](https://bun.sh/) (Version: >=1.2.15)
- We use a text-based lockfile which isn't supported below 1.2.15
You can find a [list of real-world examples](docs/examples.md) in the documentation.
### Set up
## Help and Support
1. Clone the repo into a **public** GitHub repository. If you plan to distribute the code, keep the source code public to comply with GNU GPLv3. To clone in a private repository, acquire a [commercial license](https://www.gitbook.com/pricing).
We're always happy to help out with your books or any other questions you might have. You can ask a question on the following contact form at [gitbook.com/contact](https://www.gitbook.com/contact) or signal an issue on [GitHub](https://github.com/GitbookIO/gitbook).
```
git clone https://github.com/gitbookIO/gitbook.git
```
## Features
2. Ensure you are using the project's version of `node`. Running `nvm use` will change your local version to the correct one.
* Write using [Markdown](http://toolchain.gitbook.com/syntax/markdown.html) or [AsciiDoc](http://toolchain.gitbook.com/syntax/asciidoc.html)
* Output as a website or [ebook (pdf, epub, mobi)](http://toolchain.gitbook.com/ebook.html)
* [Multi-Languages](http://toolchain.gitbook.com/languages.html)
* [Lexicon / Glossary](http://toolchain.gitbook.com/lexicon.html)
* [Cover](http://toolchain.gitbook.com/ebook.html)
* [Variables and Templating](http://toolchain.gitbook.com/templating/)
* [Content References](http://toolchain.gitbook.com/templating/conrefs.html)
* [Plugins](http://toolchain.gitbook.com/plugins/)
* [Beautiful default theme](https://github.com/GitbookIO/theme-default)
3. Install the project's dependencies through Bun.
## Publish your book
```
bun install
```
The platform [GitBook.com](https://www.gitbook.com/) is like an "Heroku for books": you can create a book on it (public, or private) and update it using **git push**.
4. Start your local development server.
## Licensing
```
bun dev
```
6. Open a published GitBook space in your web browser, prefixing it with `http://localhost:3000/url`.
examples:
- http://localhost:3000/url/gitbook.com/docs
- http://localhost:3000/url/open-source.gitbook.io/midjourney
Any published GitBook site can be accessed through your local development instance, and any updates you make to the codebase will be reflected in your browser.
### CI and testing
All pull-requests will be tested against both visual and performances testing to prevent regressions.
## Fonts and Icons
GitBook Open uses fontawesome. During development, your local environment will use the free version. However, only the pro version will be accepted by CI. If you see the following error:
```
The GitBook icon is missing. It indicates that the dependencies were installed without the correct font-awesome package. These changes have probably been persisted in the Bun lockfile. Read the README for more information.
```
It means that you've changed the GBO dependencies and bundled in the free version. Only GitBook staff can help with this - if you're not on the GitBook team, please ping us in the PR and we'll help get things moving.
If you are GitBook staff, you'll need our NPM token in your local environment.
```
.env.local
NPM_TOKEN_READONLY=xxx
```
and then reinstall dependencies.
## Contributing
GitBook's rendering engine is fully open source and built on top of [Next.js](https://nextjs.org/). Head to our [contributing guide](https://github.com/GitbookIO/gitbook/blob/main/.github/CONTRIBUTING.md) to learn more about the workflow on adding your first Pull Request.
### Types of contributions
We encourage you to contribute to GitBook to help us build the best tool for documenting technical knowledge. If you're looking for some quick ways to contribute, continue reading to learn more about popular contributions.
#### Translations
The GitBook UI is rendered using a set of translation files found in [`packages/gitbook/src/intl/translations`](/packages/gitbook/src/intl/translations/). We welcome all additional translations for the UI.
#### Bugs
Encounter a bug or find an issue you'd like to fix? Helping us fix issues related to GitBook greatly improves the experience for everyone. Head to the issues section of this repository to learn more about the types of bugs you can already help out with.
## Deployment
> [!WARNING]
> While it is possible to self-host this project, we do not recommend this unless you are certain this option fits your need.
>
> _Looking to add a specific feature in GitBook? Head to our [contributing guide](https://github.com/GitbookIO/gitbook/blob/main/.github/CONTRIBUTING.md) to get started._
>
> Self-hosting this project puts the responsibility of maintaining and merging future updates on **you**. We cannot guarantee support, maintenance, or updates to forked and self-hosted instances of this project.
>
> We want to make it as easy as possible for our community to collaborate and push the future of GitBook, which is why we encourage you to contribute to our product directly instead of creating your own version.
This project allows you to self-host the rendering portion of your GitBook published content. Self-hosting has pros and cons.
On the pro side, you can customize the look and feel of your content, and better embed your documentation in your application.
On the con side, you become responsible for the reliability of your published site, and keeping the renderer up-to-date with the changes made to the GitBook platform.
## License
Distributed under the [GNU GPLv3 License](https://github.com/GitBookIO/gitbook/blob/main/LICENSE).
If you plan to distribute the code, you must make the source code public to comply with the GNU GPLv3. To clone in a private repository, acquire a [commercial license](https://www.gitbook.com/pricing).
See `LICENSE` for more information.
## Badges
<p align="left">
<a href="https://gitbook.com"><img src="https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1"></a>
<a href="https://gitbook.com"><img src="https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=F4E28D"></a>
<a href="https://gitbook.com"><img src="https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=FDA599"></a>
</p>
```md
[![GitBook](https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1)](https://www.gitbook.com/preview?utm_source=gitbook_readme_badge&utm_medium=organic&utm_campaign=preview_documentation&utm_content=link)
```
```html
<a href="https://www.gitbook.com/preview?utm_source=gitbook_readme_badge&utm_medium=organic&utm_campaign=preview_documentation&utm_content=link">
<img
src="https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1"
/>
</a>
```
## Acknowledgements
GitBook wouldn't be possible without these projects:
- [Next.js](https://nextjs.org/)
- [Bun](https://bun.sh/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Framer Motion](https://www.npmjs.com/package/framer-motion)
## Contributors
<a href="https://github.com/gitbookIO/gitbook/graphs/contributors">
<img src="https://contrib.rocks/image?repo=gitbookIO/gitbook" />
</a>
## Legacy GitBook (Deprecated)
Our previous version of GitBook and it's CLI tool are now deprecated. You can still view the old repository and it's commits on this [branch](https://github.com/GitbookIO/gitbook/tree/legacy).
GitBook is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text.
+38
View File
@@ -0,0 +1,38 @@
# Fix line endings in Windows. (runs before repo cloning)
init:
- git config --global core.autocrlf input
# Test against these versions of Node.js.
environment:
matrix:
- nodejs_version: "6"
- nodejs_version: "5"
- nodejs_version: "4"
matrix:
fast_finish: true
# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
- set CI=true
# install svgexport
- npm install svgexport -g
# install modules
- npm install
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
# run tests
- npm test
# Don't actually build.
build: off
# Clone only last commit
shallow_clone: true
clone_depth: 1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 KiB

Executable
+8
View File
@@ -0,0 +1,8 @@
#! /usr/bin/env node
/* eslint-disable no-console */
var color = require('bash-color');
console.log(color.red('You need to install "gitbook-cli" to have access to the gitbook command anywhere on your system.'));
console.log(color.red('If you\'ve installed this package globally, you need to uninstall it.'));
console.log(color.red('>> Run "npm uninstall -g gitbook" then "npm install -g gitbook-cli"'));
-175
View File
@@ -1,175 +0,0 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"ignore": [
"**/node_modules/**/*",
"**/dist/**/*",
"**/build/**/*",
"**/public/**/*",
"**/.next/**/*",
"**/.open-next/**/*",
"**/.turbo/**/*",
"**/.vercel/**/*",
"**/.cache/**/*",
"**/.wrangler/**/*",
"packages/openapi-parser/src/fixtures/**/*",
"packages/emoji-codepoints/index.ts",
"packages/icons/src/data/*.json",
"packages/gitbook/worker-configuration.d.ts"
]
},
"formatter": {
"enabled": true,
"useEditorconfig": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 4,
"lineEnding": "lf",
"lineWidth": 100,
"attributePosition": "auto",
"bracketSpacing": true
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"performance": {
"noDelete": "warn"
},
"security": {
"noDangerouslySetInnerHtml": "off"
},
"complexity": {
"noForEach": "off",
"noUselessFragments": "warn",
"noBannedTypes": "warn"
},
"correctness": {
"noUndeclaredVariables": "error",
"noUnusedVariables": "error",
"useArrayLiterals": "error",
"useHookAtTopLevel": "error",
"noUnusedImports": "error",
"noVoidElementsWithChildren": "warn",
"useJsxKeyInIterable": "warn",
"useExhaustiveDependencies": "warn",
"noUnknownFunction": "warn"
},
"style": {
"noNonNullAssertion": "warn",
"noParameterAssign": "off",
"useThrowOnlyError": "error"
},
"suspicious": {
"noConsole": {
"level": "warn",
"options": {
"allow": ["assert", "error", "warn"]
}
},
"noExplicitAny": "warn",
"noImplicitAnyLet": "warn",
"noConfusingVoidType": "warn",
"noControlCharactersInRegex": "warn",
"noPrototypeBuiltins": "warn",
"noAssignInExpressions": "warn",
"noArrayIndexKey": "warn"
},
"a11y": {
"useSemanticElements": "warn",
"useKeyWithClickEvents": "warn",
"noSvgWithoutTitle": "warn",
"useButtonType": "warn",
"useIframeTitle": "warn",
"useAltText": "warn",
"noPositiveTabindex": "warn",
"useFocusableInteractive": "warn",
"useAriaPropsForRole": "warn",
"useValidAnchor": "warn",
"noLabelWithoutControl": "warn",
"noNoninteractiveTabindex": "warn"
},
"nursery": {
"useSortedClasses": {
"level": "error",
"fix": "safe",
"options": {
"attributes": ["class", "className", "style"],
"functions": ["clsx", "tw"]
}
}
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "es5",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSpacing": true
}
},
"overrides": [
{
"include": [
"packages/gitbook/**/*",
"packages/react-openapi/**/*",
"packages/react-math/**/*",
"packages/react-contentkit/**/*",
"packages/icons/**/*"
],
"javascript": {
"globals": ["React"]
}
},
{
"include": ["packages/gitbook/**/*"],
"javascript": {
"globals": ["React", "GitBookIntegrationEvent"]
}
},
{
"include": ["*.css"],
"javascript": {
"globals": ["theme"]
}
},
{
"include": ["*.test.ts", "packages/gitbook/tests/**/*"],
"javascript": {
"globals": ["Bun"]
}
},
{
"include": [
"packages/cache-do/**/*",
"packages/gitbook/cf-env.d.ts",
"packages/gitbook/src/cloudflare-entrypoint.ts"
],
"javascript": {
"globals": [
"DurableObjectLocationHint",
"DurableObjectNamespace",
"DurableObjectStub",
"ContinentCode",
"Fetcher",
"ExportedHandler"
]
}
}
]
}
+23
View File
@@ -0,0 +1,23 @@
var pkg = require('./package.json');
module.exports = {
// Documentation for GitBook is stored under "docs"
root: './docs',
title: 'GitBook Toolchain Documentation',
// Enforce use of GitBook v3
gitbook: '>=3.0.0-pre.0',
// Use the "official" theme
plugins: ['theme-official', 'sitemap'],
variables: {
version: pkg.version
},
pluginsConfig: {
sitemap: {
hostname: 'https://toolchain.gitbook.com'
}
}
};
-5234
View File
File diff suppressed because it is too large Load Diff
-2
View File
@@ -1,2 +0,0 @@
[install.scopes]
"gitbook" = { token = "$NPM_TOKEN_READONLY", url = "https://registry.npmjs.org" }
+26
View File
@@ -0,0 +1,26 @@
# GitBook Toolchain Documentation
This document aims to be a comprehensive guide to GitBook. It contains the full documentation for version **{{ book.version }}**. Help for GitBook.com specific questions can be found at [help.gitbook.com](https://help.gitbook.com).
### What is GitBook?
GitBook is a command line tool (and Node.js library) for building beautiful books using GitHub/Git and Markdown (or AsciiDoc). . This documentation has been generated using GitBook.
GitBook can output your content as a website ([customizable](themes/README.md) and [extensibles](plugins/README.md)) or as an ebook (PDF, ePub or Mobi).
[GitBook.com](https://www.gitbook.com) is the online platform to create and host books built using the GitBook format. It offers hosting, collaboration features and an [easy-to-use editor](https://www.gitbook.com/editor).
### Help and Support
We're always happy to help out with your books or any other questions you might have. You can ask a question on the following contact form at [gitbook.com/contact](https://www.gitbook.com/contact) or signal an issue on [GitHub](https://github.com/GitbookIO/gitbook).
Check out the [GitBook Community Slack Channel](https://slack.gitbook.com), Stay updated by following [@GitBookIO](https://twitter.com/GitBookIO) on Twitter or [GitBook](https://www.facebook.com/gitbookcom) on Facebook.
### FAQ
Some questions are frequently asked. If you have a problem you should [check this out](faq.md) first.
### Contribute to this documentation
You can contribute to improve this documentation on [GitHub](https://github.com/GitbookIO/gitbook) by signaling issues or proposing changes.
+50
View File
@@ -0,0 +1,50 @@
# Summary
### Getting Started
* [About this documentation](README.md)
* [Installation and Setup](setup.md)
### Your Content
* [Directory structure](structure.md)
* [Pages and Summary](pages.md)
* [Configuration](config.md)
* [Glossary](lexicon.md)
* [Multi-Lingual](languages.md)
* [Markdown](syntax/markdown.md)
* [Headings](syntax/markdown.md#headings)
* [Paragraphs](syntax/markdown.md#paragraphs)
* [Lists](syntax/markdown.md#lists)
* [Links](syntax/markdown.md#links)
* [Images](syntax/markdown.md#images)
* [Blockquotes](syntax/markdown.md#blockquotes)
* [Tables](syntax/markdown.md#tables)
* [Code](syntax/markdown.md#code)
* [HTML](syntax/markdown.md#html)
* [Footnotes](syntax/markdown.md#footnotes)
* [AsciiDoc](syntax/asciidoc.md)
* [eBook and PDF](ebook.md)
### Customization
* [Templating](templating/README.md)
* [Content References](templating/conrefs.md)
* [Variables](templating/variables.md)
* [Builtin](templating/builtin.md)
* [Plugins](plugins/README.md)
* [Create a plugin](plugins/create.md)
* [Hooks](plugins/hooks.md)
* [Blocks](plugins/blocks.md)
* [Filters](plugins/filters.md)
* [API & Context](plugins/api.md)
* [Test your plugin](plugins/testing.md)
* [Theming](themes/README.md)
--
* [FAQ](faq.md)
* [Examples](examples.md)
* [Release notes](https://github.com/GitbookIO/gitbook/blob/master/CHANGES.md)
+26
View File
@@ -0,0 +1,26 @@
{% extends template.self %}
{% block header_nav %}
<a href="https://github.com/GitbookIO/gitbook/blob/master/docs/{{ file.path }}" target="_blank" class="btn btn-link pull-right hidden-xs">
<i class="octicon octicon-mark-github"></i> Edit on GitHub
</a>
<a href="{{ "faq.md"|resolveFile }}" class="btn btn-link pull-right hidden-xs">
F.A.Q
</a>
<a href="https://github.com/GitbookIO/gitbook/blob/master/CHANGES.md" target="_blank" class="btn btn-link pull-right hidden-xs">
{{ book.version }}
</a>
{% endblock %}
{% block page %}
{{ super() }}
<hr>
<div class="btn-group btn-group-justified">
{% if page.previous and page.previous.path %}
<a class="btn" href="{{ page.previous.path|resolveFile }}"><b>Previous:</b> {{ page.previous.title }}</a>
{% endif %}
{% if page.next and page.next.path %}
<a class="btn" href="{{ page.next.path|resolveFile }}"><b>Next:</b> {{ page.next.title }}</a>
{% endif %}
</div>
{% endblock %}
+55
View File
@@ -0,0 +1,55 @@
# Configuration
GitBook allows you to customize your book using a flexible configuration. These options are specified in a `book.json` file. For authors unfamiliar with the JSON syntax, you can validate the syntax using tools such as [JSONlint](http://jsonlint.com).
### General Settings
| Variable | Description |
| -------- | ----------- |
| `root` | Path to the root folder containing all the book's files, except `book.json`|
| `structure` | To specify paths for Readme, Summary, Glossary etc. See [Structure paragraph](#structure). |
| `title` | Title of your book, default value is extracted from the README. On GitBook.com this field is pre-filled. |
| `description` | Description of your book, default value is extracted from the README. On GitBook.com this field is pre-filled. |
| `author` | Name of the author. On GitBook.com this field is pre-filled. |
| `isbn` | ISBN of the book |
| `language` | [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) of the book's language, default value is `en` |
| `direction` | Text's direction. Can be `rtl` or `ltr`, the default value depends on the value of `language` |
| `gitbook` | Version of GitBook that should be used. Uses the [SemVer](http://semver.org) specification and accepts conditions like `">= 3.0.0"` |
### Plugins
Plugins and their configurations are specified in the `book.json`. See [the plugins section](plugins/README.md) for more details.
Since version 3.0.0, GitBook can use themes. See [the theming section](themes/README.md) for more details.
| Variable | Description |
| -------- | ----------- |
| `plugins` | List of plugins to load |
| `pluginsConfig` |Configuration for plugins |
### Structure
In addition to the `root` variable, you can tell Gitbook the name of the files for Readme, Summary, Glossary, Languages (instead of using the default names such as `README.md`).
These files must be at the root of your book (or the root of every language book). Paths such as `dir/MY_README.md` are not accepted.
| Variable | Description |
| -------- | ----------- |
| `structure.readme` | Readme file name (defaults to `README.md`) |
| `structure.summary` | Summary file name (defaults to `SUMMARY.md`) |
| `structure.glossary` | Glossary file name (defaults to `GLOSSARY.md`) |
| `structure.languages` | Languages file name (defaults to `LANGS.md`) |
### PDF Options
PDF Output can be customized using a set of options in the `book.json`:
| Variable | Description |
| -------- | ----------- |
| `pdf.pageNumbers` | Add page numbers to the bottom of every page (default is `true`) |
| `pdf.fontSize` | Base font size (default is `12`) |
| `pdf.fontFamily` | Base font family (default is `Arial`) |
| `pdf.paperSize` | Paper size, options are `'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'legal', 'letter'` (default is `a4`) |
| `pdf.margin.top` | Top margin (default is `56`) |
| `pdf.margin.bottom` | Bottom margin (default is `56`) |
| `pdf.margin.right` | Right margin (default is `62`) |
| `pdf.margin.left` | Left margin (default is `62`) |
+41
View File
@@ -0,0 +1,41 @@
# Generating eBooks and PDFs
GitBook can generates a website, but can also output content as ebook (ePub, Mobi, PDF).
```
# Generate a PDF file
$ gitbook pdf ./ ./mybook.pdf
# Generate an ePub file
$ gitbook epub ./ ./mybook.epub
# Generate a Mobi file
$ gitbook mobi ./ ./mybook.mobi
```
### Installing ebook-convert
`ebook-convert` is required to generate ebooks (epub, mobi, pdf).
##### OS X
Download the [Calibre application](https://calibre-ebook.com/download). After moving the `calibre.app` to your Applications folder create a symbolic link to the ebook-convert tool:
```
$ sudo ln -s ~/Applications/calibre.app/Contents/MacOS/ebook-convert /usr/bin
```
You can replace `/usr/bin` with any directory that is in your $PATH.
### Cover
Covers are used for all the ebook formats. You can either provide one yourself, or generate one using the [autocover plugin](https://plugins.gitbook.com/plugin/autocover).
To provide a cover, place a **`cover.jpg`** file at the root directory of your book. Adding a **`cover_small.jpg`** will specify a smaller version of the cover. The cover should be a **JPEG** file.
A good cover should respect the following guidelines:
* Size of 1800x2360 pixels for `cover.jpg`, 200x262 for `cover_small.jpg`
* No border
* Clearly visible book title
* Any important text should be visible in the small version
+27
View File
@@ -0,0 +1,27 @@
---
description: Real world examples of content published using GitBook.
---
# Examples
More than 50,000 books have been published on [GitBook.com](https://www.gitbook.com/explore).
### Books
- [Front-end Handbook](https://www.gitbook.com/book/frontendmasters/front-end-handbook/details) by [Cody Lindley](http://codylindley.com)
- [How to make an Operating System](https://www.gitbook.com/book/samypesse/how-to-create-an-operating-system/details) by [@SamyPesse](https://github.com/SamyPesse)
- [Building Web Apps with Go](https://www.gitbook.com/book/codegangsta/building-web-apps-with-go/details) by [@codegangsta](https://github.com/codegangsta)
- [Django Girls Tutorial](http://tutorial.djangogirls.org/en/index.html) by [Django Girls](https://djangogirls.org)
- [Linux Inside](https://www.gitbook.com/book/0xax/linux-insides/details) by [0xAX](https://twitter.com/0xAX)
- [Learn Javascript](https://www.gitbook.com/book/gitbookio/javascript/details) by [GitBook](https://twitter.com/GitbookIO)
### Research Papers
- [TowCenter Collection](https://www.gitbook.com/@towcenter) by [Columbia Journalism School](http://www.journalism.columbia.edu/)
- [Block Relaxation Algorithms in Statistics](https://www.gitbook.com/@jandeleeuw) by Jan de Leeuw
### Documentation
- [DuckDuckHack Documentation](http://docs.duckduckhack.com) by [DuckDuckGo](https://duckduckgo.com/about)
- This documentation
+55
View File
@@ -0,0 +1,55 @@
# GitBook FAQ
This page gathers common questions and answers concerning the GitBook format and toolchain.
Questions about GitBook.com and the Editor are gather into the [help.gitbook.com's FAQ](http://help.gitbook.com/faq.html).
#### How can I host/publish my book?
Books can easily be published and hosted on [GitBook.com](https://www.gitbook.com). But GitBook output can be hosted on any static file hosting solution.
#### What can I use to edit my content?
Any text editor should work! But we advise using the [GitBook Editor](https://www.gitbook.com/editor). [GitBook.com](https://www.gitbook.com) also provides a web version of this editor.
---
#### Does GitBook supports RTL/bi-directional text ?
The GitBook format supports right to left, and bi-directional writing. To enable it, you either need to specify a language (ex: `ar`), or force GitBook to use RTL in your `book.json`:
``` json
{
"language": "ar",
"direction": "rtl"
}
```
With version 3.0 of GitBook, it's automatically detected according to the content.
_Note that, while the output book will indeed respect RTL, the Editor doesn't support RTL writing yet_.
#### Should I use an `.html` or `.md` extensions in my links?
You should always use paths and the `.md` extensions when linking to your files, GitBook will automatically replace these paths by the appropriate link when the pointing file is referenced in the Table of Contents.
#### Can I create a GitBook in a sub-directory of my repository?
Yes, GitBooks can be created in [sub-directories](structure.md#subdirectory). GitBook.com and the CLI also looks by default in a serie of [folders](structure.md).
#### Does GitBook supports RTL languages?
Yes, GitBook automatically detect the direction in your pages (`rtl` or `ltr`) and adjust the layout accordingly. The direction can also be specified globally in the [book.json](config.md).
---
#### Does GitBook support Math equations?
GitBook supports math equations and TeX thanks to plugins. There are currently 2 official plugins to display math: [mathjax](https://plugins.gitbook.com/plugin/mathjax) and [katex](https://plugins.gitbook.com/plugin/katex).
#### Can I customize/theme the output?
Yes, both the website and ebook outputs can be customized using [themes](themes/README.md).
#### Can I add interactive content (videos, etc)?
GitBook is very [extensible](plugins/README.md). You can use [existing plugins](https://plugins.gitbook.com) or create your own!
+17
View File
@@ -0,0 +1,17 @@
# Multi-Languages
GitBook supports building books written in multiple languages. Each language should be a sub-directory following the normal GitBook format, and a file named `LANGS.md` should be present at the root of the repository with the following format:
```markdown
# Languages
* [English](en/)
* [French](fr/)
* [Español](es/)
```
### Configuration for each language
When a language book (ex: `en`) has a `book.json`, its configuration will extend the main configuration.
The only exception is plugins, plugins are specified globally, and language specific plugins cannot be specified.
+14
View File
@@ -0,0 +1,14 @@
# Glossary
Allows you to specify terms and their respective definitions to be displayed as annotations. Based on those terms, GitBook will automatically build an index and highlight those terms in pages.
The `GLOSSARY.md` format is a list of `h2` headings, along with a description paragraph:
```markdown
## Term
Definition for this term
## Another term
With it's definition, this can contain bold text
and all other kinds of inline markup ...
```
+104
View File
@@ -0,0 +1,104 @@
# Pages and Summary
### Summary
GitBook uses a `SUMMARY.md` file to define the structure of chapters and subchapters of the book. The `SUMMARY.md` file is used to generate the book's table of contents.
The format of `SUMMARY.md` is just a list of links. The link's title is used as the chapter's title, and the link's target is a path to that chapter's file.
Adding a nested list to a parent chapter will create subchapters.
##### Simple example
```markdown
# Summary
* [Part I](part1/README.md)
* [Writing is nice](part1/writing.md)
* [GitBook is nice](part1/gitbook.md)
* [Part II](part2/README.md)
* [We love feedback](part2/feedback_please.md)
* [Better tools for authors](part2/better_tools.md)
```
Each chapter has a dedicated page (`part#/README.md`) and is split into subchapters.
##### Anchors
Chapters in the Table of Contents can be pointing to specific part of a file using anchor.
```markdown
# Summary
### Part I
* [Part I](part1/README.md)
* [Writing is nice](part1/README.md#writing)
* [GitBook is nice](part1/README.md#gitbook)
* [Part II](part2/README.md)
* [We love feedback](part2/README.md#feedback)
* [Better tools for authors](part2/README.md#tools)
```
##### Parts
The Table of Contents can be divided into parts separated by headings or horizontal lines:
```markdown
# Summary
### Part I
* [Writing is nice](part1/writing.md)
* [GitBook is nice](part1/gitbook.md)
### Part II
* [We love feedback](part2/feedback_please.md)
* [Better tools for authors](part2/better_tools.md)
----
* [Last part without title](part3/title.md)
```
Parts are just groups of chapters and do not have dedicated pages, but according to the theme, it will show in the navigation.
### Pages
#### Markdown syntax
Most of the files for GitBook use the Markdown syntax by default. GitBook infers your pages's structure from it. The syntax used is similar to the [GitHub Flavored Markdown syntax](https://guides.github.com/features/mastering-markdown/). One can also opt for the [AsciiDoc syntax](asciidoc.md).
##### Example of a chapter file
``` markdown
# Title of the chapter
This is a great introduction.
## Section 1
Markdown will dictates _most_ of your **book's structure**
## Section 2
...
```
#### Front Matter
Pages can contain an optional front matter. It can be used to define the page's description. The front matter must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines. Here is a basic example:
```yaml
---
description: This is a short description of my page
---
# The content of my page
...
```
The front matter can define variables of your own, they will be added to the [page variable](templating/variables.md) so you can use them in your templating.
+28
View File
@@ -0,0 +1,28 @@
# Plugins
Plugins are the best way to extend GitBook functionalities (ebook and website). There exist plugins to do a lot of things: bring math formulas display support, track visits using Google Analytic, etc.
### How to find plugins?
Plugins can be easily searched on [plugins.gitbook.com](https://plugins.gitbook.com).
### How to install a plugin?
Once you find a plugin that you want to install, you need to add it to your `book.json`:
```
{
"plugins": ["myPlugin", "anotherPlugin"]
}
```
You can also specify a specific version using: `"myPlugin@0.3.1"`. By default GitBook will resolve the latest version of the plugin compatbile with the current GitBook version.
### GitBook.com
Plugins are automatically installed on [GitBook.com](https://www.gitbook.com). Locally, run `gitbook install` to install and prepare all plugins for your books.
### Configuring plugins
Plugins specific configurations are stored in `pluginsConfig`. You have to refer to the documentation of the plugin itself for details about the available options.
+97
View File
@@ -0,0 +1,97 @@
# Context and APIs
GitBooks provides different APIs and contexts to plugins. These APIs can vary according to the GitBook version being used, your plugin should specify the `engines.gitbook` field in `package.json` accordingly.
#### Book instance
The `Book` class is the central point of GitBook, it centralize all access read methods. This class is defined in [book.js](https://github.com/GitbookIO/gitbook/blob/master/lib/book.js).
```js
// Read configuration from book.json
var value = book.config.get('title', 'Default Value');
// Resolve a filename to an absolute path
var filepath = book.resolve('README.md');
// Render an inline markup string
book.renderInline('markdown', 'This is **Markdown**')
.then(function(str) { ... })
// Render a markup string (block mode)
book.renderBlock('markdown', '* This is **Markdown**')
.then(function(str) { ... })
```
#### Output instance
The `Output` class represent the output/write process.
```js
// Return root folder for the output
var root = output.root();
// Resolve a file in the output folder
var filepath = output.resolve('myimage.png');
// Convert a filename to an URL (returns a path to an html file)
var fileurl = output.toURL('mychapter/README.md');
// Write a file in the output folder
output.writeFile('hello.txt', 'Hello World')
.then(function() { ... });
// Copy a file to the output folder
output.copyFile('./myfile.jpg', 'cover.jpg')
.then(function() { ... });
// Verify that a file exists
output.hasFile('hello.txt')
.then(function(exists) { ... });
```
#### Page instance
A page instance represent the current parsed page.
```js
// Title of the page (from SUMMARY)
page.title
// Content of the page (Markdown/Asciidoc/HTML according to the stage)
page.content
// Relative path in the book
page.path
// Absolute path to the file
page.rawPath
// Type of parser used for this file
page.type ('markdown' or 'asciidoc')
```
#### Context for Blocks and Filters
Blocks and filters have access to the same context, this context is bind to the template engine execution:
```js
{
// Current templating syntax
"ctx": {
// For example, after a {% set message = "hello" %}
"message": "hello"
},
// Book instance
"book" <Book>,
// Output instance
"output": <Output>
}
```
For example a filter or block function can access the current book using: `this.book`.
#### Context for Hooks
Hooks only have access to the `<Book>` instance using `this.book`.
+62
View File
@@ -0,0 +1,62 @@
# Extend Blocks
Extending templating blocks is the best way to provide extra functionalities to authors.
The most common usage is to process the content within some tags at runtime. It's like [filters](./filters.md), but on steroids because you aren't confined to a single expression.
### Defining a new block
Blocks are defined by the plugin, blocks is a map of name associated with a block descriptor. The block descriptor needs to contain at least a `process` method.
```js
module.exports = {
blocks: {
tag1: {
process: function(block) {
return "Hello "+block.body+", How are you?";
}
}
}
};
```
The `process` should return the html content that will replace the tag. Refer to [Context and APIs](./api.md) to learn more about `this` and GitBook API.
### Handling block arguments
Arguments can be passed to blocks:
```
{% tag1 "argument 1", "argument 2", name="Test" %}
This is the body of the block.
{% endtag1 %}
```
And arguments are easily accessible in the `process` method:
```js
module.exports = {
blocks: {
tag1: {
process: function(block) {
// block.args equals ["argument 1", "argument 2"]
// block.kwargs equals { "name": "Test" }
}
}
}
};
```
### Handling sub-blocks
A defined block can be parsed into different sub-blocks, for example let's consider the source:
```
{% myTag %}
Main body
{% subblock1 %}
Body of sub-block 1
{% subblock 2 %}
Body of sub-block 1
{% endmyTag %}
```
+74
View File
@@ -0,0 +1,74 @@
# Create and publish a plugin
A GitBook plugin is a node package published on NPM that follow a defined convention.
## Structure
#### package.json
The `package.json` is a manifest format for describing **Node.js modules**. GitBook plugins are built on top of Node modules. It declares dependencies, version, ownership, and other information required to run a plugin in GitBook. This document describes the schema in detail.
A plugin manifest `package.json` can also contain details about the required configuration. The configuration schema is defined in the `gitbook` field of the `package.json` (This field follow the [JSON-Schema](http://json-schema.org) guidelines):
```js
{
"name": "gitbook-plugin-mytest",
"version": "0.0.1",
"description": "This is my first GitBook plugin",
"engines": {
"gitbook": ">1.x.x"
},
"gitbook": {
"properties": {
"myConfigKey": {
"type": "string",
"default": "it's the default value",
"description": "It defines my awesome config!"
}
}
}
}
```
You can learn more about `package.json` from the [NPM documentation](https://docs.npmjs.com/files/package.json).
The **package name** must begin with `gitbook-plugin-` and the **package engines** should contains `gitbook`.
#### index.js
The `index.js` is main entry point of your plugin runtime:
```js
module.exports = {
// Map of hooks
hooks: {},
// Map of new blocks
blocks: {},
// Map of new filters
filters: {}
};
```
## Publish your plugin
GitBook plugins can be published on [NPM](https://www.npmjs.com).
To publish a new plugin, you need to create an account on [npmjs.com](https://www.npmjs.com) then publish it from the command line:
```
$ npm publish
```
## Private plugins
Private plugins can be hosted on GitHub and included using `git` urls:
```
{
"plugins": [
"myplugin@git+https://github.com/MyCompany/mygitbookplugin.git#1.0.0"
]
}
```
+57
View File
@@ -0,0 +1,57 @@
# Extend Filters
Filters are essentially functions that can be applied to variables. They are called with a pipe operator (`|`) and can take arguments.
```
{{ foo | title }}
{{ foo | join(",") }}
{{ foo | replace("foo", "bar") | capitalize }}
```
### Defining a new filter
Plugins can extend filters by defining custom functions in their entry point under the `filters` scope.
A filter function takes as first argument the content to filter, and should return the new content.
Refer to [Context and APIs](./api.md) to learn more about `this` and GitBook API.
```js
module.exports = {
filters: {
hello: function(name) {
return 'Hello '+name;
}
}
};
```
The filter `hello` can then be used in the book:
```
{{ "Aaron"|hello }}, how are you?
```
### Handling block arguments
Arguments can be passed to filters:
```
Hello {{ "Samy"|fullName("Pesse", man=true}} }}
```
Arguments are passed to the function, named-arguments are passed as a last argument (object).
```js
module.exports = {
filters: {
fullName: function(firstName, lastName, kwargs) {
var name = firstName + ' ' + lastName;
if (kwargs.man) name = "Mr" + name;
else name = "Mrs" + name;
return name;
}
}
};
```
+90
View File
@@ -0,0 +1,90 @@
# Hooks
Hooks is a method of augmenting or altering the behavior of the process, with custom callbacks.
### List of hooks
### Relative to the global pipeline
| Name | Description | Arguments |
| ---- | ----------- | --------- |
| `init` | Called after parsing the book, before generating output and pages. | None |
| `finish:before` | Called after generating the pages, before copying assets, cover, ... | None |
| `finish` | Called after everything else. | None |
### Relative to the page pipeline
> It is recommended using [templating](./templating.md) to extend page parsing.
| Name | Description | Arguments |
| ---- | ----------- | --------- |
| `page:before` | Called before running the templating engine on the page | Page Object |
| `page` | Called before outputting and indexing the page. | Page Object |
##### Page Object
```js
{
// Parser named
"type": "markdown",
// File Path relative to book root
"path": "page.md",
// Absolute file path
"rawpath": "/usr/...",
// Title of the page in the SUMMARY
"title": "",
// Content of the page
// Markdown/Asciidoc in "page:before"
// HTML in "page"
"content": "# Hello"
}
```
##### Example to add a title
In the `page:before` hook, `page.content` is the markdown/asciidoc content.
```js
{
"page:before": function(page) {
page.content = "# Title\n" +page.content;
return page;
}
}
```
##### Example to replace some html
In the `page` hook, `page.content` is the HTML generated from the markdown/asciidoc conversion.
```js
{
"page": function(page) {
page.content = page.content.replace("<b>", "<strong>")
.replace("</b>", "</strong>");
return page;
}
}
```
### Asynchronous Operations
Hooks callbacks can be asynchronous and return promises.
Example:
```js
{
"init": function() {
return writeSomeFile()
.then(function() {
return writeAnotherFile();
});
}
}
```
+22
View File
@@ -0,0 +1,22 @@
# Testing your plugin
### Testing your plugin locally
Testing your plugin on your book before plushing it is possible using [npm link](https://docs.npmjs.com/cli/link).
In the plugin's folder, run:
```
$ npm link
```
The nin your book's folder:
```
$ npm link gitbook-plugin-<plugin's name>
```
### Unit testing on Travis
[gitbook-tester](https://github.com/todvora/gitbook-tester) makes it easy to write **Node.js/Mocha** unit tests for your plugins. Using [Travis.org](https://travis.org), tests can be run on each commits/tags.
+69
View File
@@ -0,0 +1,69 @@
# Setup and Installation of GitBook
Getting GitBook installed and ready-to-go should only take a few minutes.
### GitBook.com
[GitBook.com](https://www.gitbook.com) is an easy to use solution to write, publish and host books. It is the easiest solution for publishing your content and collaborating on it.
It integrates well with the [GitBook Editor](https://www.gitbook.com/editor).
### Local Installation
##### Requirements
Installing GitBook is easy and straightforward. Your system just needs to meet these two requirements:
* NodeJS (v4.0.0 and above is recommended)
* Windows, Linux, Unix, or Mac OS X
##### Install with NPM
The best way to install GitBook is via **NPM**. At the terminal prompt, simply run the following command to install GitBook:
```
$ npm install gitbook-cli -g
```
`gitbook-cli` is an utility to install and use multiple versions of GitBook on the same system. It will automatically install the required version of GitBook to build a book.
##### Create a book
GitBook can setup a boilerplate book:
```
$ gitbook init
```
If you wish to create the book into a new directory, you can do so by running `gitbook init ./directory`
Preview and serve your book using:
```
$ gitbook serve
```
Or build the static website using:
```
$ gitbook build
```
##### Install pre-releases
`gitbook-cli` makes it easy to download and install other versions of GitBook to test with your book:
```
$ gitbook fetch beta
```
Use `gitbook ls-remote` to list remote versions available for install.
##### Debugging
You can use the options `--log=debug` and `--debug` to get better error messages (with stack trace). For example:
```
$ gitbook build ./ --log=debug --debug
```
+66
View File
@@ -0,0 +1,66 @@
# Directory Structure
GitBook uses a simple directory structure. All Markdown/Asciidoc files listed in the [SUMMARY](pages.md) will be transformed as HTML. Multi-Lingual books have a slightly [different structure](languages.md).
A basic GitBook usually looks something like this:
```
.
├── book.json
├── README.md
├── SUMMARY.md
├── chapter-1/
| ├── README.md
| └── something.md
└── chapter-2/
├── README.md
└── something.md
```
An overview of what each of these does:
| File | Description |
| -------- | ----------- |
| `book.json` | Stores [configuration](config.md) data (__optional__) |
| `README.md` | Preface / Introduction for your book (**required**) |
| `SUMMARY.md` | Table of Contents (See [Pages](pages.md)) (__optional__) |
| `GLOSSARY.md` | Lexicon / List of terms to annotate (See [Glossary](lexicon.md)) (__optional__) |
### Static files and Images
A static file is a file that is not listed in the `SUMMARY.md`. All static files, unless [ignored](#ignore), are copied to the output.
### Ignoring files & folders {#ignore}
GitBook will read the `.gitignore`, `.bookignore` and `.ignore` files to get a list of files and folders to skip.
The format inside those files, follows the same convention as `.gitignore`:
```
# This is a comment
# Ignore the file test.md
test.md
# Ignore everything in the directory "bin"
bin/*
```
### Project integration with subdirectory {#subdirectory}
For software projects, you can use a subdirectory (like `docs/`) to store the book for the project's documentation. You can configure the [`root` option](config.md) to indicate the folder where GitBook can find the book's files:
```
.
├── book.json
└── docs/
├── README.md
└── SUMMARY.md
```
With `book.json` containing:
```
{
"root": "./docs"
}
```
+65
View File
@@ -0,0 +1,65 @@
# AsciiDoc
Since version `2.0.0`, GitBook can also accept AsciiDoc as an input format.
Please refer to the [AsciiDoc Syntax Quick Reference](http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) for more informations about the format.
Just like for markdown, GitBook is using some special files to extract structures: `README.adoc`, `SUMMARY.adoc`, `LANGS.adoc` and `GLOSSARY.adoc`.
### README.adoc
This is the main entry of your book: the introduction. This file is **required**.
### SUMMARY.adoc
This file defines the list of chapters and subchapters. Just like in Markdown, the `SUMMARY.adoc`'s format is simply a list of links, the name of the link is used as the chapter's name, and the target is a path to that chapter's file.
Subchapters are defined simply by adding a nested list to a parent chapter.
```asciidoc
= Summary
. link:chapter-1/README.adoc[Chapter 1]
.. link:chapter-1/ARTICLE1.adoc[Article 1]
.. link:chapter-1/ARTICLE2.adoc[Article 2]
... link:chapter-1/ARTICLE-1-2-1.adoc[Article 1.2.1]
. link:chapter-2/README.adoc[Chapter 2]
. link:chapter-3/README.adoc[Chapter 3]
. link:chapter-4/README.adoc[Chapter 4]
.. Unfinished article
. Unfinished Chapter
```
### LANGS.adoc
For [Multi-Languages](./languages.md) books, this file is used to define the different supported languages and translations.
This file is following the same syntax as the `SUMMARY.adoc`:
```asciidoc
= Languages
. link:en/[English]
. link:fr/[French]
```
### GLOSSARY.adoc
This file is used to define terms. [See the glossary section](./lexicon.md).
```asciidoc
= Glossary
== Magic
Sufficiently advanced technology, beyond the understanding of the
observer producing a sense of wonder.
== PHP
A popular web programming language, used by many large websites such
as Facebook. Rasmus Lerdorf originally created PHP in 1994 to power
his personal homepage (PHP originally stood for "Personal Home Page"
but now stands for "PHP: Hypertext Preprocessor"). ```
+223
View File
@@ -0,0 +1,223 @@
# Markdown
Most of the examples from this documentation are in Markdown. Markdown is default parser for GitBook, but one can also opt for the [AsciiDoc syntax](asciidoc.md).
Heres an overview of Markdown syntax that you can use with GitBook (same as GitHub with some additions).
### Headings
To create a heading, add one to six `#` symbols before your heading text. The number of # you use will determine the size of the heading.
```markdown
# This is an <h1> tag
## This is an <h2> tag
###### This is an <h6> tag
```
GitBook supports a nice way for explicitly setting the header ID. If you follow the header text with an opening curly bracket (separated from the text with a least one space), a hash, the ID and a closing curly bracket, the ID is set on the header. If you use the trailing hash feature of atx style headers, the header ID has to go after the trailing hashes. For example:
```markdown
Hello {#id}
-----
# Hello {#id}
# Hello # {#id}
```
### Paragraphs and Line Breaks {#paragraphs}
A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line — a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs.
```
Here's a line for us to start with.
This line is separated from the one above by two newlines, so it will be a *separate paragraph*.
```
### Emphasis {#emphasis}
```markdown
*This text will be italic*
_This will also be italic_
**This text will be bold**
__This will also be bold__
~~This text will be crossed out.~~
_You **can** combine them_
```
### Lists {#lists}
Markdown supports ordered (numbered) and unordered (bulleted) lists.
##### Unordered
Unordered lists use asterisks, pluses, and hyphens — interchangably — as list markers:
```markdown
* Item 1
* Item 2
* Item 2a
* Item 2b
```
##### Ordered
Ordered lists use numbers followed by periods:
```markdown
1. Item 1
2. Item 2
3. Item 3
* Item 3a
* Item 3b
```
### Links {#links}
Markdown supports two style of links: inline and reference.
A simple link can be created by surrounding the text with square brackets and the link URL with parentheses:
```markdown
This is [an example](http://example.com/ "Title") inline link with a title.
[This link](http://example.net/) has no title attribute.
```
Links can point to relative paths, anchors or absolute urls.
### References
There is another way to create links which does not interrupt the text flow. The URL and title are defined using a reference name and this reference name is then used in square brackets instead of the link URL:
```markdown
This is [an example][id] reference-style link.
```
Then, anywhere in the document, you define your link label like this, on a line by itself:
```markdown
[id]: http://example.com/ "Optional Title Here"
```
### Images {#images}
Images can be created in a similar way than links: just use an exclamation mark before the square brackets. The link text will become the alternative text of the image and the link URL specifies the image source:
```markdown
An image: ![gras](img/image.jpg)
```
### Blockquotes {#blockquotes}
A blockquote is started using the `>` marker followed by an optional space; all following lines that are also started with the blockquote marker belong to the blockquote. You can use any block-level elements inside a blockquote:
```markdown
As Kanye West said:
> We're living the future so
> the present is our past.
```
### Tables {#tables}
You can create tables by assembling a list of words and dividing them with hyphens `-` (for the first row), and then separating each column with a pipe `|`:
```markdown
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
```
The pipes on either end of the table are optional. Cells can vary in width and do not need to be perfectly aligned within columns. There must be at least three hyphens in each column of the header row.
### Code {#code}
Markdown supports two different code block styles. One uses lines indented with either four spaces or one tab whereas the other uses lines with tilde characters as delimiters therefore the content does not need to be indented:
```markdown
This is a sample code block.
Continued here.
```
##### Fenced code blocks
You can create fenced code blocks by placing triple backticks ` ``` ` before and after the code block. We recommend placing a blank line before and after code blocks to make the raw formatting easier to read.
```
function test() {
console.log("notice the blank line before this function?");
}
```
##### Syntax highlighting
You can add an optional language identifier to enable syntax highlighting in your fenced code block.
For example, to syntax highlight Ruby code:
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
##### Inline code
Text phrases can be marked up as code by surrounding them with backticks:
Use `gitbook` to convert the `text` in markdown
syntax to HTML.
### Footnotes
GitBook supports a simple syntax for such footnotes. Footnotes are relative to each pages.
```markdown
Text prior to footnote reference.[^2]
[^2]: Comment to include in footnote.
```
### HTML
GitBook supports use of raw HTML in your text, Markdown syntax in HTML is not processed:
```
<div>
Markdown here will not be **parsed**
</div>
```
### Horizontal Rule
Horizontal Rules can be inserted using three or more asterisks, dashes or underscores, optionally separated by spaces or tabs, on an otherwise blank line:
```markdown
Three or more...
---
Hyphens
***
Asterisks
```
### Ignoring Markdown formatting
You can tell GitBook to ignore (or escape) Markdown formatting by using `\` before the Markdown character.
```
Let's rename \*our-new-project\* to \*our-old-project\*.
```
+99
View File
@@ -0,0 +1,99 @@
# Templating
GitBook uses the [Nunjucks templating language](https://mozilla.github.io/nunjucks/) to process pages and theme's templates.
The Nunjucks syntax is very similar to **Jinja2** or **Liquid**. Its syntax uses surrounding braces `{ }` to mark content that needs to be processed.
### Variables
A variable looks up a value from the template context. If you wanted to simply display a variable, you would use the `{{ variable }}` syntax. For example :
```twig
My name is {{ name }}, nice to meet you
```
This looks up username from the context and displays it. Variable names can have dots in them which lookup properties, just like JavaScript. You can also use the square bracket syntax.
```twig
{{ foo.bar }}
{{ foo["bar"] }}
```
If a value is undefined, nothing is displayed. The following all output nothing if foo is undefined: `{{ foo }}`, `{{ foo.bar }}`, `{{ foo.bar.baz }}`.
GitBook provides a set of [predefined variables](variables.md) from the context.
### Filters
Filters are essentially functions that can be applied to variables. They are called with a pipe operator (`|`) and can take arguments.
```twig
{{ foo | title }}
{{ foo | join(",") }}
{{ foo | replace("foo", "bar") | capitalize }}
```
The third example shows how you can chain filters. It would display "Bar", by first replacing "foo" with "bar" and then capitalizing it.
### Tags
##### if
`if` tests a condition and lets you selectively display content. It behaves exactly as JavaScript's `if` behaves.
```twig
{% if variable %}
It is true
{% endif %}
```
If variable is defined and evaluates to true, "It is true" will be displayed. Otherwise, nothing will be.
You can specify alternate conditions with `elif` and `else`:
```twig
{% if hungry %}
I am hungry
{% elif tired %}
I am tired
{% else %}
I am good!
{% endif %}
```
##### for
`for` iterates over arrays and dictionaries.
```twig
# Chapters about GitBook
{% for article in glossary.terms['gitbook'].articles %}
* [{{ article.title }}]({{ article.path }})
{% endfor %}
```
##### set
`set` lets you create/modify a variable.
```twig
{% set softwareVersion = "1.0.0" %}
Current version is {{ softwareVersion }}.
[Download it](website.com/download/{{ softwareVersion }})
```
##### include and block
Inclusion and inheritance is detailled in the [Content References](conrefs.md) section.
### Escaping
If you want GitBook to ignore any of the special templating tags, you can use raw and anything inside of it will be output as plain text.
``` twig
{% raw %}
this will {{ not be processed }}
{% endraw %}
```
+18
View File
@@ -0,0 +1,18 @@
# Builtin Templating Helpers
GitBook provides a serie of builtin filters and blocks to help you write templates.
### Filters
`value|default(default, [boolean])`If value is strictly undefined, return default, otherwise value. If boolean is true, any JavaScript falsy value will return default (false, "", etc)
`arr|sort(reverse, caseSens, attr)`
Sort arr with JavaScript's arr.sort function. If reverse is true, result will be reversed. Sort is case-insensitive by default, but setting caseSens to true makes it case-sensitive. If attr is passed, will compare attr from each item.
### Blocks
`{% markdown %}Markdown string{% endmarkdown %}`
Render inline markdown
`{% asciidoc %}AsciiDoc string{% endasciidoc %}`
Render inline asciidoc
+55
View File
@@ -0,0 +1,55 @@
# Content References
Content referencing (conref) is a convenient mechanism to reuse content from other files or books.
### Importing local files
Importing an other file's content is easy using the `include` tag:
```
{% include "./test.md" %}
```
### Importing file from another book
GitBook can also resolve the include path by using git:
```
{% include "git+https://github.com/GitbookIO/documentation.git/README.md#0.0.1" %}
```
The format of git url is:
```
git+https://user@hostname/owner/project.git/file#commit-ish
```
The real git url part should finish with `.git`, the filename to import is extracted after the `.git` till the fragment of the url.
The `commit-ish` can be any tag, sha, or branch which can be supplied as an argument to `git checkout`. The default is `master`.
### Inheritance
Template inheritance is a way to make it easy to reuse templates. When writing a template, you can define "blocks" that child templates can override. The inheritance chain can be as long as you like.
`block` defines a section on the template and identifies it with a name. Base templates can specify blocks and child templates can override them with new content.
```
{% extends "./mypage.md" %}
{% block pageContent %}
# This is my page content
{% endblock %}
```
In the file `mypage.md`, you should specify the blocks that can be extended:
```
{% block pageContent %}
This is the default content
{% endblock %}
# License
{% include "./LICENSE" %}
```
+86
View File
@@ -0,0 +1,86 @@
# Variables
The following is a reference of the available data during book's parsing and theme generation.
### Global Variables
| Variable | Description |
| -------- | ----------- |
| `book` | Book-wide information + configuration settings from `book.json`. See below for details. |
| `gitbook` | GitBook specific information |
| `page` | Current page specific information |
| `file` | File associated with the current page specific information |
| `readme` | Information about the Readme |
| `glossary` | Information about the Glossary |
| `summary` | Information about the table of contents |
| `languages` | List of languages for multi-lingual books |
| `output` | Information about the output generator |
| `config` | Dump of the `book.json` |
### Book Variables
| Variable | Description |
| -------- | ----------- |
| `book.[CONFIGURATION_DATA]` | All the `variables` set via the `book.json` are available through the book variable. |
| `book.language` | Current language for a multilingual book |
### GitBook Variables
| Variable | Description |
| -------- | ----------- |
| `gitbook.time` | The current time (when you run the `gitbook` command) . |
| `gitbook.version` | Version of GitBook used to generate the book |
### File Variables
| Variable | Description |
| -------- | ----------- |
| `file.path` | The path to the raw page |
| `file.mtime` | Modified Time. Last time the file was modified |
| `file.type` | The name of the parser used to compile this file (ex: `markdown`, `asciidoc`, etc) |
#### Page Variables
| Variable | Description |
| -------- | ----------- |
| `page.title` | Title of the page |
| `page.previous` | Previous page in the Table of Contents (can be `null`) |
| `page.next` | Next page in the Table of Contents (can be `null`) |
| `page.dir` | Text direction, based on configuration or detected from content (`rtl` or `ltr`) |
#### Table of Contents Variables
| Variable | Description |
| -------- | ----------- |
| `summary.parts` | List of sections in the Table of Contents |
The whole table of contents (`SUMMARY.md`) can be accessed:
`summary.parts[0].articles[0].title` will return the title of the first article.
#### Multi-lingual book Variable
| Variable | Description |
| -------- | ----------- |
| `languages.list` | List of languages for this book |
Languages are defined by `{ id: 'en', title: 'English' }`.
### Output Variables
| Variable | Description |
| -------- | ----------- |
| `output.name` | Name of the output generator, possible values are `website`, `json`, `ebook` |
| `output.format` | When `output.name == "ebook"`, `format` defines the ebook format that will be generated, possible values are `pdf`, `epub` or `mobi` |
### Readme Variables
| Variable | Description |
| -------- | ----------- |
| `readme.path` | Path to the Readme in the book |
### Glossary Variables
| Variable | Description |
| -------- | ----------- |
| `glossary.path` | Path to the Glossary in the book |
+39
View File
@@ -0,0 +1,39 @@
# Theming
Since version 3.0.0, GitBook can be easily themed. Books use the [theme-default](https://github.com/GitbookIO/theme-default) theme by default.
> **Caution**: Custom theming can block some plugins from working correctly.
### Structure of a theme
A theme is a plugin containing templates and assets. Overriding any individual template is optional, since themes always extend the default theme.
| Folder | Description |
| -------- | ----------- |
| `_layouts` | Main folder containing all the templates |
| `_layouts/website/page.html` | Template for a normal page |
| `_layouts/ebook/page.html` | Template for a normal page during ebook generation (PDF< ePub, Mobi) |
### Extend/Customize theme in a book
Authors can extend the templates of a theme directly from their book's source (without creating an external theme). Templates will be resolved in the `_layouts` folder of the book first, then in the installed plugins/themes.
### Extend instead of Forking
When you want to make your theme changes available to multiple books, instead of forking the default theme, you can extend it using the [templating syntax](../templating/README.md):
```html
{% extends template.self %}
{% block body %}
{{ super() }}
... This will be added to the "body" block
{% endblock %}
```
Take a look at the [API](https://github.com/GitbookIO/theme-api) theme for a more complete example.
### Publish a theme
Themes are published as plugins ([see related docs](../plugins/README.md)) with a `theme-` prefix. For example the theme `awesome` will be loaded from the `theme-awesome` plugin, and then from the `gitbook-plugin-theme-awesome` NPM package.
+9
View File
@@ -0,0 +1,9 @@
var gitbook = require('../gitbook');
describe('satisfies', function() {
it('should return true for *', function() {
expect(gitbook.satisfies('*')).toBe(true);
});
});
+16
View File
@@ -0,0 +1,16 @@
var tmp = require('tmp');
var initBook = require('../init');
describe('initBook', function() {
it('should create a README and SUMMARY for empty book', function() {
var dir = tmp.dirSync();
return initBook(dir.name)
.then(function() {
expect(dir.name).toHaveFile('README.md');
expect(dir.name).toHaveFile('SUMMARY.md');
});
});
});
+6
View File
@@ -0,0 +1,6 @@
describe('GitBook', function() {
it('should correctly export', function() {
require('../');
});
});
+17
View File
@@ -0,0 +1,17 @@
/**
Decode changes from a JS API to a config object
@param {Config} config
@param {Object} result: result from API
@return {Config}
*/
function decodeGlobal(config, result) {
var values = result.values;
delete values.generator;
delete values.output;
return config.updateValues(values);
}
module.exports = decodeGlobal;
+22
View File
@@ -0,0 +1,22 @@
var decodeConfig = require('./decodeConfig');
/**
Decode changes from a JS API to a output object.
Only the configuration can be edited by plugin's hooks
@param {Output} output
@param {Object} result: result from API
@return {Output}
*/
function decodeGlobal(output, result) {
var book = output.getBook();
var config = book.getConfig();
// Update config
config = decodeConfig(config, result.config);
book = book.set('config', config);
return output.set('book', book);
}
module.exports = decodeGlobal;
+44
View File
@@ -0,0 +1,44 @@
var deprecate = require('./deprecate');
/**
Decode changes from a JS API to a page object.
Only the content can be edited by plugin's hooks.
@param {Output} output
@param {Page} page: page instance to edit
@param {Object} result: result from API
@return {Page}
*/
function decodePage(output, page, result) {
var originalContent = page.getContent();
// No returned value
// Existing content will be used
if (!result) {
return page;
}
deprecate.disable('page.sections');
// GitBook 3
// Use returned page.content if different from original content
if (result.content != originalContent) {
page = page.set('content', result.content);
}
// GitBook 2 compatibility
// Finally, use page.sections
else if (result.sections) {
page = page.set('content',
result.sections.map(function(section) {
return section.content;
}).join('\n')
);
}
deprecate.enable('page.sections');
return page;
}
module.exports = decodePage;
+122
View File
@@ -0,0 +1,122 @@
var is = require('is');
var objectPath = require('object-path');
var logged = {};
var disabled = {};
/**
Log a deprecated notice
@param {Book|Output} book
@param {String} key
@param {String} message
*/
function logNotice(book, key, message) {
if (logged[key] || disabled[key]) return;
logged[key] = true;
var logger = book.getLogger();
logger.warn.ln(message);
}
/**
Deprecate a function
@param {Book|Output} book
@param {String} key: unique identitifer for the deprecated
@param {Function} fn
@param {String} msg: message to print when called
@return {Function}
*/
function deprecateMethod(book, key, fn, msg) {
return function() {
logNotice(book, key, msg);
return fn.apply(this, arguments);
};
}
/**
Deprecate a property of an object
@param {Book|Output} book
@param {String} key: unique identitifer for the deprecated
@param {Object} instance
@param {String|Function} property
@param {String} msg: message to print when called
@return {Function}
*/
function deprecateField(book, key, instance, property, value, msg) {
var store = undefined;
var prepare = function() {
if (!is.undefined(store)) return;
if (is.fn(value)) store = value();
else store = value;
};
var getter = function(){
prepare();
logNotice(book, key, msg);
return store;
};
var setter = function(v) {
prepare();
logNotice(book, key, msg);
store = v;
return store;
};
Object.defineProperty(instance, property, {
get: getter,
set: setter,
enumerable: true,
configurable: true
});
}
/**
Enable a deprecation
@param {String} key: unique identitifer
*/
function enableDeprecation(key) {
disabled[key] = false;
}
/**
Disable a deprecation
@param {String} key: unique identitifer
*/
function disableDeprecation(key) {
disabled[key] = true;
}
/**
Deprecate a method in favor of another one
@param {Book} book
@param {String} key
@param {Object} instance
@param {String} oldName
@param {String} newName
*/
function deprecateRenamedMethod(book, key, instance, oldName, newName, msg) {
msg = msg || ('"' + oldName + '" is deprecated, use "' + newName + '()" instead');
var fn = objectPath.get(instance, newName);
instance[oldName] = deprecateMethod(book, key, fn, msg);
}
module.exports = {
method: deprecateMethod,
renamedMethod: deprecateRenamedMethod,
field: deprecateField,
enable: enableDeprecation,
disable: disableDeprecation
};
+36
View File
@@ -0,0 +1,36 @@
var objectPath = require('object-path');
var deprecate = require('./deprecate');
/**
Encode a config object into a JS config api
@param {Output} output
@param {Config} config
@return {Object}
*/
function encodeConfig(output, config) {
var result = {
values: config.getValues().toJS(),
get: function(key, defaultValue) {
return objectPath.get(result.values, key, defaultValue);
},
set: function(key, value) {
return objectPath.set(result.values, key, value);
}
};
deprecate.field(output, 'config.options', result, 'options',
result.values, '"config.options" property is deprecated, use "config.get(key)" instead');
deprecate.field(output, 'config.options.generator', result.values, 'generator',
output.getGenerator(), '"options.generator" property is deprecated, use "output.name" instead');
deprecate.field(output, 'config.options.generator', result.values, 'output',
output.getRoot(), '"options.output" property is deprecated, use "output.root()" instead');
return result;
}
module.exports = encodeConfig;
+257
View File
@@ -0,0 +1,257 @@
var path = require('path');
var Promise = require('../utils/promise');
var PathUtils = require('../utils/path');
var fs = require('../utils/fs');
var Plugins = require('../plugins');
var deprecate = require('./deprecate');
var fileToURL = require('../output/helper/fileToURL');
var defaultBlocks = require('../constants/defaultBlocks');
var gitbook = require('../gitbook');
var parsers = require('../parsers');
var encodeConfig = require('./encodeConfig');
var encodeSummary = require('./encodeSummary');
var encodeNavigation = require('./encodeNavigation');
var encodePage = require('./encodePage');
/**
Encode a global context into a JS object
It's the context for page's hook, etc
@param {Output} output
@return {Object}
*/
function encodeGlobal(output) {
var book = output.getBook();
var bookFS = book.getContentFS();
var logger = output.getLogger();
var outputFolder = output.getRoot();
var plugins = output.getPlugins();
var blocks = Plugins.listBlocks(plugins);
var result = {
log: logger,
config: encodeConfig(output, book.getConfig()),
summary: encodeSummary(output, book.getSummary()),
/**
Check if the book is a multilingual book
@return {Boolean}
*/
isMultilingual: function() {
return book.isMultilingual();
},
/**
Check if the book is a language book for a multilingual book
@return {Boolean}
*/
isLanguageBook: function() {
return book.isLanguageBook();
},
/**
Read a file from the book
@param {String} fileName
@return {Promise<Buffer>}
*/
readFile: function(fileName) {
return bookFS.read(fileName);
},
/**
Read a file from the book as a string
@param {String} fileName
@return {Promise<String>}
*/
readFileAsString: function(fileName) {
return bookFS.readAsString(fileName);
},
/**
Resolve a file from the book root
@param {String} fileName
@return {String}
*/
resolve: function(fileName) {
return path.resolve(book.getContentRoot(), fileName);
},
/**
Resolve a page by it path
@param {String} filePath
@return {String}
*/
getPageByPath: function(filePath) {
var page = output.getPage(filePath);
if (!page) return undefined;
return encodePage(output, page);
},
/**
Render a block of text (markdown/asciidoc)
@param {String} type
@param {String} text
@return {Promise<String>}
*/
renderBlock: function(type, text) {
var parser = parsers.get(type);
return parser.parsePage(text)
.get('content');
},
/**
Render an inline text (markdown/asciidoc)
@param {String} type
@param {String} text
@return {Promise<String>}
*/
renderInline: function(type, text) {
var parser = parsers.get(type);
return parser.parseInline(text)
.get('content');
},
template: {
/**
Apply a templating block and returns its result
@param {String} name
@param {Object} blockData
@return {Promise|Object}
*/
applyBlock: function(name, blockData) {
var block = blocks.get(name) || defaultBlocks.get(name);
return Promise(block.applyBlock(blockData, result));
}
},
output: {
/**
Name of the generator being used
{String}
*/
name: output.getGenerator(),
/**
Return absolute path to the root folder of output
@return {String}
*/
root: function() {
return outputFolder;
},
/**
Resolve a file from the output root
@param {String} fileName
@return {String}
*/
resolve: function(fileName) {
return path.resolve(outputFolder, fileName);
},
/**
Convert a filepath into an url
@return {String}
*/
toURL: function(filePath) {
return fileToURL(output, filePath);
},
/**
Check that a file exists.
@param {String} fileName
@return {Promise}
*/
hasFile: function(fileName, content) {
return Promise()
.then(function() {
var filePath = PathUtils.resolveInRoot(outputFolder, fileName);
return fs.exists(filePath);
});
},
/**
Write a file to the output folder,
It creates the required folder
@param {String} fileName
@param {Buffer} content
@return {Promise}
*/
writeFile: function(fileName, content) {
return Promise()
.then(function() {
var filePath = PathUtils.resolveInRoot(outputFolder, fileName);
return fs.ensureFile(filePath)
.then(function() {
return fs.writeFile(filePath, content);
});
});
},
/**
Copy a file to the output folder
It creates the required folder.
@param {String} inputFile
@param {String} outputFile
@param {Buffer} content
@return {Promise}
*/
copyFile: function(inputFile, outputFile, content) {
return Promise()
.then(function() {
var outputFilePath = PathUtils.resolveInRoot(outputFolder, outputFile);
return fs.ensureFile(outputFilePath)
.then(function() {
return fs.copy(inputFile, outputFilePath);
});
});
}
},
gitbook: {
version: gitbook.version
}
};
// Deprecated properties
deprecate.renamedMethod(output, 'this.isSubBook', result, 'isSubBook', 'isLanguageBook');
deprecate.renamedMethod(output, 'this.contentLink', result, 'contentLink', 'output.toURL');
deprecate.field(output, 'this.generator', result, 'generator',
output.getGenerator(), '"this.generator" property is deprecated, use "this.output.name" instead');
deprecate.field(output, 'this.navigation', result, 'navigation', function() {
return encodeNavigation(output);
}, '"navigation" property is deprecated');
deprecate.field(output, 'this.book', result, 'book',
result, '"book" property is deprecated, use "this" directly instead');
deprecate.field(output, 'this.options', result, 'options',
result.config.values, '"options" property is deprecated, use config.get(key) instead');
return result;
}
module.exports = encodeGlobal;
+64
View File
@@ -0,0 +1,64 @@
var Immutable = require('immutable');
/**
Encode an article for next/prev
@param {Map<String:Page>}
@param {Article}
@return {Object}
*/
function encodeArticle(pages, article) {
var articlePath = article.getPath();
return {
path: articlePath,
title: article.getTitle(),
level: article.getLevel(),
exists: (articlePath && pages.has(articlePath)),
external: article.isExternal()
};
}
/**
this.navigation is a deprecated property from GitBook v2
@param {Output}
@return {Object}
*/
function encodeNavigation(output) {
var book = output.getBook();
var pages = output.getPages();
var summary = book.getSummary();
var articles = summary.getArticlesAsList();
var navigation = articles
.map(function(article, i) {
var ref = article.getRef();
if (!ref) {
return undefined;
}
var prev = articles.get(i - 1);
var next = articles.get(i + 1);
return [
ref,
{
index: i,
title: article.getTitle(),
introduction: (i === 0),
prev: prev? encodeArticle(pages, prev) : undefined,
next: next? encodeArticle(pages, next) : undefined,
level: article.getLevel()
}
];
})
.filter(function(e) {
return Boolean(e);
});
return Immutable.Map(navigation).toJS();
}
module.exports = encodeNavigation;
+39
View File
@@ -0,0 +1,39 @@
var JSONUtils = require('../json');
var deprecate = require('./deprecate');
var encodeProgress = require('./encodeProgress');
/**
Encode a page in a context to a JS API
@param {Output} output
@param {Page} page
@return {Object}
*/
function encodePage(output, page) {
var book = output.getBook();
var summary = book.getSummary();
var fs = book.getContentFS();
var file = page.getFile();
// JS Page is based on the JSON output
var result = JSONUtils.encodePage(page, summary);
result.type = file.getType();
result.path = file.getPath();
result.rawPath = fs.resolve(result.path);
deprecate.field(output, 'page.progress', result, 'progress', function() {
return encodeProgress(output, page);
}, '"page.progress" property is deprecated');
deprecate.field(output, 'page.sections', result, 'sections', [
{
content: result.content,
type: 'normal'
}
], '"sections" property is deprecated, use page.content instead');
return result;
}
module.exports = encodePage;
+63
View File
@@ -0,0 +1,63 @@
var Immutable = require('immutable');
var encodeNavigation = require('./encodeNavigation');
/**
page.progress is a deprecated property from GitBook v2
@param {Output}
@param {Page}
@return {Object}
*/
function encodeProgress(output, page) {
var current = page.getPath();
var navigation = encodeNavigation(output);
navigation = Immutable.Map(navigation);
var n = navigation.size;
var percent = 0, prevPercent = 0, currentChapter = null;
var done = true;
var chapters = navigation
.map(function(nav, chapterPath) {
nav.path = chapterPath;
return nav;
})
.valueSeq()
.sortBy(function(nav) {
return nav.index;
})
.map(function(nav, i) {
// Calcul percent
nav.percent = (i * 100) / Math.max((n - 1), 1);
// Is it done
nav.done = done;
if (nav.path == current) {
currentChapter = nav;
percent = nav.percent;
done = false;
} else if (done) {
prevPercent = nav.percent;
}
return nav;
})
.toJS();
return {
// Previous percent
prevPercent: prevPercent,
// Current percent
percent: percent,
// List of chapter with progress
chapters: chapters,
// Current chapter
current: currentChapter
};
}
module.exports = encodeProgress;
+51
View File
@@ -0,0 +1,51 @@
var encodeSummaryArticle = require('../json/encodeSummaryArticle');
/**
Encode summary to provide an API to plugin
@param {Output} output
@param {Config} config
@return {Object}
*/
function encodeSummary(output, summary) {
var result = {
/**
Iterate over the summary, it stops when the "iter" returns false
@param {Function} iter
*/
walk: function (iter) {
summary.getArticle(function(article) {
var jsonArticle = encodeSummaryArticle(article, false);
return iter(jsonArticle);
});
},
/**
Get an article by its level
@param {String} level
@return {Object}
*/
getArticleByLevel: function(level) {
var article = summary.getByLevel(level);
return (article? encodeSummaryArticle(article) : undefined);
},
/**
Get an article by its path
@param {String} level
@return {Object}
*/
getArticleByPath: function(level) {
var article = summary.getByPath(level);
return (article? encodeSummaryArticle(article) : undefined);
}
};
return result;
}
module.exports = encodeSummary;
+8
View File
@@ -0,0 +1,8 @@
module.exports = {
encodePage: require('./encodePage'),
decodePage: require('./decodePage'),
encodeGlobal: require('./encodeGlobal'),
decodeGlobal: require('./decodeGlobal')
};
+25
View File
@@ -0,0 +1,25 @@
var Modifiers = require('./modifiers');
module.exports = {
Parse: require('./parse'),
// Models
Book: require('./models/book'),
FS: require('./models/fs'),
Summary: require('./models/summary'),
Glossary: require('./models/glossary'),
Config: require('./models/config'),
Page: require('./models/page'),
PluginDependency: require('./models/pluginDependency'),
// Modifiers
SummaryModifier: Modifiers.Summary,
ConfigModifier: Modifiers.Config,
// Constants
CONFIG_FILES: require('./constants/configFiles.js'),
IGNORE_FILES: require('./constants/ignoreFiles.js'),
DEFAULT_PLUGINS: require('./constants/defaultPlugins'),
EXTENSIONS_MARKDOWN: require('./constants/extsMarkdown'),
EXTENSIONS_ASCIIDOC: require('./constants/extsAsciidoc')
};
+34
View File
@@ -0,0 +1,34 @@
var Parse = require('../parse');
var Output = require('../output');
var timing = require('../utils/timing');
var options = require('./options');
var getBook = require('./getBook');
var getOutputFolder = require('./getOutputFolder');
module.exports = {
name: 'build [book] [output]',
description: 'build a book',
options: [
options.log,
options.format,
options.timing
],
exec: function(args, kwargs) {
var book = getBook(args, kwargs);
var outputFolder = getOutputFolder(args);
var Generator = Output.getGenerator(kwargs.format);
return Parse.parseBook(book)
.then(function(resultBook) {
return Output.generate(Generator, resultBook, {
root: outputFolder
});
})
.fin(function() {
if (kwargs.timing) timing.dump(book.getLogger());
});
}
};
+78
View File
@@ -0,0 +1,78 @@
var path = require('path');
var tmp = require('tmp');
var Promise = require('../utils/promise');
var fs = require('../utils/fs');
var Parse = require('../parse');
var Output = require('../output');
var options = require('./options');
var getBook = require('./getBook');
module.exports = function(format) {
return {
name: (format + ' [book] [output]'),
description: 'build a book into an ebook file',
options: [
options.log
],
exec: function(args, kwargs) {
var extension = '.' + format;
// Output file will be stored in
var outputFile = args[1] || ('book' + extension);
// Create temporary directory
var outputFolder = tmp.dirSync().name;
var book = getBook(args, kwargs);
var logger = book.getLogger();
var Generator = Output.getGenerator('ebook');
return Parse.parseBook(book)
.then(function(resultBook) {
return Output.generate(Generator, resultBook, {
root: outputFolder,
format: format
});
})
// Extract ebook file
.then(function(output) {
var book = output.getBook();
var languages = book.getLanguages();
if (book.isMultilingual()) {
return Promise.forEach(languages.getList(), function(lang) {
var langID = lang.getID();
var langOutputFile = path.join(
path.dirname(outputFile),
path.basename(outputFile, extension) + '_' + langID + extension
);
return fs.copy(
path.resolve(outputFolder, langID, 'index' + extension),
langOutputFile
);
})
.thenResolve(languages.getCount());
} else {
return fs.copy(
path.resolve(outputFolder, 'index' + extension),
outputFile
).thenResolve(1);
}
})
// Log end
.then(function(count) {
logger.info.ok(count + ' file(s) generated');
logger.debug('cleaning up... ');
return logger.debug.promise(fs.rmDir(outputFolder));
});
}
};
};
+23
View File
@@ -0,0 +1,23 @@
var path = require('path');
var Book = require('../models/book');
var createNodeFS = require('../fs/node');
/**
Return a book instance to work on from
command line args/kwargs
@param {Array} args
@param {Object} kwargs
@return {Book}
*/
function getBook(args, kwargs) {
var input = path.resolve(args[0] || process.cwd());
var logLevel = kwargs.log;
var fs = createNodeFS(input);
var book = Book.createForFS(fs);
return book.setLogLevel(logLevel);
}
module.exports = getBook;
+17
View File
@@ -0,0 +1,17 @@
var path = require('path');
/**
Return path to output folder
@param {Array} args
@return {String}
*/
function getOutputFolder(args) {
var bookRoot = path.resolve(args[0] || process.cwd());
var defaultOutputRoot = path.join(bookRoot, '_book');
var outputFolder = args[1]? path.resolve(process.cwd(), args[1]) : defaultOutputRoot;
return outputFolder;
}
module.exports = getOutputFolder;
+12
View File
@@ -0,0 +1,12 @@
var buildEbook = require('./buildEbook');
module.exports = [
require('./build'),
require('./serve'),
require('./install'),
require('./parse'),
require('./init'),
buildEbook('pdf'),
buildEbook('epub'),
buildEbook('mobi')
];
+17
View File
@@ -0,0 +1,17 @@
var path = require('path');
var options = require('./options');
var initBook = require('../init');
module.exports = {
name: 'init [book]',
description: 'setup and create files for chapters',
options: [
options.log
],
exec: function(args, kwargs) {
var bookRoot = path.resolve(process.cwd(), args[0] || './');
return initBook(bookRoot);
}
};
+21
View File
@@ -0,0 +1,21 @@
var options = require('./options');
var getBook = require('./getBook');
var Parse = require('../parse');
var Plugins = require('../plugins');
module.exports = {
name: 'install [book]',
description: 'install all plugins dependencies',
options: [
options.log
],
exec: function(args, kwargs) {
var book = getBook(args, kwargs);
return Parse.parseConfig(book)
.then(function(resultBook) {
return Plugins.installPlugins(resultBook);
});
}
};
+31
View File
@@ -0,0 +1,31 @@
var Logger = require('../utils/logger');
var logOptions = {
name: 'log',
description: 'Minimum log level to display',
values: Logger.LEVELS
.keySeq()
.map(function(s) {
return s.toLowerCase();
}).toJS(),
defaults: 'info'
};
var formatOption = {
name: 'format',
description: 'Format to build to',
values: ['website', 'json', 'ebook'],
defaults: 'website'
};
var timingOption = {
name: 'timing',
description: 'Print timing debug information',
defaults: false
};
module.exports = {
log: logOptions,
format: formatOption,
timing: timingOption
};
+79
View File
@@ -0,0 +1,79 @@
var options = require('./options');
var getBook = require('./getBook');
var Parse = require('../parse');
function printBook(book) {
var logger = book.getLogger();
var config = book.getConfig();
var configFile = config.getFile();
var summary = book.getSummary();
var summaryFile = summary.getFile();
var readme = book.getReadme();
var readmeFile = readme.getFile();
var glossary = book.getGlossary();
var glossaryFile = glossary.getFile();
if (configFile.exists()) {
logger.info.ln('Configuration file is', configFile.getPath());
}
if (readmeFile.exists()) {
logger.info.ln('Introduction file is', readmeFile.getPath());
}
if (glossaryFile.exists()) {
logger.info.ln('Glossary file is', glossaryFile.getPath());
}
if (summaryFile.exists()) {
logger.info.ln('Table of Contents file is', summaryFile.getPath());
}
}
function printMultingualBook(book) {
var logger = book.getLogger();
var languages = book.getLanguages();
var books = book.getBooks();
logger.info.ln(languages.size + ' languages');
languages.forEach(function(lang) {
logger.info.ln('Language:', lang.getTitle());
printBook(books.get(lang.getID()));
logger.info.ln('');
});
}
module.exports = {
name: 'parse [book]',
description: 'parse and print debug information about a book',
options: [
options.log
],
exec: function(args, kwargs) {
var book = getBook(args, kwargs);
var logger = book.getLogger();
return Parse.parseBook(book)
.then(function(resultBook) {
var rootFolder = book.getRoot();
var contentFolder = book.getContentRoot();
logger.info.ln('Book located in:', rootFolder);
if (contentFolder != rootFolder) {
logger.info.ln('Content located in:', contentFolder);
}
if (resultBook.isMultilingual()) {
printMultingualBook(resultBook);
} else {
printBook(resultBook);
}
});
}
};
+142
View File
@@ -0,0 +1,142 @@
/* eslint-disable no-console */
var tinylr = require('tiny-lr');
var Parse = require('../parse');
var Output = require('../output');
var ConfigModifier = require('../modifiers').Config;
var Promise = require('../utils/promise');
var options = require('./options');
var getBook = require('./getBook');
var getOutputFolder = require('./getOutputFolder');
var Server = require('./server');
var watch = require('./watch');
var server, lrServer, lrPath;
function waitForCtrlC() {
var d = Promise.defer();
process.on('SIGINT', function() {
d.resolve();
});
return d.promise;
}
function generateBook(args, kwargs) {
var port = kwargs.port;
var outputFolder = getOutputFolder(args);
var book = getBook(args, kwargs);
var Generator = Output.getGenerator(kwargs.format);
var hasWatch = kwargs['watch'];
var hasLiveReloading = kwargs['live'];
// Stop server if running
if (server.isRunning()) console.log('Stopping server');
return server.stop()
.then(function() {
return Parse.parseBook(book)
.then(function(resultBook) {
if (hasLiveReloading) {
// Enable livereload plugin
var config = resultBook.getConfig();
config = ConfigModifier.addPlugin(config, 'livereload');
resultBook = resultBook.set('config', config);
}
return Output.generate(Generator, resultBook, {
root: outputFolder
});
});
})
.then(function() {
console.log();
console.log('Starting server ...');
return server.start(outputFolder, port);
})
.then(function() {
console.log('Serving book on http://localhost:'+port);
if (lrPath && hasLiveReloading) {
// trigger livereload
lrServer.changed({
body: {
files: [lrPath]
}
});
}
})
.then(function() {
if (!hasWatch) {
return waitForCtrlC();
}
return watch(book.getRoot())
.then(function(filepath) {
// set livereload path
lrPath = filepath;
console.log('Restart after change in file', filepath);
console.log('');
return generateBook(args, kwargs);
});
});
}
module.exports = {
name: 'serve [book] [output]',
description: 'serve the book as a website for testing',
options: [
{
name: 'port',
description: 'Port for server to listen on',
defaults: 4000
},
{
name: 'lrport',
description: 'Port for livereload server to listen on',
defaults: 35729
},
{
name: 'watch',
description: 'Enable file watcher and live reloading',
defaults: true
},
{
name: 'live',
description: 'Enable live reloading',
defaults: true
},
options.log,
options.format
],
exec: function(args, kwargs) {
server = new Server();
var hasWatch = kwargs['watch'];
var hasLiveReloading = kwargs['live'];
return Promise()
.then(function() {
if (!hasWatch || !hasLiveReloading) {
return;
}
lrServer = tinylr({});
return Promise.nfcall(lrServer.listen.bind(lrServer), kwargs.lrport)
.then(function() {
console.log('Live reload server started on port:', kwargs.lrport);
console.log('Press CTRL+C to quit ...');
console.log('');
});
})
.then(function() {
return generateBook(args, kwargs);
});
}
};
+128
View File
@@ -0,0 +1,128 @@
var events = require('events');
var http = require('http');
var send = require('send');
var util = require('util');
var url = require('url');
var Promise = require('../utils/promise');
function Server() {
this.running = null;
this.dir = null;
this.port = 0;
this.sockets = [];
}
util.inherits(Server, events.EventEmitter);
/**
Return true if the server is running
@return {Boolean}
*/
Server.prototype.isRunning = function() {
return !!this.running;
};
/**
Stop the server
@return {Promise}
*/
Server.prototype.stop = function() {
var that = this;
if (!this.isRunning()) return Promise();
var d = Promise.defer();
this.running.close(function(err) {
that.running = null;
that.emit('state', false);
if (err) d.reject(err);
else d.resolve();
});
for (var i = 0; i < this.sockets.length; i++) {
this.sockets[i].destroy();
}
return d.promise;
};
/**
Start the server
@return {Promise}
*/
Server.prototype.start = function(dir, port) {
var that = this, pre = Promise();
port = port || 8004;
if (that.isRunning()) pre = this.stop();
return pre
.then(function() {
var d = Promise.defer();
that.running = http.createServer(function(req, res){
// Render error
function error(err) {
res.statusCode = err.status || 500;
res.end(err.message);
}
// Redirect to directory's index.html
function redirect() {
var resultURL = urlTransform(req.url, function(parsed) {
parsed.pathname += '/';
return parsed;
});
res.statusCode = 301;
res.setHeader('Location', resultURL);
res.end('Redirecting to ' + resultURL);
}
res.setHeader('X-Current-Location', req.url);
// Send file
send(req, url.parse(req.url).pathname, {
root: dir
})
.on('error', error)
.on('directory', redirect)
.pipe(res);
});
that.running.on('connection', function (socket) {
that.sockets.push(socket);
socket.setTimeout(4000);
socket.on('close', function () {
that.sockets.splice(that.sockets.indexOf(socket), 1);
});
});
that.running.listen(port, function(err) {
if (err) return d.reject(err);
that.port = port;
that.dir = dir;
that.emit('state', true);
d.resolve();
});
return d.promise;
});
};
/**
urlTransform is a helper function that allows a function to transform
a url string in it's parsed form and returns the new url as a string
@param {String} uri
@param {Function} fn
@return {String}
*/
function urlTransform(uri, fn) {
return url.format(fn(url.parse(uri)));
}
module.exports = Server;
+46
View File
@@ -0,0 +1,46 @@
var path = require('path');
var chokidar = require('chokidar');
var Promise = require('../utils/promise');
var parsers = require('../parsers');
/**
Watch a folder and resolve promise once a file is modified
@param {String} dir
@return {Promise}
*/
function watch(dir) {
var d = Promise.defer();
dir = path.resolve(dir);
var toWatch = [
'book.json', 'book.js', '_layouts/**'
];
// Watch all parsable files
parsers.extensions.forEach(function(ext) {
toWatch.push('**/*'+ext);
});
var watcher = chokidar.watch(toWatch, {
cwd: dir,
ignored: '_book/**',
ignoreInitial: true
});
watcher.once('all', function(e, filepath) {
watcher.close();
d.resolve(filepath);
});
watcher.once('error', function(err) {
watcher.close();
d.reject(err);
});
return d.promise;
}
module.exports = watch;
+46
View File
@@ -0,0 +1,46 @@
var jsonschema = require('jsonschema');
var schema = require('../configSchema');
describe('configSchema', function() {
function validate(cfg) {
var v = new jsonschema.Validator();
return v.validate(cfg, schema, {
propertyName: 'config'
});
}
describe('structure', function() {
it('should accept dot in filename', function() {
var result = validate({
structure: {
readme: 'book-intro.adoc'
}
});
expect(result.errors.length).toBe(0);
});
it('should accept uppercase in filename', function() {
var result = validate({
structure: {
readme: 'BOOK.adoc'
}
});
expect(result.errors.length).toBe(0);
});
it('should not accept filepath', function() {
var result = validate({
structure: {
readme: 'folder/myFile.md'
}
});
expect(result.errors.length).toBe(1);
});
});
});
+6
View File
@@ -0,0 +1,6 @@
var Immutable = require('immutable');
var jsonSchemaDefaults = require('json-schema-defaults');
var schema = require('./configSchema');
module.exports = Immutable.fromJS(jsonSchemaDefaults(schema));
+5
View File
@@ -0,0 +1,5 @@
// Configuration files to test (sorted)
module.exports = [
'book.js',
'book.json'
];
+190
View File
@@ -0,0 +1,190 @@
var FILENAME_REGEX = '^[a-zA-Z-._\d,\s]+$';
module.exports = {
'$schema': 'http://json-schema.org/schema#',
'id': 'https://gitbook.com/schemas/book.json',
'title': 'GitBook Configuration',
'type': 'object',
'properties': {
'root': {
'type': 'string',
'title': 'Path fro the root folder containing the book\'s content'
},
'title': {
'type': 'string',
'title': 'Title of the book, default is extracted from README'
},
'isbn': {
'type': 'string',
'title': 'ISBN for published book'
},
'author': {
'type': 'string',
'title': 'Name of the author'
},
'gitbook': {
'type': 'string',
'default': '*',
'title': 'GitBook version to match'
},
'direction': {
'type': 'string',
'enum': ['ltr', 'rtl'],
'title': 'Direction of texts, default is detected in the pages'
},
'theme': {
'type': 'string',
'default': 'default',
'title': 'Name of the theme plugin to use'
},
'variables': {
'type': 'object',
'title': 'Templating context variables'
},
'plugins': {
'oneOf': [
{ '$ref': '#/definitions/pluginsArray' },
{ '$ref': '#/definitions/pluginsString' }
],
'default': []
},
'pluginsConfig': {
'type': 'object',
'title': 'Configuration for plugins'
},
'structure': {
'type': 'object',
'properties': {
'langs': {
'default': 'LANGS.md',
'type': 'string',
'title': 'File to use as languages index',
'pattern': FILENAME_REGEX
},
'readme': {
'default': 'README.md',
'type': 'string',
'title': 'File to use as preface',
'pattern': FILENAME_REGEX
},
'glossary': {
'default': 'GLOSSARY.md',
'type': 'string',
'title': 'File to use as glossary index',
'pattern': FILENAME_REGEX
},
'summary': {
'default': 'SUMMARY.md',
'type': 'string',
'title': 'File to use as table of contents',
'pattern': FILENAME_REGEX
}
},
'additionalProperties': false
},
'pdf': {
'type': 'object',
'title': 'PDF specific configurations',
'properties': {
'pageNumbers': {
'type': 'boolean',
'default': true,
'title': 'Add page numbers to the bottom of every page'
},
'fontSize': {
'type': 'integer',
'minimum': 8,
'maximum': 30,
'default': 12,
'title': 'Font size for the PDF output'
},
'fontFamily': {
'type': 'string',
'default': 'Arial',
'title': 'Font family for the PDF output'
},
'paperSize': {
'type': 'string',
'enum': ['a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'legal', 'letter'],
'default': 'a4',
'title': 'Paper size for the PDF'
},
'chapterMark': {
'type': 'string',
'enum': ['pagebreak', 'rule', 'both', 'none'],
'default': 'pagebreak',
'title': 'How to mark detected chapters'
},
'pageBreaksBefore': {
'type': 'string',
'default': '/',
'title': 'An XPath expression. Page breaks are inserted before the specified elements. To disable use the expression: "/"'
},
'margin': {
'type': 'object',
'properties': {
'right': {
'type': 'integer',
'title': 'Right Margin',
'minimum': 0,
'maximum': 100,
'default': 62
},
'left': {
'type': 'integer',
'title': 'Left Margin',
'minimum': 0,
'maximum': 100,
'default': 62
},
'top': {
'type': 'integer',
'title': 'Top Margin',
'minimum': 0,
'maximum': 100,
'default': 56
},
'bottom': {
'type': 'integer',
'title': 'Bottom Margin',
'minimum': 0,
'maximum': 100,
'default': 56
}
}
}
}
}
},
'required': [],
'definitions': {
'pluginsArray': {
'type': 'array',
'items': {
'oneOf': [
{ '$ref': '#/definitions/pluginObject' },
{ '$ref': '#/definitions/pluginString' }
]
}
},
'pluginsString': {
'type': 'string'
},
'pluginString': {
'type': 'string'
},
'pluginObject': {
'type': 'object',
'properties': {
'name': {
'type': 'string'
},
'version': {
'type': 'string'
}
},
'additionalProperties': false,
'required': ['name']
}
}
};
+51
View File
@@ -0,0 +1,51 @@
var Immutable = require('immutable');
var TemplateBlock = require('../models/templateBlock');
module.exports = Immutable.Map({
html: TemplateBlock({
name: 'html',
process: function(blk) {
return blk;
}
}),
code: TemplateBlock({
name: 'code',
process: function(blk) {
return {
html: false,
body: blk.body
};
}
}),
markdown: TemplateBlock({
name: 'markdown',
process: function(blk) {
return this.book.renderInline('markdown', blk.body)
.then(function(out) {
return { body: out };
});
}
}),
asciidoc: TemplateBlock({
name: 'asciidoc',
process: function(blk) {
return this.book.renderInline('asciidoc', blk.body)
.then(function(out) {
return { body: out };
});
}
}),
markup: TemplateBlock({
name: 'markup',
process: function(blk) {
return this.book.renderInline(this.ctx.file.type, blk.body)
.then(function(out) {
return { body: out };
});
}
})
});
+15
View File
@@ -0,0 +1,15 @@
var Immutable = require('immutable');
var moment = require('moment');
module.exports = Immutable.Map({
// Format a date
// ex: 'MMMM Do YYYY, h:mm:ss a
date: function(time, format) {
return moment(time).format(format);
},
// Relative Time
dateFromNow: function(time) {
return moment(time).fromNow();
}
});
+29
View File
@@ -0,0 +1,29 @@
var Immutable = require('immutable');
var PluginDependency = require('../models/pluginDependency');
var pkg = require('../../package.json');
/**
* Create a PluginDependency from a dependency of gitbook
* @param {String} pluginName
* @return {PluginDependency}
*/
function createFromDependency(pluginName) {
var npmID = PluginDependency.nameToNpmID(pluginName);
var version = pkg.dependencies[npmID];
return PluginDependency.create(pluginName, version);
}
/*
* List of default plugins for all books,
* default plugins should be installed in node dependencies of GitBook
*/
module.exports = Immutable.List([
'highlight',
'search',
'lunr',
'sharing',
'fontsettings',
'theme-default'
]).map(createFromDependency);
+4
View File
@@ -0,0 +1,4 @@
module.exports = [
'.adoc',
'.asciidoc'
];
+5
View File
@@ -0,0 +1,5 @@
module.exports = [
'.md',
'.markdown',
'.mdown'
];
+6
View File
@@ -0,0 +1,6 @@
// Files containing ignore pattner (sorted by priority)
module.exports = [
'.ignore',
'.gitignore',
'.bookignore'
];
+2
View File
@@ -0,0 +1,2 @@
module.exports = '_assets';
+8
View File
@@ -0,0 +1,8 @@
module.exports = [
'init',
'finish',
'finish:before',
'config',
'page',
'page:before'
];
+5
View File
@@ -0,0 +1,5 @@
/*
All GitBook plugins are NPM packages starting with this prefix.
*/
module.exports = 'gitbook-plugin-';

Some files were not shown because too many files have changed in this diff Show More