Compare commits

...

15 Commits

Author SHA1 Message Date
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
10 changed files with 90 additions and 37 deletions
+4
View File
@@ -61,3 +61,7 @@ Translators
- @mjanda
- Swedish
- Jacob Burenstam (@buren)
- Turkish
- Turan Konan (@turankonan)
- Catalan
- Esaú García Sánchez-Torija (@egasato)
+7
View File
@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 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)
+1 -1
View File
@@ -8,7 +8,7 @@ GitBook
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).
You can publish and host book easily online using [gitbook.com](https://www.gitbook.com), a desktop editor is [also available](https://www.gitbook.com/editor).
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).
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.
+1 -1
View File
@@ -63,7 +63,7 @@ Generator.prototype.getPDFTemplate = function(id) {
// Custom PDF style
if (this.styles.pdf) {
stylesheets.push(fs.readFileSync(this.book.resolve(this.styles.pdf), { encoding: 'utf-8' }));
stylesheets.push(fs.readFileSync(this.book.resolveOutput(this.styles.pdf), { encoding: 'utf-8' }));
}
tpl = juice(tpl, {
+26 -27
View File
@@ -1,51 +1,50 @@
var url = require("url");
var path = require("path");
var url = require('url');
var path = require('path');
// Is the link an external link
var isExternal = function(href) {
function isExternal(href) {
try {
return Boolean(url.parse(href).protocol);
} catch(err) { }
return false;
};
} catch(err) {
return false;
}
}
// Return true if the link is relative
var isRelative = function(href) {
function isRelative(href) {
try {
var parsed = url.parse(href);
return !!(!parsed.protocol && parsed.path);
} catch(err) {}
return true;
};
} catch(err) {
return true;
}
}
// Return true if the link is an achor
var isAnchor = function(href) {
function isAnchor(href) {
try {
var parsed = url.parse(href);
return !!(!parsed.protocol && !parsed.path && parsed.hash);
} catch(err) {}
return false;
};
} catch(err) {
return false;
}
}
// Normalize a path to be a link
var normalizeLink = function(s) {
return s.replace(/\\/g, "/");
};
function normalizeLink(s) {
return s.replace(/\\/g, '/');
}
// Relative to absolute path
// dir: directory parent of the file currently in rendering process
// outdir: directory parent from the html output
var toAbsolute = function(_href, dir, outdir) {
function toAbsolute(_href, dir, outdir) {
if (isExternal(_href)) return _href;
// Path "_href" inside the base folder
var hrefInRoot = path.normalize(path.join(dir, _href));
if (_href[0] == "/") hrefInRoot = path.normalize(_href.slice(1));
if (_href[0] == '/') hrefInRoot = path.normalize(_href.slice(1));
// Make it relative to output
_href = path.relative(outdir, hrefInRoot);
@@ -54,22 +53,22 @@ var toAbsolute = function(_href, dir, outdir) {
_href = normalizeLink(_href);
return _href;
};
}
// Join links
var join = function() {
function join() {
var _href = path.join.apply(path, arguments);
return normalizeLink(_href);
};
// Change extension
var changeExtension = function(filename, newext) {
function changeExtension(filename, newext) {
return path.join(
path.dirname(filename),
path.basename(filename, path.extname(filename))+newext
);
};
}
module.exports = {
isAnchor: isAnchor,
+4 -1
View File
@@ -205,9 +205,12 @@ function normalizeHtml(src, options) {
// Keep it as it is
} else if (links.isRelative(href)) {
var parts = url.parse(href);
var absolutePath = links.join(options.base, parts.pathname);
var pathName = decodeURIComponent(parts.pathname);
var anchor = parts.hash || '';
// Calcul absolute path for this file (without the anchor)
var absolutePath = links.join(options.base, pathName);
// If is in navigation relative: transform as content
if (options.navigation[absolutePath]) {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "gitbook",
"version": "2.6.5",
"version": "2.6.7",
"homepage": "https://www.gitbook.com",
"description": "Library and cmd utility to generate GitBooks",
"main": "lib/index.js",
+20
View File
@@ -0,0 +1,20 @@
{
"LANGS_CHOOSE": "Seleccioni un idioma",
"GLOSSARY": "Glossari",
"GLOSSARY_INDEX": "Índex",
"GLOSSARY_OPEN": "Glossari",
"GITBOOK_LINK": "Publicat amb GitBook",
"SUMMARY": "Taula de contingut",
"SUMMARY_INTRODUCTION": "Introducció",
"SUMMARY_TOGGLE": "Taula de contingut",
"SEARCH_TOGGLE": "Cerca",
"SEARCH_PLACEHOLDER": "Escriu per cercar",
"FONTSETTINGS_TOGGLE": "Configuració de font",
"SHARE_TOGGLE": "Comparteix",
"SHARE_ON": "Comparteix en {{platform}}",
"FONTSETTINGS_WHITE": "Claro",
"FONTSETTINGS_SEPIA": "Sépia",
"FONTSETTINGS_NIGHT": "Noche",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
+6 -6
View File
@@ -1,9 +1,9 @@
{
"LANGS_CHOOSE": "言語を選択",
"GLOSSARY": "用語集",
"GLOSSARY_INDEX": "インデックス",
"GLOSSARY_INDEX": "索引",
"GLOSSARY_OPEN": "用語集",
"GITBOOK_LINK": "で公開 GitBook",
"GITBOOK_LINK": "GitBookで公開 ",
"SUMMARY": "目次",
"SUMMARY_INTRODUCTION": "はじめに",
"SUMMARY_TOGGLE": "目次",
@@ -11,10 +11,10 @@
"SEARCH_PLACEHOLDER": "検索すると入力",
"FONTSETTINGS_TOGGLE": "フォント設定",
"SHARE_TOGGLE": "シェア",
"SHARE_ON": "でシェア {{platform}}",
"SHARE_ON": "{{platform}}でシェア",
"FONTSETTINGS_WHITE": "白",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_SEPIA": "セピア",
"FONTSETTINGS_NIGHT": "夜",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
"FONTSETTINGS_SANS": "ゴシック体",
"FONTSETTINGS_SERIF": "明朝体"
}
+20
View File
@@ -0,0 +1,20 @@
{
"LANGS_CHOOSE": "Dil seçimi",
"GLOSSARY": "Sözlük",
"GLOSSARY_INDEX": "Dizin",
"GLOSSARY_OPEN": "Sözlük",
"GITBOOK_LINK": "GitBook ile yayınla",
"SUMMARY": "İçindekiler",
"SUMMARY_INTRODUCTION": "Giriş",
"SUMMARY_TOGGLE": "İçindekiler",
"SEARCH_TOGGLE": "Arama",
"SEARCH_PLACEHOLDER": "Aramak istediğiniz",
"FONTSETTINGS_TOGGLE": "Font Ayarları",
"SHARE_TOGGLE": "Paylaş",
"SHARE_ON": "{{platform}} ile paylaş",
"FONTSETTINGS_WHITE": "Beyaz",
"FONTSETTINGS_SEPIA": "Sepya",
"FONTSETTINGS_NIGHT": "Karanlık",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}