Skip to content

Commit

Permalink
some seo improvement and analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeloChecked committed Oct 5, 2024
1 parent 93781a6 commit 371efa4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions blog/components/Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export const Base = (props: BaseProps) =>
<noscript>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
</noscript>
${googleTagManagerScript()}
</head>
${googleTagManagerScript()}
<body>
${props.menu}
<main class="${mainClass.className}">
Expand All @@ -76,12 +76,13 @@ export const Base = (props: BaseProps) =>

function googleTagManagerScript() {
return html`
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','G-LE27PDG685');</script>
<!-- End Google Tag Manager -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LE27PDG685"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-LE27PDG685');
</script>
`;
}
2 changes: 1 addition & 1 deletion blog/components/Footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function Footer(props: { currentPageMenu?: string; menus: MenuInfo[] }) {
>, <a href="https://www.buildingasecondbrain.com/">Second Brain</a>,
<a href="https://obsidian.md/">Obsidian</a> and a bit by my ancient
theme: <a href="https://github.com/Vimux/Mainroad">Mainroad</a>. You
can find the source code <a href="https://github.com/AngeloChecked/AngeloChecked-blog">here</a>.
can <a href="https://github.com/AngeloChecked/AngeloChecked-blog">find the source code here</a>.
</div>
<div>
Expand Down
2 changes: 1 addition & 1 deletion blog/components/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function Menu(props: { currentPageMenu?: string; menus: MenuInfo[] }) {
<div style="${menuRowContainerClass.inlineStyle}">
<div style="${rowClass.inlineStyle}">
<div>
<img src="/img/avatar_logo.webp">
<img src="/img/avatar_logo.webp" alt="AngeloChecked logo">
</div>
<div>
ANGELO CECCATO
Expand Down

0 comments on commit 371efa4

Please sign in to comment.