mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-23 02:53:29 +00:00
Move theme folder "book" to "website"
This commit is contained in:
@@ -36,13 +36,13 @@ Generator.prototype.load = function() {
|
||||
// Load all templates
|
||||
Generator.prototype.loadTemplates = function() {
|
||||
this.template = swig.compileFile(
|
||||
this.plugins.template("site:page") || path.resolve(this.options.theme, 'templates/book/page.html')
|
||||
this.plugins.template("site:page") || path.resolve(this.options.theme, 'templates/website/page.html')
|
||||
);
|
||||
this.langsTemplate = swig.compileFile(
|
||||
this.plugins.template("site:langs") || path.resolve(this.options.theme, 'templates/book/langs.html')
|
||||
this.plugins.template("site:langs") || path.resolve(this.options.theme, 'templates/website/langs.html')
|
||||
);
|
||||
this.glossaryTemplate = swig.compileFile(
|
||||
this.plugins.template("site:glossary") || path.resolve(this.options.theme, 'templates/book/glossary.html')
|
||||
this.plugins.template("site:glossary") || path.resolve(this.options.theme, 'templates/website/glossary.html')
|
||||
);
|
||||
};
|
||||
|
||||
@@ -154,12 +154,12 @@ Generator.prototype.convertFile = function(content, _input) {
|
||||
if (_output == "README.html") _output = "index.html";
|
||||
var output = path.join(this.options.output, _output);
|
||||
var basePath = path.relative(path.dirname(output), this.options.output) || ".";
|
||||
|
||||
|
||||
// Bug fix for issue #493 which would occur when relative-links are 2-level or more deep in win32
|
||||
if (process.platform === 'win32') {
|
||||
basePath = basePath.replace(/\\/g, '/');
|
||||
}
|
||||
|
||||
|
||||
return this.prepareFile(content, _input)
|
||||
.then(function(page) {
|
||||
// Index page in search
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "../layout.html" %}
|
||||
{% extends "./layout.html" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
Executable → Regular
@@ -1,4 +1,4 @@
|
||||
{% extends "../layout.html" %}
|
||||
{% extends "./layout.html" %}
|
||||
|
||||
{% block head %}
|
||||
{% parent %}
|
||||
Reference in New Issue
Block a user