only add trailing slash on plugin pages

fixes that the trailing slash would have been added to the root and browser-usage.html as well
This commit is contained in:
Jan Piotrowski 2017-08-05 17:37:16 +02:00 committed by GitHub
parent 0cecf4e43f
commit 4e0673c8e9

View File

@ -22,7 +22,10 @@ module.exports = function jekyll(renderDocsProcessor) {
doc.URL = doc.outputPath.replace('docs//', 'docs/')
.replace('/index.md', '')
.replace('content/', '');
doc.URL = doc.URL+'/'; // add trailing slash
// add trailing slash to plugin pages
if(!doc.URL.endsWith("/") && !doc.URL.endsWith(".html")) {
doc.URL = doc.URL+'/';
}
});
const betaDocs = [];