Merge remote-tracking branch 'upstream/version/2.0' into version/2.0

This commit is contained in:
nasirkhan
2015-02-27 22:16:11 +06:00
8 changed files with 46 additions and 10 deletions
+14
View File
@@ -1,4 +1,18 @@
# Release notes
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 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
+1 -1
View File
@@ -664,7 +664,7 @@ Book.prototype.resolve = function(p) {
// Normalize a link to .html and convert README -> index
Book.prototype.contentLink = function(link) {
if (
path.basename(link) == "README"
path.basename(link, path.extname(link)) == "README"
|| link == this.readmeFile
) {
link = path.join(path.dirname(link), "index"+path.extname(link));
+4 -2
View File
@@ -189,8 +189,10 @@ function normalizeHtml(src, options) {
if (links.isRelative(href)) {
var absolutePath = path.join(options.base, href);
// If is in navigation relative: change extsnio nto be .html
if (options.navigation[absolutePath]) href = links.changeExtension(href, ".html");
// If is in navigation relative: transform as content
if (options.navigation[absolutePath]) {
href = options.book.contentLink(href);
}
// Transform as absolute
href = links.toAbsolute(href, options.base, options.output);
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "gitbook",
"version": "2.0.0-alpha.8",
"version": "2.0.0-alpha.9",
"homepage": "https://www.gitbook.com",
"description": "Library and cmd utility to generate GitBooks",
"main": "lib/index.js",
@@ -13,8 +13,8 @@
"fs-extra": "0.16.3",
"fstream-ignore": "1.0.2",
"gitbook-parsers": "0.4.1",
"nunjucks": "git+https://github.com/SamyPesse/nunjucks.git#4019d1b7379372336b86ce1b0bf84352a2029747",
"nunjucks-autoescape": "0.1.0",
"nunjucks": "git+https://github.com/mozilla/nunjucks.git#42d2b9f5c0ad5db8ca3a1fdbba5bde9fc4cc2c45",
"nunjucks-autoescape": "0.1.1",
"nunjucks-filter": "0.1.0",
"nunjucks-i18n": "1.0.0",
"semver": "2.2.1",
+20
View File
@@ -0,0 +1,20 @@
{
"LANGS_CHOOSE": "Choose a language",
"GLOSSARY": "Glossary",
"GLOSSARY_INDEX": "Index",
"GLOSSARY_OPEN": "Glossary",
"GITBOOK_LINK": "Published with GitBook",
"SUMMARY": "Table of Contents",
"SUMMARY_INTRODUCTION": "Introduction",
"SUMMARY_TOGGLE": "Table of Contents",
"SEARCH_TOGGLE": "Search",
"SEARCH_PLACEHOLDER": "Type to search",
"FONTSETTINGS_TOGGLE": "Font Settings",
"SHARE_TOGGLE": "Share",
"SHARE_ON": "Share on __platform__",
"FONTSETTINGS_WHITE": "White",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "Night",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
+1 -1
View File
@@ -9,7 +9,7 @@
<meta name="description" content="{% block description %}{% endblock %}">
<meta name="generator" content="GitBook {{ gitbook.version }}">
{% block head %}{% endblock %}
{{ htmlSnippet("head:end")|default("") }}
{{ htmlSnippet("head:end")|default("")|safe }}
</head>
<body>
{{ htmlSnippet("body:start")|default("")|safe }}
@@ -38,10 +38,10 @@
<ul class="summary">
{% set _divider = false %}
{% if options.links.sidebar %}
{% for link in options.links.sidebar %}
{% for linkTitle, link in options.links.sidebar %}
{% set _divider = true %}
<li>
<a href="{{ options.links.sidebar[loop.key] }}" target="blank" class="custom-link">{{ loop.key }}</a>
<a href="{{ link }}" target="blank" class="custom-link">{{ linkTitle }}</a>
</li>
{% endfor %}
{% endif %}
+1 -1
View File
@@ -2,7 +2,7 @@
<html lang="{{ language }}">
{{ htmlSnippet("html:start")|default("")|safe }}
<head>
{{ htmlSnippet("head:start")|default("") }}
{{ htmlSnippet("head:start")|default("")|safe }}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
<title>{% block title %}{% endblock %}</title>