summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE.md29
-rw-r--r--CHANGES.md8
-rw-r--r--docs/README.md5
-rw-r--r--docs/SUMMARY.md1
-rw-r--r--docs/ebook.md14
-rw-r--r--docs/examples.md3
-rw-r--r--docs/faq.md4
-rw-r--r--docs/pages.md3
-rw-r--r--docs/plugins/README.md2
-rw-r--r--docs/plugins/filters.md2
-rw-r--r--docs/plugins/hooks.md1
-rw-r--r--docs/plugins/testing.md3
-rw-r--r--docs/setup.md1
-rw-r--r--docs/syntax/asciidoc.md7
-rw-r--r--docs/templating/README.md4
-rw-r--r--docs/templating/builtin.md3
-rw-r--r--docs/templating/variables.md2
-rw-r--r--docs/themes/README.md2
-rw-r--r--packages/gitbook/src/parse/parsePageFromString.js1
19 files changed, 62 insertions, 33 deletions
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 4311ae2..49e147a 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,19 +1,30 @@
-Thank you for giving us your feedback! We listed some guidelines to help you:
+<!--
+ IMPORTANT NOTICE
+ Only post things related to the gitbook CLI
+ For GitBook.com, the Editor, or anything else
+ please go to
+ https://github.com/GitbookIO/feedback/issues
+
+ Please open separate issues for each bug report.
+-->
-If possible, open separate issues for each bug report. Avoid grouping bugs that are unrelated.
### What is the current behavior?
-If the current behavior is a bug, please provide the steps to reproduce. if possible, provide the GitBook version being used (`gitbook -V`) and the system infromations (OS and version).
+<!--
+ - For bugs, provide the steps to reproduce
+ - Provide the GitBook version being used (`gitbook -V`)
+ - Provide system informations (OS and version)
+ - Provide your username and the URL of the book
+-->
-### What is the expected behavior?
-How do you think, or how would you like it should behave.
-#### For GitBook.com
+### What is the expected behavior?
-Provide, if possible, your username and the URL of the concerned book.
-----
-The GitBook Team
+<!--
+ Thank you for giving us your feedback!
+ -- The GitBook Team
+-->
diff --git a/CHANGES.md b/CHANGES.md
index b41d2f0..e84d00b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -13,6 +13,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- *Plugin API*: hook `page` can no longer modify the content, only the page's attributes
- *Plugin API*: plugins can no longer export resources, instead use the `_assets` folder
+## 3.2.2
+- Fix catching parsing errors leading to possible missing pages in generated book
+- Rollback markdown parser to `kramed` until `markup-it` is stable enough
+
+## 3.2.1
+- Fix bug on Firefox when navigating to an url containing an hash
+- Update nunjucks to fix JS error when page contains a lot of templating blocks
+
## 3.2.0
- Switch markdown parser from `kramed` to `markup-it`
- Fix support of `|` in tables
diff --git a/docs/README.md b/docs/README.md
index d626231..272896d 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -4,7 +4,7 @@ This document aims to be a comprehensive guide to GitBook. It contains the full
### 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 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).
@@ -18,9 +18,8 @@ Check out the [GitBook Community Slack Channel](https://slack.gitbook.com), Stay
### FAQ
-Some questions are frequently asked. If you have a problem you should [check this out](faq.md) first.
+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.
-
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
index fdddbb9..e3d8d67 100644
--- a/docs/SUMMARY.md
+++ b/docs/SUMMARY.md
@@ -15,6 +15,7 @@
* [Markdown](syntax/markdown.md)
* [Headings](syntax/markdown.md#headings)
* [Paragraphs](syntax/markdown.md#paragraphs)
+ * [Emphasis](syntax/markdown.md#emphasis)
* [Lists](syntax/markdown.md#lists)
* [Links](syntax/markdown.md#links)
* [Images](syntax/markdown.md#images)
diff --git a/docs/ebook.md b/docs/ebook.md
index 6931079..104f110 100644
--- a/docs/ebook.md
+++ b/docs/ebook.md
@@ -17,6 +17,20 @@ $ gitbook mobi ./ ./mybook.mobi
`ebook-convert` is required to generate ebooks (epub, mobi, pdf).
+##### GNU/Linux
+
+Install the [Calibre application](https://calibre-ebook.com/download).
+
+```
+$ sudo aptitude install calibre
+```
+
+In some GNU/Linux distributions node is installed as nodejs, you need to manually create a symlink:
+
+```
+$sudo ln -s /usr/bin/nodejs /usr/bin/node
+```
+
##### 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:
diff --git a/docs/examples.md b/docs/examples.md
index a748c33..618e2f8 100644
--- a/docs/examples.md
+++ b/docs/examples.md
@@ -23,5 +23,6 @@ More than 50,000 books have been published on [GitBook.com](https://www.gitbook.
### Documentation
- [DuckDuckHack Documentation](http://docs.duckduckhack.com) by [DuckDuckGo](https://duckduckgo.com/about)
+- [Loomio Handbook](http://loomio.coop/) and [guide to using Loomio](https://loomio.gitbooks.io/manual/content/en/index.html) both by [Loomio](https://www.loomio.org/)
+- [Enspiral Handbook](http://handbook.enspiral.com/) by [Enspiral](http://enspiral.com/)
- This documentation
-
diff --git a/docs/faq.md b/docs/faq.md
index 3d595e0..cea686d 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -18,7 +18,7 @@ Any text editor should work! But we advise using the [GitBook Editor](https://ww
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
+```json
{
"language": "ar",
"direction": "rtl"
@@ -34,7 +34,7 @@ You should always use paths and the `.md` extensions when linking to your files,
#### 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).
+Yes, GitBooks can be created in [sub-directories](structure.md#subdirectory). GitBook.com and the CLI also looks by default in a series of [folders](structure.md).
#### Does GitBook supports RTL languages?
diff --git a/docs/pages.md b/docs/pages.md
index 127dcae..7e32240 100644
--- a/docs/pages.md
+++ b/docs/pages.md
@@ -40,7 +40,6 @@ Chapters in the Table of Contents can be pointing to specific part of a file usi
* [Better tools for authors](part2/README.md#tools)
```
-
##### Parts
The Table of Contents can be divided into parts separated by headings or horizontal lines:
@@ -73,7 +72,7 @@ Most of the files for GitBook use the Markdown syntax by default. GitBook infers
##### Example of a chapter file
-``` markdown
+```markdown
# Title of the chapter
This is a great introduction.
diff --git a/docs/plugins/README.md b/docs/plugins/README.md
index 4df62b8..cbcf826 100644
--- a/docs/plugins/README.md
+++ b/docs/plugins/README.md
@@ -1,6 +1,6 @@
# 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.
+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 Analytics, etc.
### How to find plugins?
diff --git a/docs/plugins/filters.md b/docs/plugins/filters.md
index 9ee9493..53eca9a 100644
--- a/docs/plugins/filters.md
+++ b/docs/plugins/filters.md
@@ -54,4 +54,4 @@ module.exports = {
}
}
};
-``` \ No newline at end of file
+```
diff --git a/docs/plugins/hooks.md b/docs/plugins/hooks.md
index 7d81b1d..5eb0e2f 100644
--- a/docs/plugins/hooks.md
+++ b/docs/plugins/hooks.md
@@ -71,7 +71,6 @@ In the `page` hook, `page.content` is the HTML generated from the markdown/ascii
}
```
-
### Asynchronous Operations
Hooks callbacks can be asynchronous and return promises.
diff --git a/docs/plugins/testing.md b/docs/plugins/testing.md
index 9562b26..4cd2c69 100644
--- a/docs/plugins/testing.md
+++ b/docs/plugins/testing.md
@@ -2,7 +2,7 @@
### Testing your plugin locally
-Testing your plugin on your book before plushing it is possible using [npm link](https://docs.npmjs.com/cli/link).
+Testing your plugin on your book before publishing it is possible using [npm link](https://docs.npmjs.com/cli/link).
In the plugin's folder, run:
@@ -19,4 +19,3 @@ $ 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.
-
diff --git a/docs/setup.md b/docs/setup.md
index 368abca..9300678 100644
--- a/docs/setup.md
+++ b/docs/setup.md
@@ -66,4 +66,3 @@ You can use the options `--log=debug` and `--debug` to get better error messages
```
$ gitbook build ./ --log=debug --debug
```
-
diff --git a/docs/syntax/asciidoc.md b/docs/syntax/asciidoc.md
index d51ebcc..201e822 100644
--- a/docs/syntax/asciidoc.md
+++ b/docs/syntax/asciidoc.md
@@ -12,7 +12,7 @@ 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.
+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.
@@ -60,6 +60,5 @@ observer producing a sense of wonder.
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"). ```
-
-
+but now stands for "PHP: Hypertext Preprocessor").
+```
diff --git a/docs/templating/README.md b/docs/templating/README.md
index bf8d265..ae4ec8f 100644
--- a/docs/templating/README.md
+++ b/docs/templating/README.md
@@ -21,7 +21,7 @@ This looks up username from the context and displays it. Variable names can have
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.
+GitBook provides a set of [predefined variables](variables.md) from the context.
### Filters
@@ -92,7 +92,7 @@ Inclusion and inheritance is detailled in the [Content References](conrefs.md) s
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
+```twig
{% raw %}
this will {{ not be processed }}
{% endraw %}
diff --git a/docs/templating/builtin.md b/docs/templating/builtin.md
index 1f05edf..780b0c9 100644
--- a/docs/templating/builtin.md
+++ b/docs/templating/builtin.md
@@ -4,7 +4,8 @@ GitBook provides a serie of builtin filters and blocks to help you write templat
### 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)
+`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.
diff --git a/docs/templating/variables.md b/docs/templating/variables.md
index 9499c8e..1a215de 100644
--- a/docs/templating/variables.md
+++ b/docs/templating/variables.md
@@ -28,7 +28,7 @@ The following is a reference of the available data during book's parsing and the
| Variable | Description |
| -------- | ----------- |
-| `gitbook.time` | The current time (when you run the `gitbook` command) . |
+| `gitbook.time` | The current time (when you run the `gitbook` command). |
| `gitbook.version` | Version of GitBook used to generate the book |
### File Variables
diff --git a/docs/themes/README.md b/docs/themes/README.md
index a0b138e..d6ab680 100644
--- a/docs/themes/README.md
+++ b/docs/themes/README.md
@@ -12,7 +12,7 @@ A theme is a plugin containing templates and assets. Overriding any individual t
| -------- | ----------- |
| `_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) |
+| `_layouts/ebook/page.html` | Template for a normal page during ebook generation (PDF, ePub, Mobi) |
### Extend/Customize theme in a book
diff --git a/packages/gitbook/src/parse/parsePageFromString.js b/packages/gitbook/src/parse/parsePageFromString.js
index c121e2c..2e4a598 100644
--- a/packages/gitbook/src/parse/parsePageFromString.js
+++ b/packages/gitbook/src/parse/parsePageFromString.js
@@ -9,7 +9,6 @@ const direction = require('direction');
* @return {Page}
*/
function parsePageFromString(page, content) {
- // Parse page YAML
const parsed = fm(content);
return page.merge({