diff --git a/extension/read-asciidoctor.js b/extension/read-asciidoctor.js index 6bb68d7..461a887 100644 --- a/extension/read-asciidoctor.js +++ b/extension/read-asciidoctor.js @@ -90,7 +90,7 @@ function extReadAsciidoc(options) { imgteaser: function () { return indexData.imgteaser; }, status: function () { return file.attributes.status; }, modedev: function () { return indexData.modeDev; }, - canonicalUrl: function () { return subdirectory + "/" + dir + "/" + filename + ".html"; } + canonicalUrl: function () { return (subdirectory + "/" + dir + "/" + filename + ".html").replace('//', '/'); } }; if (file.attributes.status !== 'draft') { file.indexData = indexData; diff --git a/extension/read-asciidoctor.ts b/extension/read-asciidoctor.ts index e6e9e25..e259acc 100644 --- a/extension/read-asciidoctor.ts +++ b/extension/read-asciidoctor.ts @@ -102,7 +102,7 @@ export function extReadAsciidoc(options: Options): Transform { imgteaser: () => indexData.imgteaser, status: () => file.attributes.status, modedev: () => indexData.modeDev, - canonicalUrl: () => `${subdirectory}/${dir}/${filename}.html` + canonicalUrl: () => `${subdirectory}/${dir}/${filename}.html`.replace('//', '/') }; if (file.attributes.status !== 'draft') {