Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

Add support for multilingual gitbooks #2

Merged
merged 2 commits into from
Apr 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var path = require('path');

module.exports = {
hooks: {
// After html generation
Expand All @@ -12,7 +14,9 @@ module.exports = {
config.label = "Edit This Page";
}

rtEditLink = '<a href="' + config.base + '/' + page.path + '" class="btn fa fa-edit pull-left">&nbsp;&nbsp;' + config.label + '</a>';
newPath = path.relative(this.options.originalInput, page.rawPath);

rtEditLink = '<a href="' + config.base + '/' + newPath + '" class="btn fa fa-edit pull-left">&nbsp;&nbsp;' + config.label + '</a>';

page.content = page.content.replace (
'<!-- Actions Right -->',
Expand Down