Compare commits

...

45 Commits

Author SHA1 Message Date
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é e1594cde2c Remove doc about custom styles 2015-01-19 13:14:52 +01:00
24 changed files with 296 additions and 61 deletions
+2
View File
@@ -28,6 +28,8 @@ Translators
- Andrey Akinshin (@AndreyAkinshin)
- Norwegian
- Knut Melvær (@kmelve)
- Persian (Farsi)
- Mohammad Hossein Mojtahedi (@mhm5000)
- Portuguese
- Ryan O'Mullan (@RyanOM)
- Spanish
+12
View File
@@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 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)
+31 -13
View File
@@ -1,12 +1,17 @@
GitBook
=======
:warning: This branch contains the version 2.0.
[![Build Status](https://travis-ci.org/GitbookIO/gitbook.png?branch=master)](https://travis-ci.org/GitbookIO/gitbook)
[![NPM version](https://badge.fury.io/js/gitbook.svg)](http://badge.fury.io/js/gitbook)
[![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/github/GitbookIO/gitbook?branch=master&svg=true)](https://ci.appveyor.com/project/SamyPesse/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 web-editor is [also available](https://www.gitbook.com/editor). You can follow [@GitBookIO](https://twitter.com/GitBookIO) on Twitter. Complete documentation is available at [help.gitbook.io](http://help.gitbook.io/).
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 web-editor is [also available](https://www.gitbook.com/editor).
Stay updated by following [@GitBookIO](https://twitter.com/GitBookIO) on Twitter or [GitBook](https://www.facebook.com/gitbookcom) on Facebook.
Complete documentation is available at [help.gitbook.com](http://help.gitbook.com/).
![Image](https://raw.github.com/GitbookIO/gitbook/master/preview.png)
@@ -38,14 +43,14 @@ $ gitbook build ./repository ./outputFolder
## Features
* [Output as a website or ebook (pdf, epub, mobi)](#output-formats)
* [Multi-Languages](#multi-languages)
* [Glossary](#glossary)
* [Cover](#cover)
* [AsciiDoc Support](#asciidoc)
* [Variables and Templating](#variables-and-templating)
* [Content References](#content-references)
* [Plugins](#plugins)
* [Output as a website or ebook (pdf, epub, mobi)](http://help.gitbook.com/format/output.html)
* [Multi-Languages](http://help.gitbook.com/format/languages.html)
* [Glossary](http://help.gitbook.com/format/glossary.html)
* [Cover](http://help.gitbook.com/format/cover.html)
* [AsciiDoc Support](http://help.gitbook.com/format/asciidoc.html)
* [Variables and Templating](http://help.gitbook.com/format/templating.html)
* [Content References](http://help.gitbook.com/format/conrefs.html)
* [Plugins](http://help.gitbook.com/plugins/index.html)
* Interractive reader website:
* Search
* Font Settings (Serif, Sans Serif)
@@ -199,7 +204,7 @@ The platform [GitBook.com](https://www.gitbook.com/) is like an "Heroku for book
Plugins can be used to extend your book's functionality. Read [GitbookIO/plugin](https://github.com/GitbookIO/plugin) for more information about how to build a plugin for GitBook.
Plugins needed to build a book can be installed using: `gitbook install ./`. You can find plugins at [plugins.gitbook.com](plugins.gitbook.com).
Plugins needed to build a book can be installed using: `gitbook install ./`. You can find plugins at [plugins.gitbook.com](http://plugins.gitbook.com).
## Debugging
@@ -209,3 +214,16 @@ You can use the options `--log=debug` and `--debug` to get better error messages
```
$ gitbook build ./ -- log=debug --debug
```
#### How to use the latest commit from GitBook in gitbook-cli
To use the latest commit from `GitBook/gitbook` with `gitbook-cli`:
```
$ git clone https://github.com/GitbookIO/gitbook.git ./gitbook
$ gitbook versions:link 2.0.0 ./gitbook
```
Now the version tag `2.0.0` wil be associated with the `./gitbook` folder.
You can uninstall it using: `gitbook versions:uninstall 2.0.0`.
+29
View File
@@ -0,0 +1,29 @@
# 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: "0.10"
- nodejs_version: "0.11"
# 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
# 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
+1 -1
View File
@@ -3,5 +3,5 @@
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 installe this package globally, you need to uninstall it."));
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'"));
+10 -1
View File
@@ -420,6 +420,7 @@ Book.prototype.parseSummary = function() {
.then(function(content) {
return summary.parser.summary(content, {
entryPoint: that.readmeFile,
entryPointTitle: "",
files: that.files
});
});
@@ -507,12 +508,20 @@ Book.prototype.parsePage = function(filename, options) {
return interpolate(options.interpolateTemplate);
})
// Prepare page markup
.then(function() {
return filetype.page.prepare(page.content)
.then(function(content) {
page.content = content;
});
})
// Generate template
.then(function() {
return that.template.renderPage(page);
})
// Parse markup
// Prepare and Parse markup
.then(function(content) {
page.content = content;
+12 -5
View File
@@ -96,17 +96,23 @@ Configuration.prototype.load = function() {
}
})
.then(function() {
if (!semver.satisfies(pkg.version, that.options.gitbook)) {
throw "GitBook version doesn't satisfy version required by the book: "+that.options.gitbook;
}
if (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.options.output = path.resolve(that.options.output || path.join(that.book.root, "_book"));
that.options.plugins = normalizePluginsList(that.options.plugins);
that.options.defaultsPlugins = normalizePluginsList(that.options.defaultsPlugins || "");
that.options.plugins = _.union(that.options.plugins, that.options.defaultsPlugins);
that.options.plugins = _.uniq(that.options.plugins, "name");
if (!semver.satisfies(pkg.version, that.options.gitbook)) {
throw "GitBook version doesn't satisfy version required by the book: "+that.options.gitbook;
}
if (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"));
// Default value for text direction (from language)
if (!that.options.direction) {
var lang = i18n.getByLanguage(that.options.language);
if (lang) that.options.direction = lang.direction;
}
that.options.gitbook = pkg.version;
@@ -141,6 +147,7 @@ Configuration.DEFAULT = {
"description": null,
"isbn": null,
"language": "en",
"direction": null,
// version of gitbook to use
"gitbook": "*",
+6
View File
@@ -64,6 +64,8 @@ Generator.prototype.finish = function() {
"--comments": that.options.description,
"--isbn": that.options.isbn,
"--authors": that.options.author,
"--language": that.options.language,
"--book-producer": "GitBook",
"--publisher": "GitBook",
"--chapter": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter ')]",
"--chapter-mark": "pagebreak",
@@ -91,6 +93,10 @@ Generator.prototype.finish = function() {
"--pdf-header-template": String(pdfOptions.headerTemplate) || "<p class='header'><span>"+that.options.title+"</span></p>",
"--pdf-footer-template": String(pdfOptions.footerTemplate) || "<p class='footer'><span>_SECTION_</span> <span style='float:right;'>_PAGENUM_</span></p>"
});
} else if (that.ebookFormat == "epub") {
_.extend(_options, {
"--dont-split-on-page-breaks": true
});
}
var command = [
+2 -1
View File
@@ -318,7 +318,8 @@ TemplateEngine.prototype.renderString = function(content, context, options) {
// infos about gitbook
gitbook: {
version: pkg.version
version: pkg.version,
generator: this.book.options.generator
}
});
options = _.defaults(options || {}, {
+3 -1
View File
@@ -9,7 +9,9 @@ var getLocales = _.memoize(function() {
return _.chain(locales)
.map(function(local) {
local = path.basename(local, ".json");
return [local, _.extend(require(path.join(I18N_PATH, local)), {
return [local, _.extend({
direction: "ltr"
}, require(path.join(I18N_PATH, local)), {
id: local
})];
})
+11 -10
View File
@@ -1,31 +1,32 @@
var _ = require("lodash");
var Q = require("q");
var fs = require("./fs");
var exec = require('child_process').exec;
var spawn = require('spawn-cmd').spawn;
var links = require("./links");
// Convert a svg file
var convertSVG = function(source, dest, options) {
if (!fs.existsSync(source)) return Q.reject(new Error("File doesn't exist: "+source));
var d = Q.defer();
options = _.defaults(options || {}, {
});
var command = "svgexport "+source+" "+dest;
//var command = shellescape(['svgexport', source, dest]);
var child = spawn('svgexport', [source, dest]);
var child = exec(command, function (error, stdout, stderr) {
if (error) {
if (error.code == 127) error = new Error("Need to install 'svgexport' using 'npm install svgexport -g'");
return d.reject(error);
}
if (fs.existsSync(dest)) {
child.on("error", function(error) {
if (error.code == "ENOENT") error = new Error("Need to install 'svgexport' using 'npm install svgexport -g'");
return d.reject(error);
});
child.on("close", function(code) {
if (code == 0 && fs.existsSync(dest)) {
d.resolve();
} else {
d.reject(new Error("Error converting "+source));
d.reject(new Error("Error converting "+source+" into "+dest));
}
});
+21 -8
View File
@@ -15,12 +15,27 @@ var isRelative = function(href) {
try {
var parsed = url.parse(href);
return !!(!parsed.protocol && parsed.path);// && parsed.path[0] != '/';
return !!(!parsed.protocol && parsed.path);
} catch(err) {}
return true;
};
// Return true if the link is an achor
var isAnchor = function(href) {
try {
var parsed = url.parse(href);
return !!(!parsed.protocol && !parsed.path && parsed.hash);
} catch(err) {}
return false;
};
// Normalize a path to be a link
var normalizeLink = function(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
@@ -36,7 +51,7 @@ var toAbsolute = function(_href, dir, outdir) {
_href = path.relative(outdir, hrefInRoot);
// Normalize windows paths
_href = _href.replace(/\\/g, '/');
_href = normalizeLink(_href);
return _href;
};
@@ -45,11 +60,7 @@ var toAbsolute = function(_href, dir, outdir) {
var join = function() {
var _href = path.join.apply(path, arguments);
if (process.platform === 'win32') {
_href = _href.replace(/\\/g, '/');
}
return _href;
return normalizeLink(_href);
};
// Change extension
@@ -61,9 +72,11 @@ var changeExtension = function(filename, newext) {
};
module.exports = {
isAnchor: isAnchor,
isRelative: isRelative,
isExternal: isExternal,
toAbsolute: toAbsolute,
join: join,
changeExtension: changeExtension
changeExtension: changeExtension,
normalize: normalizeLink
};
+17 -9
View File
@@ -1,5 +1,6 @@
var Q = require('q');
var _ = require('lodash');
var url = require('url');
var path = require('path');
var cheerio = require('cheerio');
var domSerializer = require('dom-serializer');
@@ -104,7 +105,7 @@ function normalizeHtml(src, options) {
// Generate filename
dest = "/"+fs.getUniqueFilename(outputRoot, dest);
svgContent[dest] = content;
svgContent[dest] = '<?xml version="1.0" encoding="UTF-8"?>'+content;
$(this).replaceWith($("<img>").attr("src", dest));
});
}
@@ -132,7 +133,7 @@ function normalizeHtml(src, options) {
}
var ext = path.extname(src);
var srcAbs = path.join("/", options.base, src);
var srcAbs = links.join("/", options.base, src);
// Test image extension
if (_.contains(imgUtils.INVALID, ext)) {
@@ -144,7 +145,7 @@ function normalizeHtml(src, options) {
var dest = "";
// Replace extension
dest = path.join(path.dirname(srcAbs), path.basename(srcAbs, ext)+".png");
dest = links.join(path.dirname(srcAbs), path.basename(srcAbs, ext)+".png");
dest = dest[0] == "/"? dest.slice(1) : dest;
// Get a name that doesn't exists
@@ -163,7 +164,7 @@ function normalizeHtml(src, options) {
dest: path.join("./", dest)
});
src = path.join("/", dest);
src = links.join("/", dest);
}
// Reset as relative to output
@@ -186,15 +187,22 @@ function normalizeHtml(src, options) {
var href = $(this).attr("href");
if (!href) return;
if (links.isRelative(href)) {
var absolutePath = path.join(options.base, href);
if (links.isAnchor(href)) {
// Keep it as it is
} else if (links.isRelative(href)) {
var parts = url.parse(path.join(options.base, href));
var absolutePath = parts.pathname;
var anchor = parts.hash;
// 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);
href = links.toAbsolute(href, options.base, options.output)+anchor;
} else {
// External links
$(this).attr("target", "_blank");
}
+8 -7
View File
@@ -1,6 +1,6 @@
{
"name": "gitbook",
"version": "2.0.0-alpha.9",
"version": "2.0.0-beta.2",
"homepage": "https://www.gitbook.com",
"description": "Library and cmd utility to generate GitBooks",
"main": "lib/index.js",
@@ -10,10 +10,10 @@
"lodash": "3.2.0",
"graceful-fs": "3.0.5",
"resolve": "0.6.3",
"fs-extra": "0.16.3",
"fs-extra": "0.16.5",
"fstream-ignore": "1.0.2",
"gitbook-parsers": "0.4.1",
"nunjucks": "git+https://github.com/mozilla/nunjucks.git#42d2b9f5c0ad5db8ca3a1fdbba5bde9fc4cc2c45",
"gitbook-parsers": "0.5.3",
"nunjucks": "git+https://github.com/mozilla/nunjucks.git#0f8b21b8df7e8e852b2e1889388653b7075f0d09",
"nunjucks-autoescape": "0.1.1",
"nunjucks-filter": "0.1.0",
"nunjucks-i18n": "1.0.0",
@@ -30,10 +30,11 @@
"URIjs": "1.14.1",
"request": "2.51.0",
"npm": "2.4.1",
"dom-serializer": "0.1.0"
"dom-serializer": "0.1.0",
"spawn-cmd": "0.0.2"
},
"devDependencies": {
"mocha": "1.18.2",
"mocha": "2.2.1",
"grunt": "~0.4.2",
"grunt-cli": "0.1.11",
"grunt-contrib-copy": "0.5.0",
@@ -42,7 +43,7 @@
"grunt-bower-install-simple": "0.9.2"
},
"scripts": {
"test": "export TESTING=true; mocha --reporter list --timeout 15000"
"test": "node_modules/.bin/mocha --reporter list --timeout 15000"
},
"repository": {
"type": "git",
+7
View File
@@ -13,6 +13,13 @@ describe('Links', function () {
assert(!links.isExternal("/folder/test.md"));
});
it('should correctly test anchor links', function() {
assert(links.isAnchor("#test"));
assert(links.isAnchor(" #test"));
assert(!links.isAnchor("https://google.fr#test"));
assert(!links.isAnchor("test.md#test"));
});
describe('toAbsolute', function() {
it('should correctly transform as absolute', function() {
assert.equal(links.toAbsolute("http://google.fr"), "http://google.fr");
+2 -2
View File
@@ -71,12 +71,12 @@ describe('Book parsing', function () {
assert.equal(_.size(NAVIGATION), 2);
assert(NAVIGATION["intro.md"])
assert.equal(NAVIGATION["intro.md"].title, "Introduction");
assert.equal(NAVIGATION["intro.md"].title, "");
assert.equal(NAVIGATION["intro.md"].prev, null);
assert.equal(NAVIGATION["intro.md"].next.title, "Article 1");
assert.equal(NAVIGATION["sub/test1.md"].title, "Article 1");
assert.equal(NAVIGATION["sub/test1.md"].prev.title, "Introduction");
assert.equal(NAVIGATION["sub/test1.md"].prev.title, "");
assert.equal(NAVIGATION["sub/test1.md"].next, null);
});
});
+37
View File
@@ -0,0 +1,37 @@
var path = require('path');
var _ = require('lodash');
var assert = require('assert');
var fs = require("fs");
var pkg = require("../package.json");
describe('Templating', function () {
before(function(done) {
testGeneration(books[0], "website", function(output) {}, done);
});
var testTpl = function(str, args, options) {
return books[0].template.renderString(str, args, options)
.then(books[0].template.postProcess)
};
it('should correctly have access to generator', function(done) {
qdone(
testTpl('{{ gitbook.generator }}')
.then(function(content) {
assert.equal(content, "website");
}),
done
);
});
it('should correctly have access to gitbook version', function(done) {
qdone(
testTpl('{{ gitbook.version }}')
.then(function(content) {
assert.equal(content, pkg.version.toString());
}),
done
);
});
});
+21
View File
@@ -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": "بلا",
"FONTSETTINGS_SERIF": "الرقيق"
}
+20
View File
@@ -0,0 +1,20 @@
{
"LANGS_CHOOSE": "ভাষা নির্বাচন করুন",
"GLOSSARY": "গ্লোসারি",
"GLOSSARY_INDEX": "ইন্ডেক্স",
"GLOSSARY_OPEN": "গ্লোসারি",
"GITBOOK_LINK": "গিটবুকের মাধ্যমে প্রকাশিত",
"SUMMARY": "সূচিপত্র",
"SUMMARY_INTRODUCTION": "সূচনা",
"SUMMARY_TOGGLE": "সূচিপত্র",
"SEARCH_TOGGLE": "অনুসন্ধান",
"SEARCH_PLACEHOLDER": "অনুসন্ধান",
"FONTSETTINGS_TOGGLE": "ফন্ট সেটিংস",
"SHARE_TOGGLE": "শেয়ার",
"SHARE_ON": "__platform__-এ শেয়ার",
"FONTSETTINGS_WHITE": "সাদা",
"FONTSETTINGS_SEPIA": "সেপিয়া",
"FONTSETTINGS_NIGHT": "রাত",
"FONTSETTINGS_SANS": "স্যান্স",
"FONTSETTINGS_SERIF": "শেরিফ"
}
+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"
}
+21
View File
@@ -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": "سنس",
"FONTSETTINGS_SERIF": "سریف"
}
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE HTML>
<html lang="{{ language }}" {% block htmlTag %}{% endblock %}>
<html lang="{{ language }}" {% block htmlTag %}{% endblock %} {% if options.direction == "rtl" %}dir="rtl"{% endif %}>
{{ htmlSnippet("html:start")|default("")|safe }}
<head>
{{ htmlSnippet("head:start")|default("")|safe }}
@@ -8,7 +8,7 @@
{% if item.level != "0" %}
<b>{{ item.level }}.</b>
{% endif %}
{% if item.introduction %}{% i18n "SUMMARY_INTRODUCTION" %}Introduction{% endi18n %}{% else %}{{ item.title }}{% endif %}
{% if item.introduction and not item.title %}{% i18n "SUMMARY_INTRODUCTION" %}Introduction{% endi18n %}{% else %}{{ item.title }}{% endif %}
</a>
{% else %}
<a target="_blank" href="{{ item.path }}">
+1 -1
View File
@@ -1,5 +1,5 @@
<!DOCTYPE HTML>
<html lang="{{ language }}">
<html lang="{{ language }}" {% if options.direction == "rtl" %}dir="rtl"{% endif %}>
{{ htmlSnippet("html:start")|default("")|safe }}
<head>
{{ htmlSnippet("head:start")|default("")|safe }}