Skip to content

Commit

Permalink
Added canonical URL
Browse files Browse the repository at this point in the history
  • Loading branch information
olegbarabanov committed Jun 6, 2024
1 parent c60d95c commit 420d8b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title> <%= title %> </title>
<link rel="canonical" href="<%= canonicalLink %>" />
</head>

<body class="d-flex flex-column height-full">
Expand Down
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const srcMarkdownFilePath = path.join(
const title = `Руководство Google по стилю написания кода
на языке TypeScript (перевод)`;
const menuTitle = "Содержание";
const canonicalLink = "https://olegbarabanov.github.io/google-typescript-style-guide-ru/";

module.exports = {
cache: false,
Expand All @@ -42,6 +43,7 @@ module.exports = {
new webpack.DefinePlugin({
title: JSON.stringify(title),
menuTitle: JSON.stringify(menuTitle),
canonicalLink: JSON.stringify(canonicalLink),
content: webpack.DefinePlugin.runtimeValue(
() => {
const markdown = fs.readFileSync(srcMarkdownFilePath);
Expand Down

0 comments on commit 420d8b3

Please sign in to comment.