Improve SEO

This commit is contained in:
Hazem Krimi
2023-11-22 19:03:03 +01:00
parent e05564729d
commit 077c4fe728
5 changed files with 31 additions and 6 deletions
+2
View File
@@ -14,6 +14,8 @@ enableRobotsTXT = true
[params] [params]
formSpreeURL = 'https://formspree.io/f/xoqpgyge' formSpreeURL = 'https://formspree.io/f/xoqpgyge'
dateFormat = '02 January 2006' dateFormat = '02 January 2006'
defaultDescription = 'Personal website of Hazem Krimi'
defaultKeywords = 'Hazem Krimi, Software Engineer, Software Developer, Full Stack Developer, JavaScript, TypeScript, React, Node.js, Scala, Kotlin, Corda, SQL, GraphQL, MongoDB'
[params.author] [params.author]
email = 'me@hazemkrimi.tech' email = 'me@hazemkrimi.tech'
name = 'Hazem Krimi' name = 'Hazem Krimi'
+21 -2
View File
@@ -17,10 +17,28 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#BD1839" /> <meta name="theme-color" content="#BD1839" />
<meta
name="description"
content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.defaultDescription }}{{ end }}"
>
<meta
name="keywords"
content="{{ if .Params.keywords }}{{ .Params.keywords }}{{ else }}{{ .Site.Params.defaultKeywords }}{{ end }}"
>
<meta name="robots" content="index, follow">
<meta property="og:title" content="{{ .Page.Title }}">
<meta
property="og:description"
content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.defaultDescription }}{{ end }}"
>
<meta property="og:url" content="{{ .Page.Permalink }}">
{{ block "meta" . }}{{ end }}
{{ with .OutputFormats.Get "rss" -}} {{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} {{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{ end }} {{ end }}
<link rel="canonical" href="{{ .Page.Permalink }}">
<link rel="icon" sizes="192x192" href="{{ $androidChromeIcon.Permalink }}"> <link rel="icon" sizes="192x192" href="{{ $androidChromeIcon.Permalink }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ $appleTouchIcon.Permalink }}"> <link rel="apple-touch-icon" sizes="180x180" href="{{ $appleTouchIcon.Permalink }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ $favIcon32.Permalink }}"> <link rel="icon" type="image/png" sizes="32x32" href="{{ $favIcon32.Permalink }}">
@@ -40,6 +58,7 @@
<script defer src="{{ $baseScripts.Permalink }}"></script> <script defer src="{{ $baseScripts.Permalink }}"></script>
<script defer src="{{ $mobileNavigationScripts.Permalink }}"></script> <script defer src="{{ $mobileNavigationScripts.Permalink }}"></script>
<script defer src="{{ $contactFormScripts.Permalink }}"></script> <script defer src="{{ $contactFormScripts.Permalink }}"></script>
{{ block "scripts" . }}{{ end }}
</head> </head>
<body> <body>
{{ partial "header.html" . }} {{ partial "header.html" . }}
+2 -2
View File
@@ -28,7 +28,7 @@
<div> <div>
<h2>Projects</h2> <h2>Projects</h2>
<a class="read-more" href="{{ urls.JoinPath .Site.BaseURL "projects" }}"> <a class="read-more" href="{{ urls.JoinPath .Site.BaseURL "projects" }}">
View more View all projects
</a> </a>
</div> </div>
<p>These are all the projects I worked on personally and professionally.</p> <p>These are all the projects I worked on personally and professionally.</p>
@@ -43,7 +43,7 @@
<div> <div>
<h2>Blog</h2> <h2>Blog</h2>
<a class="read-more" href="{{ urls.JoinPath .Site.BaseURL "blog" }}"> <a class="read-more" href="{{ urls.JoinPath .Site.BaseURL "blog" }}">
View more View all blog posts
</a> </a>
</div> </div>
<p>These are articles about things I learned about software engineering.</p> <p>These are articles about things I learned about software engineering.</p>
+1 -1
View File
@@ -17,7 +17,7 @@
Download CV Download CV
</a> </a>
<a class="read-more" href="{{ urls.JoinPath .Site.BaseURL "about" }}"> <a class="read-more" href="{{ urls.JoinPath .Site.BaseURL "about" }}">
Read more Read more about me
</a> </a>
</div> </div>
</div> </div>
+5 -1
View File
@@ -7,7 +7,11 @@
<p>{{ .Params.description }}</p> <p>{{ .Params.description }}</p>
<div id="links"> <div id="links">
<a class="read-more" href="{{ .Permalink }}"> <a class="read-more" href="{{ .Permalink }}">
Read more {{ readFile "assets/icons/arrow.svg" | safeHTML }} {{ if (.InSection ($.Site.GetPage "projects")) }}
Read this project {{ readFile "assets/icons/arrow.svg" | safeHTML }}
{{ else }}
Read this blog post {{ readFile "assets/icons/arrow.svg" | safeHTML }}
{{ end }}
</a> </a>
{{ with (and (.InSection ($.Site.GetPage "projects")) .Params.demo) }} {{ with (and (.InSection ($.Site.GetPage "projects")) .Params.demo) }}
<a class="demo" href="{{ . }}" target="_blank"> <a class="demo" href="{{ . }}" target="_blank">