mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-29 05:29:02 +00:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 799815d85a | |||
| 2946246834 | |||
| 6d276d1e79 | |||
| 6a3a369b3e | |||
| 5d8afa2135 | |||
| ab3e6aa8ce | |||
| 822092736e | |||
| 7497acd2e3 | |||
| ae137885b8 | |||
| b964cc7009 | |||
| c2ea126c5f | |||
| b668dba479 | |||
| 2cae5a0310 | |||
| b6a0f3ff67 | |||
| fa00b52fb5 | |||
| 2999d90907 | |||
| b6696bcad2 | |||
| 728c87c525 | |||
| ace394ee2d | |||
| 076ee98f64 | |||
| 2e472654ca | |||
| d46bd14678 | |||
| b3e5b3d106 | |||
| b830ef5dca | |||
| 45326c4ad2 |
@@ -32,7 +32,7 @@ Options for commands `build` and `serve` are:
|
|||||||
```
|
```
|
||||||
-o, --output <directory> Path to output directory, defaults to ./_book
|
-o, --output <directory> Path to output directory, defaults to ./_book
|
||||||
-f, --format <name> Change generation format, defaults to site, availables are: site, page, pdf, json
|
-f, --format <name> Change generation format, defaults to site, availables are: site, page, pdf, json
|
||||||
--config <config file> Configuration file to use, defualt to book.json
|
--config <config file> Configuration file to use, defaults to book.json
|
||||||
```
|
```
|
||||||
|
|
||||||
GitBook load the default configuration from a `book.json` file in the repository if it exists.
|
GitBook load the default configuration from a `book.json` file in the repository if it exists.
|
||||||
@@ -42,24 +42,42 @@ Here are the options that can be stored in this file:
|
|||||||
```
|
```
|
||||||
{
|
{
|
||||||
// Folders to use for output (caution: it override the value from the command line)
|
// Folders to use for output (caution: it override the value from the command line)
|
||||||
output: null,
|
"output": null,
|
||||||
|
|
||||||
// Generator to use for building (caution: it override the value from the command line)
|
// Generator to use for building (caution: it override the value from the command line)
|
||||||
generator: "site",
|
"generator": "site",
|
||||||
|
|
||||||
// Book title and description (defaults are extracted from the README)
|
// Book title and description (defaults are extracted from the README)
|
||||||
title: null,
|
"title": null,
|
||||||
description: null,
|
"description": null,
|
||||||
|
|
||||||
// GitHub informations (defaults are extracted using git)
|
// GitHub informations (defaults are extracted using git)
|
||||||
github: null,
|
"github": null,
|
||||||
githubHost: 'https://github.com/',
|
"githubHost": "https://github.com/",
|
||||||
|
|
||||||
// Plugins list, can contain "-name" for removing default plugins
|
// Plugins list, can contain "-name" for removing default plugins
|
||||||
plugins: [],
|
"plugins": [],
|
||||||
|
|
||||||
// Global configuration for plugins
|
// Global configuration for plugins
|
||||||
pluginsConfig: {}
|
"pluginsConfig": {},
|
||||||
|
|
||||||
|
// Links in template (null: default, false: remove, string: new value)
|
||||||
|
"links": {
|
||||||
|
// Link to home in the top-left corner
|
||||||
|
"home": null,
|
||||||
|
|
||||||
|
// Links in top of sidebar
|
||||||
|
"about": null,
|
||||||
|
"issues": null,
|
||||||
|
"edit": null,
|
||||||
|
|
||||||
|
// Sharing links
|
||||||
|
"sharing": {
|
||||||
|
"google": null,
|
||||||
|
"facebook": null,
|
||||||
|
"twitter": null
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -160,7 +178,7 @@ GitBook will read the `.gitignore`, `.bookignore` and `.ignore` files to get a l
|
|||||||
|
|
||||||
#### Plugins
|
#### Plugins
|
||||||
|
|
||||||
Plugins can used to extend your book functionnalities. Read [GitbookIO/plugin](https://github.com/GitbookIO/plugin) for more informations about how to build a plugin for gitbook.
|
Plugins can 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.
|
||||||
|
|
||||||
##### Default plugins:
|
##### Default plugins:
|
||||||
|
|
||||||
@@ -171,5 +189,8 @@ Plugins can used to extend your book functionnalities. Read [GitbookIO/plugin](h
|
|||||||
|
|
||||||
* [Google Analytics](https://github.com/GitbookIO/plugin-ga): Google Analytics tracking for your book
|
* [Google Analytics](https://github.com/GitbookIO/plugin-ga): Google Analytics tracking for your book
|
||||||
* [Disqus](https://github.com/GitbookIO/plugin-disqus): Disqus comments integration in your book
|
* [Disqus](https://github.com/GitbookIO/plugin-disqus): Disqus comments integration in your book
|
||||||
* [Transform comments to notes](https://github.com/erixtekila/gitbook-plugin-comments): Allow markdown comments to be inserted in HTML output
|
* [Transform annoted quotes to notes](https://github.com/erixtekila/gitbook-plugin-richquotes): Allow extra markdown markup to render blockquotes as nice notes
|
||||||
* [Send code to console](https://github.com/erixtekila/gitbook-plugin-toconsole): Evaluate javascript blockin the browser inspector's console
|
* [Send code to console](https://github.com/erixtekila/gitbook-plugin-toconsole): Evaluate javascript blockin the browser inspector's console
|
||||||
|
* [Revealable sections](https://github.com/mrpotes/gitbook-plugin-reveal): Reveal sections of the page using buttons made from the first title in each section
|
||||||
|
* [Markdown within HTML](https://github.com/mrpotes/gitbook-plugin-nestedmd): Process markdown within HTML blocks - allows custom layout options for individual pages
|
||||||
|
* [Bootstrap JavaScript plugins](https://github.com/mrpotes/gitbook-plugin-bootstrapjs): Use the [Bootstrap JavaScript plugins](http://getbootstrap.com/javascript) in your online GitBook
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ build.command(prog.command('serve [source_dir]'))
|
|||||||
if (!options.watch) return;
|
if (!options.watch) return;
|
||||||
return utils.watch(_options.input)
|
return utils.watch(_options.input)
|
||||||
.then(function(filepath) {
|
.then(function(filepath) {
|
||||||
console.log("Restart after change in "+path.relative(dir, filepath));
|
console.log("Restart after change in files");
|
||||||
console.log('');
|
console.log('');
|
||||||
return generate();
|
return generate();
|
||||||
})
|
})
|
||||||
|
|||||||
+16
-11
@@ -28,29 +28,34 @@ var generate = function(options) {
|
|||||||
|
|
||||||
options = _.defaults(options || {}, {
|
options = _.defaults(options || {}, {
|
||||||
// Folders to use
|
// Folders to use
|
||||||
input: null,
|
"input": null,
|
||||||
output: null,
|
"output": null,
|
||||||
|
|
||||||
// Config file (relative to input)
|
// Config file (relative to input)
|
||||||
configFile: "book.json",
|
"configFile": "book.json",
|
||||||
|
|
||||||
// Output generator
|
// Output generator
|
||||||
generator: "site",
|
"generator": "site",
|
||||||
|
|
||||||
// Book title, keyword, description
|
// Book title, keyword, description
|
||||||
title: null,
|
"title": null,
|
||||||
description: null,
|
"description": null,
|
||||||
|
|
||||||
// Origin github repository id
|
// Origin github repository id
|
||||||
github: null,
|
"github": null,
|
||||||
githubHost: 'https://github.com/',
|
"githubHost": 'https://github.com/',
|
||||||
|
|
||||||
// Theming
|
// Theming
|
||||||
theme: path.resolve(__dirname, '../../theme'),
|
"theme": path.resolve(__dirname, '../../theme'),
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
plugins: [],
|
"plugins": [],
|
||||||
pluginsConfig: {}
|
"pluginsConfig": {},
|
||||||
|
|
||||||
|
// Links
|
||||||
|
"links": {
|
||||||
|
"about": null
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!options.input) {
|
if (!options.input) {
|
||||||
|
|||||||
@@ -86,9 +86,14 @@ Plugin.prototype.callHook = function(name, context, data) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Has assets
|
||||||
|
Plugin.prototype.hasAssets = function(out) {
|
||||||
|
return (this.infos.book && this.infos.book.assets);
|
||||||
|
};
|
||||||
|
|
||||||
// Copy plugin assets fodler
|
// Copy plugin assets fodler
|
||||||
Plugin.prototype.copyAssets = function(out) {
|
Plugin.prototype.copyAssets = function(out) {
|
||||||
if (!this.infos.book || !this.infos.book.assets) return Q();
|
if (!this.hasAssets()) return Q();
|
||||||
return fs.copy(
|
return fs.copy(
|
||||||
this.resolveFile(this.infos.book.assets),
|
this.resolveFile(this.infos.book.assets),
|
||||||
out
|
out
|
||||||
|
|||||||
+31
-22
@@ -80,7 +80,9 @@ Generator.prototype._writeTemplate = function(tpl, options, output, interpolate)
|
|||||||
allNavigation: that.options.navigation,
|
allNavigation: that.options.navigation,
|
||||||
|
|
||||||
plugins: that.plugins,
|
plugins: that.plugins,
|
||||||
pluginsConfig: JSON.stringify(that.options.pluginsConfig)
|
pluginsConfig: JSON.stringify(that.options.pluginsConfig),
|
||||||
|
|
||||||
|
options: that.options
|
||||||
}, options));
|
}, options));
|
||||||
})
|
})
|
||||||
.then(interpolate)
|
.then(interpolate)
|
||||||
@@ -100,7 +102,6 @@ Generator.prototype.indexPage = function(lexed, pagePath) {
|
|||||||
// Convert a markdown file to html
|
// Convert a markdown file to html
|
||||||
Generator.prototype.convertFile = function(content, _input) {
|
Generator.prototype.convertFile = function(content, _input) {
|
||||||
var that = this;
|
var that = this;
|
||||||
var progress = parse.progress(this.options.navigation, _input);
|
|
||||||
|
|
||||||
_output = _input.replace(".md", ".html");
|
_output = _input.replace(".md", ".html");
|
||||||
if (_output == "README.html") _output = "index.html";
|
if (_output == "README.html") _output = "index.html";
|
||||||
@@ -109,19 +110,28 @@ Generator.prototype.convertFile = function(content, _input) {
|
|||||||
var output = path.join(this.options.output, _output);
|
var output = path.join(this.options.output, _output);
|
||||||
var basePath = path.relative(path.dirname(output), this.options.output) || ".";
|
var basePath = path.relative(path.dirname(output), this.options.output) || ".";
|
||||||
|
|
||||||
|
var page = {
|
||||||
|
path: _input,
|
||||||
|
content: content,
|
||||||
|
progress: parse.progress(this.options.navigation, _input)
|
||||||
|
};
|
||||||
|
|
||||||
|
var _callHook = function(name) {
|
||||||
|
return that.callHook(name, page)
|
||||||
|
.then(function(_page) {
|
||||||
|
page = _page;
|
||||||
|
return page;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
return Q()
|
return Q()
|
||||||
.then(function() {
|
.then(function() {
|
||||||
// Send content to plugins
|
// Send content to plugins
|
||||||
return that.callHook("page:before", {
|
return _callHook("page:before");
|
||||||
path: _input,
|
|
||||||
content: content
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.then(function(_content) {
|
.then(function() {
|
||||||
content = _content.content;
|
|
||||||
|
|
||||||
// Lex page
|
// Lex page
|
||||||
return parse.lex(content);
|
return parse.lex(page.content);
|
||||||
})
|
})
|
||||||
.then(function(lexed) {
|
.then(function(lexed) {
|
||||||
// Index page in search
|
// Index page in search
|
||||||
@@ -137,28 +147,26 @@ Generator.prototype.convertFile = function(content, _input) {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then(function(sections) {
|
.then(function(sections) {
|
||||||
|
page.sections = sections;
|
||||||
|
|
||||||
// Use plugin hook
|
// Use plugin hook
|
||||||
return that.callHook("page", {
|
return _callHook("page");
|
||||||
path: _input,
|
|
||||||
sections: sections
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.then(function(_page) {
|
.then(function() {
|
||||||
that.manifest.add("CACHE", _output);
|
that.manifest.add("CACHE", _output);
|
||||||
|
|
||||||
return that._writeTemplate(that.template, {
|
return that._writeTemplate(that.template, {
|
||||||
progress: _page.progress,
|
progress: page.progress,
|
||||||
|
|
||||||
_input: _input,
|
_input: _input,
|
||||||
content: _page.sections,
|
content: page.sections,
|
||||||
|
|
||||||
basePath: basePath,
|
basePath: basePath,
|
||||||
staticBase: path.join(basePath, "gitbook"),
|
staticBase: path.join(basePath, "gitbook"),
|
||||||
}, output, function(html) {
|
}, output, function(html) {
|
||||||
return that.callHook("page:after", {
|
page.content = html;
|
||||||
path: _input,
|
|
||||||
content: html
|
return _callHook("page:after").get("content")
|
||||||
}).get("content")
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -199,8 +207,9 @@ Generator.prototype.copyAssets = function() {
|
|||||||
.then(function() {
|
.then(function() {
|
||||||
return Q.all(
|
return Q.all(
|
||||||
_.map(that.plugins.list, function(plugin) {
|
_.map(that.plugins.list, function(plugin) {
|
||||||
var pluginAssets = path.join(that.options.output, "gitbook/plugins/", plugin.name);
|
if (!plugin.hasAssets()) return Q();
|
||||||
|
|
||||||
|
var pluginAssets = path.join(that.options.output, "gitbook/plugins/", plugin.name);
|
||||||
return plugin.copyAssets(pluginAssets)
|
return plugin.copyAssets(pluginAssets)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return that.manifest.addFolder(pluginAssets, "gitbook/plugins/"+plugin.name);
|
return that.manifest.addFolder(pluginAssets, "gitbook/plugins/"+plugin.name);
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitbook",
|
"name": "gitbook",
|
||||||
"version": "0.4.0",
|
"version": "0.4.2",
|
||||||
"homepage": "http://www.gitbook.io/",
|
"homepage": "http://www.gitbook.io/",
|
||||||
"description": "Library and cmd utility to generate GitBooks",
|
"description": "Library and cmd utility to generate GitBooks",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"highlight.js": "8.0.0",
|
"highlight.js": "8.0.0",
|
||||||
"tmp": "0.0.23",
|
"tmp": "0.0.23",
|
||||||
"semver": "2.2.1",
|
"semver": "2.2.1",
|
||||||
"gaze": "0.6.4",
|
"gaze": "~0.5.1",
|
||||||
"resolve": "0.6.3",
|
"resolve": "0.6.3",
|
||||||
|
|
||||||
"gitbook-plugin": "0.0.2",
|
"gitbook-plugin": "0.0.2",
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -28,7 +28,7 @@ define([
|
|||||||
.done(function (html) {
|
.done(function (html) {
|
||||||
// Push url to history
|
// Push url to history
|
||||||
if (push) history.pushState({ path: url }, null, url);
|
if (push) history.pushState({ path: url }, null, url);
|
||||||
|
|
||||||
// Replace html content
|
// Replace html content
|
||||||
html = html.replace( /<(\/?)(html|head|body)([^>]*)>/ig, function(a,b,c,d){
|
html = html.replace( /<(\/?)(html|head|body)([^>]*)>/ig, function(a,b,c,d){
|
||||||
return '<' + b + 'div' + ( b ? '' : ' data-element="' + c + '"' ) + d + '>';
|
return '<' + b + 'div' + ( b ? '' : ' data-element="' + c + '"' ) + d + '>';
|
||||||
@@ -36,6 +36,7 @@ define([
|
|||||||
|
|
||||||
var $page = $(html);
|
var $page = $(html);
|
||||||
var $pageHead = $page.find("[data-element=head]");
|
var $pageHead = $page.find("[data-element=head]");
|
||||||
|
var $pageBody = $page.find('.book');
|
||||||
|
|
||||||
// Merge heads
|
// Merge heads
|
||||||
var headContent = $pageHead.html()
|
var headContent = $pageHead.html()
|
||||||
@@ -45,13 +46,11 @@ define([
|
|||||||
});
|
});
|
||||||
$("head").html(headContent);
|
$("head").html(headContent);
|
||||||
|
|
||||||
// Update header, body
|
// Merge body
|
||||||
$('.book-header').html($page.find('.book-header').html());
|
|
||||||
$('.book-body').html($page.find('.book-body').html());
|
|
||||||
|
|
||||||
// Update summary
|
|
||||||
var scrollPosition = $('.book-summary .summary').scrollTop();
|
var scrollPosition = $('.book-summary .summary').scrollTop();
|
||||||
$('.book-summary').html($page.find('.book-summary').html());
|
$pageBody.toggleClass("with-summary", $(".book").hasClass("with-summary"))
|
||||||
|
|
||||||
|
$(".book").replaceWith($pageBody);
|
||||||
$('.book-summary .summary').scrollTop(scrollPosition);
|
$('.book-summary .summary').scrollTop(scrollPosition);
|
||||||
|
|
||||||
// Update state
|
// Update state
|
||||||
@@ -134,7 +133,7 @@ define([
|
|||||||
if (url) handleNavigation(url, true);
|
if (url) handleNavigation(url, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var init = function() {
|
var init = function() {
|
||||||
// Prevent cache so that using the back button works
|
// Prevent cache so that using the back button works
|
||||||
@@ -157,7 +156,7 @@ define([
|
|||||||
$(document).on('click', ".navigation-prev", handlePagination);
|
$(document).on('click', ".navigation-prev", handlePagination);
|
||||||
$(document).on('click', ".navigation-next", handlePagination);
|
$(document).on('click', ".navigation-next", handlePagination);
|
||||||
$(document).on('click', ".summary [data-path] a", handlePagination);
|
$(document).on('click', ".summary [data-path] a", handlePagination);
|
||||||
|
|
||||||
$(window).resize(updateNavigationPosition);
|
$(window).resize(updateNavigationPosition);
|
||||||
|
|
||||||
// Prepare current page
|
// Prepare current page
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
.book {
|
.book {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
.book-body {
|
.book-body {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
top: @header-height;
|
top: @header-height;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
.book-header {
|
.book-header {
|
||||||
font-family: @font-family-sans;
|
font-family: @font-family-sans;
|
||||||
|
|
||||||
position: fixed;
|
position: absolute;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.book .book-body .page-wrapper .page-inner section.normal {
|
.book .book-body .page-wrapper .page-inner section.normal {
|
||||||
padding: 25px 0px;
|
padding-bottom: 25px;
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
color:@page-color;
|
color:@page-color;
|
||||||
|
|
||||||
@@ -72,25 +72,25 @@
|
|||||||
font-size: inherit; }
|
font-size: inherit; }
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 28px;
|
font-size: 2.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 24px;
|
font-size: 2em;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
font-size: 18px; }
|
font-size: 1.5em; }
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
font-size: 16px; }
|
font-size: 1.2em; }
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
font-size: 14px; }
|
font-size: 1em; }
|
||||||
|
|
||||||
h6 {
|
h6 {
|
||||||
font-size: 14px; }
|
font-size: 1em; }
|
||||||
|
|
||||||
p, blockquote, ul, ol, dl, table, pre {
|
p, blockquote, ul, ol, dl, table, pre {
|
||||||
margin: 15px 0; }
|
margin: 15px 0; }
|
||||||
|
|||||||
@@ -40,6 +40,11 @@
|
|||||||
width: 50%;
|
width: 50%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
|
&.navigation-unique {
|
||||||
|
max-width: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
.bar {
|
.bar {
|
||||||
height: @bar-height;
|
height: @bar-height;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
.book-summary {
|
.book-summary {
|
||||||
font-family: @font-family-sans;
|
font-family: @font-family-sans;
|
||||||
|
|
||||||
position: fixed;
|
position: absolute;
|
||||||
top: @header-height;
|
top: @header-height;
|
||||||
left: -@sidebar-width;
|
left: -@sidebar-width;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="book-header">
|
<div class="book-header">
|
||||||
<!-- Actions Left -->
|
<!-- Actions Left -->
|
||||||
{% if githubId %}
|
{% if options.links.home !== false and (options.links.home != null or githubId) %}
|
||||||
<a href="{{ githubHost }}{{ githubId }}" target="_blank" class="btn pull-left"><i class="fa fa-github-alt"></i></a>
|
<a href="{{ options.links.home|default(githubHost+githubId) }}" target="_blank" class="btn pull-left"><i class="fa fa-bookmark-o"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="#" class="btn pull-left toggle-summary"><i class="fa fa-align-justify"></i></a>
|
<a href="#" class="btn pull-left toggle-summary"><i class="fa fa-align-justify"></i></a>
|
||||||
<a href="#" class="btn pull-left toggle-search"><i class="fa fa-search"></i></a>
|
<a href="#" class="btn pull-left toggle-search"><i class="fa fa-search"></i></a>
|
||||||
@@ -12,13 +12,19 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!-- Actions Right -->
|
<!-- Actions Right -->
|
||||||
|
{% if options.links.sharing.google !== false %}
|
||||||
<a href="#" target="_blank" class="btn pull-right" data-sharing="google-plus"><i class="fa fa-google-plus"></i></a>
|
<a href="#" target="_blank" class="btn pull-right" data-sharing="google-plus"><i class="fa fa-google-plus"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if options.links.sharing.facebook !== false %}
|
||||||
<a href="#" target="_blank" class="btn pull-right" data-sharing="facebook"><i class="fa fa-facebook"></i></a>
|
<a href="#" target="_blank" class="btn pull-right" data-sharing="facebook"><i class="fa fa-facebook"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if options.links.sharing.twitter !== false %}
|
||||||
<a href="#" target="_blank" class="btn pull-right" data-sharing="twitter"><i class="fa fa-twitter"></i></a>
|
<a href="#" target="_blank" class="btn pull-right" data-sharing="twitter"><i class="fa fa-twitter"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if githubId %}
|
{% if githubId %}
|
||||||
<a href="{{ githubHost }}{{ githubId }}/stargazers" target="_blank" class="btn pull-right count-star"><i class="fa fa-star-o"></i> Star (<span>-</span>)</a>
|
<a href="{{ githubHost }}{{ githubId }}/stargazers" target="_blank" class="btn pull-right count-star hidden-xs"><i class="fa fa-star-o"></i> Star (<span>-</span>)</a>
|
||||||
<a href="{{ githubHost }}{{ githubId }}/watchers" target="_blank" class="btn pull-right count-watch"><i class="fa fa-eye"></i> Watch (<span>-</span>)</a>
|
<a href="{{ githubHost }}{{ githubId }}/watchers" target="_blank" class="btn pull-right count-watch hidden-xs"><i class="fa fa-eye"></i> Watch (<span>-</span>)</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
|
|||||||
@@ -3,18 +3,28 @@
|
|||||||
<input type="text" placeholder="Search" class="form-control" />
|
<input type="text" placeholder="Search" class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
<ul class="summary">
|
<ul class="summary">
|
||||||
{% if githubId %}
|
{% if options.links.about !== false && (options.links.about != null || githubId) %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ githubHost }}{{ githubAuthor }}" target="blank">About the author</a>
|
<a href="{{ options.links.about|default(githubHost+githubAuthor) }}" target="blank">About the author</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if options.links.issues !== false && (options.links.issues != null || githubId) %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ githubHost }}{{ githubId }}/issues" target="blank">Questions and Issues</a>
|
<a href="{{ options.links.issues|default(githubHost+githubId+"/issues") }}" target="blank">Questions and Issues</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if options.links.contribute !== false && (options.links.contribute != null || githubId) %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ githubHost }}{{ githubId }}/edit/master/{{ _input }}" target="blank">Edit and Contribute</a>
|
<a href="{{ options.links.contribute|default(githubHost+githubId+"/edit/master/"+_input) }}" target="blank">Edit and Contribute</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if options.links.contribute || options.links.issues || options.links.about || githubId %}
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<li data-level="0" data-path="index.html">
|
<li data-level="0" data-path="index.html">
|
||||||
<a href="{{ basePath }}/"><i class="fa fa-check"></i> Introduction</a>
|
<a href="{{ basePath }}/"><i class="fa fa-check"></i> Introduction</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -44,5 +54,12 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if options.links.gitbook !== false %}
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li>
|
||||||
|
<a href="http://www.gitbook.io/" target="blank">Generated using GitBook</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if progress.current.prev and progress.current.prev.path %}
|
{% if progress.current.prev and progress.current.prev.path %}
|
||||||
<a href="{{ basePath }}/{{ progress.current.prev.path|mdLink }}" class="navigation navigation-prev"><i class="fa fa-angle-left"></i></a>
|
<a href="{{ basePath }}/{{ progress.current.prev.path|mdLink }}" class="navigation navigation-prev {% if !progress.current.next or !progress.current.next.path %}navigation-unique{% endif %}"><i class="fa fa-angle-left"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if progress.current.next and progress.current.next.path %}
|
{% if progress.current.next and progress.current.next.path %}
|
||||||
<a href="{{ basePath }}/{{ progress.current.next.path|mdLink }}" class="navigation navigation-next"><i class="fa fa-angle-right"></i></a>
|
<a href="{{ basePath }}/{{ progress.current.next.path|mdLink }}" class="navigation navigation-next {% if !progress.current.prev or !progress.current.prev.path %}navigation-unique{% endif %}"><i class="fa fa-angle-right"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user