mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-29 13:39:11 +00:00
Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e7f2803d11 | |||
| 320015dd8f | |||
| 471c124a98 | |||
| aa44a109c6 | |||
| 41e5ca8422 | |||
| 53af8b2bb6 | |||
| bd885b135f | |||
| 62a6dde81a | |||
| 14b72b344f | |||
| ac03668063 | |||
| 2512e176c9 | |||
| b613393866 | |||
| 607a6e95de | |||
| 871f574ff7 | |||
| 377e470b15 | |||
| e0a3f0cea5 | |||
| 66727b2736 | |||
| 8215ad977f | |||
| a611dffbdf | |||
| 39f378d8cf | |||
| f00da58153 | |||
| 09b038b16d | |||
| cf601d97ad | |||
| 80edad53d4 | |||
| a972b32769 | |||
| efcaae3e60 | |||
| e0ee591638 | |||
| 310a6d909f | |||
| cefd8fc50f | |||
| a4422593f2 | |||
| e2c5d22756 | |||
| 84385d9dc3 | |||
| 6cfa4c8ab7 | |||
| c76ccc53e1 | |||
| d48eafb1a2 | |||
| 302d9b4b91 | |||
| a091a7f68b | |||
| 53621f6de3 | |||
| 288b965db3 | |||
| 578c9dcfc6 | |||
| 64de17b248 |
+18
-15
@@ -21,34 +21,37 @@ Translators
|
|||||||
------------
|
------------
|
||||||
|
|
||||||
- German
|
- German
|
||||||
- Winnie (@winniehell)
|
- Winnie (@winniehell)
|
||||||
- Italian
|
- Italian
|
||||||
- Giulio Bonanome (@gbonanome)
|
- Giulio Bonanome (@gbonanome)
|
||||||
- Russian
|
- Russian
|
||||||
- Andrey Akinshin (@AndreyAkinshin)
|
- Andrey Akinshin (@AndreyAkinshin)
|
||||||
- Norwegian
|
- Norwegian
|
||||||
- Knut Melvær (@kmelve)
|
- Knut Melvær (@kmelve)
|
||||||
- Persian (Farsi)
|
- Persian (Farsi)
|
||||||
- Mohammad Hossein Mojtahedi (@mhm5000)
|
- Mohammad Hossein Mojtahedi (@mhm5000)
|
||||||
- Polish
|
- Polish
|
||||||
- Łukasz Szeremeta (@lszeremeta)
|
- Łukasz Szeremeta (@lszeremeta)
|
||||||
- Portuguese
|
- Portuguese
|
||||||
- Ryan O'Mullan (@RyanOM)
|
- Ryan O'Mullan (@RyanOM)
|
||||||
- Spanish
|
- Spanish
|
||||||
- Ryan O'Mullan (@RyanOM)
|
- Ryan O'Mullan (@RyanOM)
|
||||||
- Simplifiled Chinese
|
- Simplifiled Chinese
|
||||||
- Hu Hao (@howiehu)
|
- Hu Hao (@howiehu)
|
||||||
- Traditional Chinese
|
- Traditional Chinese
|
||||||
- Hu Hao (@howiehu)
|
- Hu Hao (@howiehu)
|
||||||
- French
|
- French
|
||||||
- Samy Pessé (@SamyPesse)
|
- Samy Pessé (@SamyPesse)
|
||||||
- Romanian
|
- Romanian
|
||||||
- Iancu Aurel (@awrelll)
|
- Iancu Aurel (@awrelll)
|
||||||
- Finnish
|
- Finnish
|
||||||
- Tommi Savikko (@savikko)
|
- Tommi Savikko (@savikko)
|
||||||
- Japanese
|
- Japanese
|
||||||
- Iancu Aurel (@awrelll)
|
- Iancu Aurel (@awrelll)
|
||||||
- Korean
|
- Korean
|
||||||
- Iancu Aurel (@awrelll)
|
- Iancu Aurel (@awrelll)
|
||||||
|
- SangYeob Yu (@deminoth)
|
||||||
- Vietnamese
|
- Vietnamese
|
||||||
- Hong Nguyen (@nghong)
|
- Hong Nguyen (@nghong)
|
||||||
|
- Hebrew
|
||||||
|
- @a-moses
|
||||||
|
|||||||
+24
@@ -2,6 +2,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## 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
|
## 2.2.0
|
||||||
- Fix direction in code blocks (always LTR)
|
- Fix direction in code blocks (always LTR)
|
||||||
- Add options `chapterMark` and `pageBreaksBefore` for PDF
|
- Add options `chapterMark` and `pageBreaksBefore` for PDF
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ GitBook
|
|||||||
=======
|
=======
|
||||||
|
|
||||||
[](http://badge.fury.io/js/gitbook)
|
[](http://badge.fury.io/js/gitbook)
|
||||||
[](https://travis-ci.org/GitbookIO/gitbook)
|
[](https://travis-ci.org/GitbookIO/gitbook)
|
||||||
[](https://ci.appveyor.com/project/SamyPesse/gitbook)
|
[](https://ci.appveyor.com/project/GitBook/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).
|
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).
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ $ gitbook build
|
|||||||
* [AsciiDoc Support](http://help.gitbook.com/format/asciidoc.html)
|
* [AsciiDoc Support](http://help.gitbook.com/format/asciidoc.html)
|
||||||
* [Variables and Templating](http://help.gitbook.com/format/templating.html)
|
* [Variables and Templating](http://help.gitbook.com/format/templating.html)
|
||||||
* [Content References](http://help.gitbook.com/format/conrefs.html)
|
* [Content References](http://help.gitbook.com/format/conrefs.html)
|
||||||
* [Plugins](http://help.gitbook.com/plugins/index.html)
|
* [Plugins](http://help.gitbook.com/format/plugins.html)
|
||||||
* Interractive reader website:
|
* Interractive reader website:
|
||||||
* Search
|
* Search
|
||||||
* Font Settings (Serif, Sans Serif)
|
* Font Settings (Serif, Sans Serif)
|
||||||
|
|||||||
+1
-1
@@ -512,7 +512,7 @@ Book.prototype.parsePage = function(filename, options) {
|
|||||||
var interpolate = function(fn) {
|
var interpolate = function(fn) {
|
||||||
return Q(fn(page))
|
return Q(fn(page))
|
||||||
.then(function(_page) {
|
.then(function(_page) {
|
||||||
page = _page;
|
page = _page || page;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -121,8 +121,8 @@ Configuration.prototype.load = function() {
|
|||||||
if (!semver.satisfies(pkg.version, that.options.gitbook)) {
|
if (!semver.satisfies(pkg.version, that.options.gitbook)) {
|
||||||
throw "GitBook version doesn't satisfy version required by the book: "+that.options.gitbook;
|
throw "GitBook version doesn't satisfy version required by the book: "+that.options.gitbook;
|
||||||
}
|
}
|
||||||
if (that.options.gitbook == "*") {
|
if (that.options.gitbook != '*' && !semver.satisfies(semver.inc(pkg.version, 'patch'), that.options.gitbook)) {
|
||||||
that.book.log.warn.ln("you should specify a gitbook version to use in your book.json, for example: "+(_.first(pkg.version.split("."))+".x.x"));
|
that.book.log.warn.ln("gitbook version specified in your book.json might be too strict for future patches, \""+(_.first(pkg.version.split("."))+".x.x")+"\" is more adequate");
|
||||||
}
|
}
|
||||||
|
|
||||||
that.options.output = path.resolve(that.options.output || path.join(that.book.root, "_book"));
|
that.options.output = path.resolve(that.options.output || path.join(that.book.root, "_book"));
|
||||||
@@ -156,6 +156,10 @@ Configuration.prototype.normalizeLanguage = function() {
|
|||||||
return i18n.normalizeLanguage(this.options.language);
|
return i18n.normalizeLanguage(this.options.language);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Return a configuration
|
||||||
|
Configuration.prototype.get = function(key, def) {
|
||||||
|
return _.get(this.options, key, def);
|
||||||
|
};
|
||||||
|
|
||||||
// Default configuration
|
// Default configuration
|
||||||
Configuration.DEFAULT = {
|
Configuration.DEFAULT = {
|
||||||
|
|||||||
+1
-1
@@ -158,7 +158,7 @@ module.exports = {
|
|||||||
.then(function(filepath) {
|
.then(function(filepath) {
|
||||||
// set livereload path
|
// set livereload path
|
||||||
lrPath = filepath;
|
lrPath = filepath;
|
||||||
console.log("Restart after change in files");
|
console.log("Restart after change in file", filepath);
|
||||||
console.log('');
|
console.log('');
|
||||||
return generate();
|
return generate();
|
||||||
})
|
})
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ var Plugin = function(book, name) {
|
|||||||
// Type of plugins resources
|
// Type of plugins resources
|
||||||
Plugin.RESOURCES = ["js", "css"];
|
Plugin.RESOURCES = ["js", "css"];
|
||||||
Plugin.HOOKS = [
|
Plugin.HOOKS = [
|
||||||
"init", "finish", "finish:before"
|
"init", "finish", "finish:before", "page", "page:before"
|
||||||
]
|
]
|
||||||
|
|
||||||
// Load from a name
|
// Load from a name
|
||||||
|
|||||||
+5
-5
@@ -103,16 +103,16 @@ TemplateEngine.prototype.processBlock = function(blk) {
|
|||||||
return blk.body;
|
return blk.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return it as a macro
|
// Return it as a position marker
|
||||||
return "%+%"+blk.id+"%+%";
|
return "@%@"+blk.id+"@%@";
|
||||||
};
|
};
|
||||||
|
|
||||||
// Replace blocks by body after processing
|
// Replace position markers of blocks by body after processing
|
||||||
// This is done to avoid that markdown processer parse the block content
|
// This is done to avoid that markdown/asciidoc processer parse the block content
|
||||||
TemplateEngine.prototype.replaceBlocks = function(content) {
|
TemplateEngine.prototype.replaceBlocks = function(content) {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
return content.replace(/\%\+\%([\s\S]+?)\%\+\%/g, function(match, key) {
|
return content.replace(/\@\%\@([\s\S]+?)\@\%\@/g, function(match, key) {
|
||||||
var blk = that.blocks[key];
|
var blk = that.blocks[key];
|
||||||
if (!blk) return match;
|
if (!blk) return match;
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,10 @@ function writeStream(filename, st) {
|
|||||||
d.reject(err);
|
d.reject(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
st.on('error', function(err) {
|
||||||
|
d.reject(err);
|
||||||
|
});
|
||||||
|
|
||||||
st.pipe(wstream);
|
st.pipe(wstream);
|
||||||
|
|
||||||
return d.promise;
|
return d.promise;
|
||||||
|
|||||||
+1
-1
@@ -83,7 +83,7 @@ function cloneGitRepo(host, ref) {
|
|||||||
return exec("git clone "+host+" "+repoPath)
|
return exec("git clone "+host+" "+repoPath)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return exec("git checkout "+ref, { cwd: repoPath });
|
return exec("git checkout "+ref, { cwd: repoPath });
|
||||||
})
|
});
|
||||||
})
|
})
|
||||||
.thenResolve(repoPath);
|
.thenResolve(repoPath);
|
||||||
});
|
});
|
||||||
|
|||||||
+22
-1
@@ -13,6 +13,8 @@ var fs = require('./fs');
|
|||||||
var batch = require('./batch');
|
var batch = require('./batch');
|
||||||
var code = require('./code');
|
var code = require('./code');
|
||||||
|
|
||||||
|
var parsableExtensions = require('gitbook-parsers').extensions;
|
||||||
|
|
||||||
// Render a cheerio dom as html
|
// Render a cheerio dom as html
|
||||||
var renderDom = function($, dom, options) {
|
var renderDom = function($, dom, options) {
|
||||||
if (!dom && $._root && $._root.children) {
|
if (!dom && $._root && $._root.children) {
|
||||||
@@ -196,11 +198,19 @@ function normalizeHtml(src, options) {
|
|||||||
var absolutePath = links.join(options.base, parts.pathname);
|
var absolutePath = links.join(options.base, parts.pathname);
|
||||||
var anchor = parts.hash || "";
|
var anchor = parts.hash || "";
|
||||||
|
|
||||||
|
|
||||||
// If is in navigation relative: transform as content
|
// If is in navigation relative: transform as content
|
||||||
if (options.navigation[absolutePath]) {
|
if (options.navigation[absolutePath]) {
|
||||||
absolutePath = options.book.contentLink(absolutePath);
|
absolutePath = options.book.contentLink(absolutePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If md/adoc/rst files is not in summary
|
||||||
|
// or for ebook, signal all files that are outside the summary
|
||||||
|
else if (_.contains(parsableExtensions, path.extname(absolutePath))
|
||||||
|
|| _.contains(['epub', 'pdf', 'mobi'], options.book.options.generator)) {
|
||||||
|
options.book.log.warn.ln("page", options.input, "contains an hyperlink to resource outside spine '"+href+"'");
|
||||||
|
}
|
||||||
|
|
||||||
// Transform as absolute
|
// Transform as absolute
|
||||||
href = links.toAbsolute("/"+absolutePath, options.base, options.output)+anchor;
|
href = links.toAbsolute("/"+absolutePath, options.base, options.output)+anchor;
|
||||||
} else {
|
} else {
|
||||||
@@ -219,7 +229,12 @@ function normalizeHtml(src, options) {
|
|||||||
($(this).attr("class") || "").split(" ")
|
($(this).attr("class") || "").split(" ")
|
||||||
)
|
)
|
||||||
.map(function(cl) {
|
.map(function(cl) {
|
||||||
|
// Markdown
|
||||||
if (cl.search("lang-") === 0) return cl.slice("lang-".length);
|
if (cl.search("lang-") === 0) return cl.slice("lang-".length);
|
||||||
|
|
||||||
|
// Asciidoc
|
||||||
|
if (cl.search("language-") === 0) return cl.slice("language-".length);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
})
|
})
|
||||||
.compact()
|
.compact()
|
||||||
@@ -285,7 +300,13 @@ function convertImages(images, options) {
|
|||||||
if (!image.origin && !_.contains(downloaded, image.origin)) return;
|
if (!image.origin && !_.contains(downloaded, image.origin)) return;
|
||||||
options.book.log.debug("download image", image.origin, "...");
|
options.book.log.debug("download image", image.origin, "...");
|
||||||
downloaded.push(image.origin);
|
downloaded.push(image.origin);
|
||||||
return options.book.log.debug.promise(fs.writeStream(imgin, request(image.origin)));
|
return options.book.log.debug.promise(fs.writeStream(imgin, request(image.origin)))
|
||||||
|
.fail(function(err) {
|
||||||
|
if (!_.isError(err)) err = new Error(err);
|
||||||
|
|
||||||
|
err.message = 'Fail downloading '+image.origin+': '+err.message;
|
||||||
|
throw err;
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
// Write svg if content
|
// Write svg if content
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ function watch(dir) {
|
|||||||
|
|
||||||
var watcher = chokidar.watch(toWatch, {
|
var watcher = chokidar.watch(toWatch, {
|
||||||
cwd: dir,
|
cwd: dir,
|
||||||
|
ignored: '_book/**',
|
||||||
ignoreInitial: true
|
ignoreInitial: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitbook",
|
"name": "gitbook",
|
||||||
"version": "2.2.0",
|
"version": "2.3.2",
|
||||||
"homepage": "https://www.gitbook.com",
|
"homepage": "https://www.gitbook.com",
|
||||||
"description": "Library and cmd utility to generate GitBooks",
|
"description": "Library and cmd utility to generate GitBooks",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
@@ -12,16 +12,16 @@
|
|||||||
"resolve": "0.6.3",
|
"resolve": "0.6.3",
|
||||||
"fs-extra": "0.16.5",
|
"fs-extra": "0.16.5",
|
||||||
"fstream-ignore": "1.0.2",
|
"fstream-ignore": "1.0.2",
|
||||||
"gitbook-parsers": "0.7.6",
|
"gitbook-parsers": "0.8.1",
|
||||||
"nunjucks": "mozilla/nunjucks#103513c294835bcbe64222de6db494e2555e294e",
|
"nunjucks": "mozilla/nunjucks#b4351ec0752b102ebd02c5e2cbc2898a6e0e4839",
|
||||||
"nunjucks-autoescape": "1.0.0",
|
"nunjucks-autoescape": "1.0.0",
|
||||||
"nunjucks-filter": "1.0.0",
|
"nunjucks-filter": "1.0.0",
|
||||||
"i18n": "0.5.0",
|
"i18n": "0.5.0",
|
||||||
"semver": "2.2.1",
|
"semver": "5.0.1",
|
||||||
"npmi": "0.1.1",
|
"npmi": "0.1.1",
|
||||||
"cheerio": "0.19.0",
|
"cheerio": "0.19.0",
|
||||||
"gitbook-plugin-livereload": "0.0.1",
|
"gitbook-plugin-livereload": "0.0.1",
|
||||||
"chokidar": "~1.0.1",
|
"chokidar": "~1.0.5",
|
||||||
"send": "0.2.0",
|
"send": "0.2.0",
|
||||||
"tiny-lr": "0.1.5",
|
"tiny-lr": "0.1.5",
|
||||||
"tmp": "0.0.24",
|
"tmp": "0.0.24",
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"npm": "2.4.1",
|
"npm": "2.4.1",
|
||||||
"dom-serializer": "0.1.0",
|
"dom-serializer": "0.1.0",
|
||||||
"spawn-cmd": "0.0.2",
|
"spawn-cmd": "0.0.2",
|
||||||
"highlight.js": "8.6.0",
|
"highlight.js": "8.8.0",
|
||||||
"escape-string-regexp": "1.0.3"
|
"escape-string-regexp": "1.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ var should = require('should');
|
|||||||
var path = require('path');
|
var path = require('path');
|
||||||
|
|
||||||
var Plugin = require('../lib/plugin');
|
var Plugin = require('../lib/plugin');
|
||||||
|
var parsers = require("gitbook-parsers");
|
||||||
var PLUGINS_ROOT = path.resolve(__dirname, 'plugins');
|
var PLUGINS_ROOT = path.resolve(__dirname, 'plugins');
|
||||||
|
|
||||||
describe('Plugins', function () {
|
describe('Plugins', function () {
|
||||||
@@ -200,5 +201,38 @@ describe('Plugins', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('Blocks without parsing', function() {
|
||||||
|
var plugin;
|
||||||
|
|
||||||
|
before(function() {
|
||||||
|
plugin = new Plugin(book, "blocks");
|
||||||
|
plugin.load("./blocks", PLUGINS_ROOT);
|
||||||
|
|
||||||
|
return book.plugins.load(plugin);
|
||||||
|
});
|
||||||
|
|
||||||
|
var testTpl = function(markup, str, args, options) {
|
||||||
|
var filetype = parsers.get(markup);
|
||||||
|
|
||||||
|
return book.template.renderString(str, args, options)
|
||||||
|
.then(filetype.page).get('sections').get(0).get('content')
|
||||||
|
.then(book.template.postProcess)
|
||||||
|
};
|
||||||
|
|
||||||
|
it('should correctly process unparsable for markdown', function() {
|
||||||
|
return testTpl('.md', '{% test %}**hello**{% endtest %}')
|
||||||
|
.then(function(content) {
|
||||||
|
content.should.equal("<p>test**hello**test</p>\n");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should correctly process unparsable for asciidoc', function() {
|
||||||
|
return testTpl('.adoc', '{% test %}**hello**{% endtest %}')
|
||||||
|
.then(function(content) {
|
||||||
|
content.should.equal('<div class="paragraph">\n<p>test**hello**test</p>\n</div>');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"direction": "rtl",
|
||||||
|
"LANGS_CHOOSE": "בחר שפה",
|
||||||
|
"GLOSSARY": "מונחים",
|
||||||
|
"GLOSSARY_INDEX": "מפתח",
|
||||||
|
"GLOSSARY_OPEN": "מונחים",
|
||||||
|
"GITBOOK_LINK": "הוצאה לאור באמצעות גיט-בוק GITBOOK",
|
||||||
|
"SUMMARY": "תוכן העניינים",
|
||||||
|
"SUMMARY_INTRODUCTION": "הוראות",
|
||||||
|
"SUMMARY_TOGGLE": "תקציר",
|
||||||
|
"SEARCH_TOGGLE": "חיפוש",
|
||||||
|
"SEARCH_PLACEHOLDER": "סוג החיפוש",
|
||||||
|
"FONTSETTINGS_TOGGLE": "הגדרת אותיות",
|
||||||
|
"SHARE_TOGGLE": "שתף",
|
||||||
|
"SHARE_ON": "{{platform}} שתף ב",
|
||||||
|
"FONTSETTINGS_WHITE": "בהיר",
|
||||||
|
"FONTSETTINGS_SEPIA": "חום כהה",
|
||||||
|
"FONTSETTINGS_NIGHT": "מצב לילה",
|
||||||
|
"FONTSETTINGS_SANS": "Sans",
|
||||||
|
"FONTSETTINGS_SERIF": "Serif"
|
||||||
|
}
|
||||||
@@ -3,18 +3,18 @@
|
|||||||
"GLOSSARY": "어휘",
|
"GLOSSARY": "어휘",
|
||||||
"GLOSSARY_INDEX": "색인",
|
"GLOSSARY_INDEX": "색인",
|
||||||
"GLOSSARY_OPEN": "어휘",
|
"GLOSSARY_OPEN": "어휘",
|
||||||
"GITBOOK_LINK": "에 게시 GitBook",
|
"GITBOOK_LINK": "GitBook에 게시",
|
||||||
"SUMMARY": "차례",
|
"SUMMARY": "차례",
|
||||||
"SUMMARY_INTRODUCTION": "소개",
|
"SUMMARY_INTRODUCTION": "소개",
|
||||||
"SUMMARY_TOGGLE": "차례",
|
"SUMMARY_TOGGLE": "차례",
|
||||||
"SEARCH_TOGGLE": "수색",
|
"SEARCH_TOGGLE": "검색",
|
||||||
"SEARCH_PLACEHOLDER": "검색어 입력",
|
"SEARCH_PLACEHOLDER": "검색어 입력",
|
||||||
"FONTSETTINGS_TOGGLE": "글꼴 설정",
|
"FONTSETTINGS_TOGGLE": "글꼴 설정",
|
||||||
"SHARE_TOGGLE": "몫",
|
"SHARE_TOGGLE": "공유",
|
||||||
"SHARE_ON": "공유 {{platform}}",
|
"SHARE_ON": "{{platform}}에 공유",
|
||||||
"FONTSETTINGS_WHITE": "화이트",
|
"FONTSETTINGS_WHITE": "화이트",
|
||||||
"FONTSETTINGS_SEPIA": "Sepia",
|
"FONTSETTINGS_SEPIA": "세피아",
|
||||||
"FONTSETTINGS_NIGHT": "밤",
|
"FONTSETTINGS_NIGHT": "나이트",
|
||||||
"FONTSETTINGS_SANS": "Sans",
|
"FONTSETTINGS_SANS": "고딕",
|
||||||
"FONTSETTINGS_SERIF": "Serif"
|
"FONTSETTINGS_SERIF": "명조"
|
||||||
}
|
}
|
||||||
@@ -35,13 +35,25 @@ define([
|
|||||||
var $pageHead = $page.find("[data-element=head]");
|
var $pageHead = $page.find("[data-element=head]");
|
||||||
var $pageBody = $page.find('.book');
|
var $pageBody = $page.find('.book');
|
||||||
|
|
||||||
|
////
|
||||||
// Merge heads
|
// Merge heads
|
||||||
var headContent = $pageHead.html()
|
// !! Warning !!: we only update necessary portions to avoid strange behavior (page flickering etc ...)
|
||||||
|
////
|
||||||
|
|
||||||
$("head style").each(function() {
|
// Update title
|
||||||
headContent = headContent + this.outerHTML
|
document.title = $pageHead.find("title").text();
|
||||||
});
|
|
||||||
$("head").html(headContent);
|
// Reference to $("head");
|
||||||
|
var $head = $("head");
|
||||||
|
|
||||||
|
// Update next & prev <link> tags
|
||||||
|
// Remove old
|
||||||
|
$head.find("link[rel=prev]").remove();
|
||||||
|
$head.find("link[rel=next]").remove();
|
||||||
|
|
||||||
|
// Add new next * prev <link> tags
|
||||||
|
$head.append($pageHead.find("link[rel=prev]"));
|
||||||
|
$head.append($pageHead.find("link[rel=next]"));
|
||||||
|
|
||||||
// Merge body
|
// Merge body
|
||||||
var bodyClass = $(".book").attr("class");
|
var bodyClass = $(".book").attr("class");
|
||||||
|
|||||||
@@ -39,6 +39,6 @@
|
|||||||
body {
|
body {
|
||||||
.page {
|
.page {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
.markdown-content(#333, 1.6);
|
.markdown-content(#000, 1.6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
@import "mixins.less";
|
@import "mixins.less";
|
||||||
|
|
||||||
@import "website/fonts.less";
|
|
||||||
@import "website/variables.less";
|
@import "website/variables.less";
|
||||||
@import "website/languages.less";
|
@import "website/languages.less";
|
||||||
@import "website/header.less";
|
@import "website/header.less";
|
||||||
@@ -44,4 +43,5 @@ body {
|
|||||||
font-smoothing: antialiased;
|
font-smoothing: antialiased;
|
||||||
font-family: @font-family-base;
|
font-family: @font-family-base;
|
||||||
font-size: @font-size-base;
|
font-size: @font-size-base;
|
||||||
|
letter-spacing: .2px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,96 +0,0 @@
|
|||||||
@font-face {
|
|
||||||
font-family: 'Merriweather';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 250;
|
|
||||||
src: local('Merriweather Light'),url('@{FontPath}/merriweather/250.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Merriweather';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 250;
|
|
||||||
src: local('Merriweather Light Italic'),url('@{FontPath}/merriweather/250i.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Merriweather';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Merriweather'),url('@{FontPath}/merriweather/400.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Merriweather';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Merriweather Italic'),url('@{FontPath}/merriweather/400i.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Merriweather';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
src: local('Merriweather Bold'),url('@{FontPath}/merriweather/700.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Merriweather';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 700;
|
|
||||||
src: local('Merriweather Bold Italic'),url('@{FontPath}/merriweather/700i.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Merriweather';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 900;
|
|
||||||
src: local('Merriweather Heavy'),url('@{FontPath}/merriweather/900.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Merriweather';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 900;
|
|
||||||
src: local('Merriweather Heavy Italic'),url('@{FontPath}/merriweather/900i.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 300;
|
|
||||||
src: local('Open Sans Light'),url('@{FontPath}/opensans/300.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 300;
|
|
||||||
src: local('Open Sans Light Italic'),url('@{FontPath}/opensans/300i.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Open Sans Regular'),url('@{FontPath}/opensans/400.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 400;
|
|
||||||
src: local('Open Sans Italic'),url('@{FontPath}/opensans/400i.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 600;
|
|
||||||
src: local('Open Sans Semibold'),url('@{FontPath}/opensans/600.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 600;
|
|
||||||
src: local('Open Sans Semibold Italic'),url('@{FontPath}/opensans/600i.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
src: local('Open Sans Bold'),url('@{FontPath}/opensans/700.woff') format('woff');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 700;
|
|
||||||
src: local('Open Sans Bold Italic'),url('@{FontPath}/opensans/700i.woff') format('woff');
|
|
||||||
}
|
|
||||||
@@ -95,8 +95,8 @@
|
|||||||
@border-radius-small: 1px;
|
@border-radius-small: 1px;
|
||||||
|
|
||||||
// Fonts
|
// Fonts
|
||||||
@font-family-serif: "Merriweather", Georgia, serif;
|
@font-family-serif: Georgia, serif;
|
||||||
@font-family-sans: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
@font-family-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
@font-family-base: @font-family-sans;
|
@font-family-base: @font-family-sans;
|
||||||
@headings-font-family: inherit;
|
@headings-font-family: inherit;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user