This is an automated email from the ASF dual-hosted git repository.
cwylie pushed a commit to branch 0.16.0-incubating
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/0.16.0-incubating by this push:
new 3f22684 add canonical to the docs (#8731) (#8736)
3f22684 is described below
commit 3f22684100c15b73d1b57c7a39a4a2a8b289295e
Author: Clint Wylie <[email protected]>
AuthorDate: Fri Oct 25 01:15:09 2019 -0700
add canonical to the docs (#8731) (#8736)
---
website/script/fix-path.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/website/script/fix-path.js b/website/script/fix-path.js
index 715594e..15d78aa 100644
--- a/website/script/fix-path.js
+++ b/website/script/fix-path.js
@@ -40,7 +40,19 @@ try {
from: /\{\{DRUIDVERSION\}\}/g,
to: druidVersion,
});
+
+ // Add canonical header
+ replace.sync({
+ files: './build/ApacheDruid/docs/**/*.html',
+ from: /<meta name="generator" content="Docusaurus"\/>/g,
+ to: (match, fullText, b, filename) => {
+ const path = filename.replace('./build/ApacheDruid/', '');
+ return `<link rel="canonical"
href="https://druid.apache.org/${path}"/><meta name="generator"
content="Docusaurus"/>`;
+ },
+ });
+
console.log('Fixed versions');
+
} catch (error) {
console.error('Error occurred:', error);
process.exit(1);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]