Skip to content

Commit 420d8b3

Browse files
committed
Added canonical URL
1 parent c60d95c commit 420d8b3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/template.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
66
<title> <%= title %> </title>
7+
<link rel="canonical" href="<%= canonicalLink %>" />
78
</head>
89

910
<body class="d-flex flex-column height-full">

webpack.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const srcMarkdownFilePath = path.join(
2222
const title = `Руководство Google по стилю написания кода
2323
на языке TypeScript (перевод)`;
2424
const menuTitle = "Содержание";
25+
const canonicalLink = "https://olegbarabanov.github.io/google-typescript-style-guide-ru/";
2526

2627
module.exports = {
2728
cache: false,
@@ -42,6 +43,7 @@ module.exports = {
4243
new webpack.DefinePlugin({
4344
title: JSON.stringify(title),
4445
menuTitle: JSON.stringify(menuTitle),
46+
canonicalLink: JSON.stringify(canonicalLink),
4547
content: webpack.DefinePlugin.runtimeValue(
4648
() => {
4749
const markdown = fs.readFileSync(srcMarkdownFilePath);

0 commit comments

Comments
 (0)