Skip to content

Commit

Permalink
fix render canonical (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadev03 authored Nov 17, 2024
1 parent 77a9183 commit af6011e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/createHeadParts.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ const { PATHS, ORIGIN } = require('./constants');
function createHeadParts({ title, description, path, is404 }) {
const imgSrc = PATHS.FILES.SHARING_BANNER;
const _title = title + ' | Kirtan Site';
const url = ORIGIN + path;

var url;
// Some urls rendered with origin.
if (path.indexOf(ORIGIN) !== 0) {
url = ORIGIN + path;
} else {
url = path;
}

let render = `
<title>${_title}</title>`;
Expand Down

0 comments on commit af6011e

Please sign in to comment.