Skip to content

Commit

Permalink
minor adjust for seo
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeloChecked committed Oct 1, 2024
1 parent 0e6ec2a commit bab4789
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion blog/components/Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ export const Base = (props: BaseProps) =>
<title>${props.title}</title>
${props.scripts ?? ""}
${props.style ?? ""}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
${ props.content.includes("lite-youtube") ? `<link rel="preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/lite-youtube-embed/0.3.3/lite-yt-embed.min.css" onload="this.onload=null;this.rel='stylesheet'"/>` : ""}
<link rel="preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
</noscript>
${googleTagManagerScript()}
</head>
<body>
Expand All @@ -66,6 +70,7 @@ export const Base = (props: BaseProps) =>
</main>
</body>
${props.footer}
${ props.content.includes("lite-youtube") ? '<script src="https://cdnjs.cloudflare.com/ajax/libs/lite-youtube-embed/0.3.3/lite-yt-embed.min.js"></script>' : ""}
</html>
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ and dropping the less valuable ones (like inheritance, maybe! :P).

## Conclusion: In the end it doesn't even matter

<iframe width="560" height="315" src="https://www.youtube.com/embed/eVTXPUF4Oz4?si=86BNhoI2MOcdIm6S" title="in the end - linking park" ></iframe>
<lite-youtube videoid="eVTXPUF4Oz4"></lite-youtube>

So, programming languages are basically experiments influenced by what others
before us believed. Both object-oriented programming and functional programming
Expand Down
4 changes: 2 additions & 2 deletions blog/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export function fromStringToDomToString(page: RoutedPage, body: string) {
const parser = new DOMParser();
const document = parser.parseFromString(body, "text/html");

const documentUpdated = pictureRelosution(page, document!, imagesInFolder) ?? document
//const documentUpdated = pictureRelosution(page, document!, imagesInFolder) ?? document

const html = `<!DOCTYPE html>\n${documentUpdated.documentElement?.outerHTML || ""}`;
const html = `<!DOCTYPE html>\n${document.documentElement?.outerHTML || ""}`;
return jsBeautify.html(html);
}

Expand Down

0 comments on commit bab4789

Please sign in to comment.