Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions exampleSite/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ Menus:
params:
title: "Hugo Profile"
description: Text about my cool site
keywords: "portfolio, blog, hugo, theme"
# staticPath: "" # The path to serve the static files from
favicon: "/fav.png"

Expand Down
4 changes: 4 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ other = "Page not found"
# Date formats
[min_read]
other = "min read"

# SEO
[seo_description]
other = "A personal portfolio and blog"
4 changes: 4 additions & 0 deletions i18n/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ other = "Página no encontrada"
# Date formats
[min_read]
other = "min de lectura"

# SEO
[seo_description]
other = "Un portafolio personal y blog"
4 changes: 4 additions & 0 deletions i18n/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ other = "Page non trouvée"
# Date formats
[min_read]
other = "min de lecture"

# SEO
[seo_description]
other = "Un portfolio personnel et blog"
2 changes: 1 addition & 1 deletion layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ define "head" }}
<meta name="description" content={{ .Site.Params.description }}>
<meta name="description" content="{{ .Site.Params.description }}">
{{ end }}

{{ define "title" }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{ .Language.Lang }}">
<html lang="{{ .Language.Lang }}" {{ with .Language.LanguageDirection }}dir="{{ . }}"{{ end }}>

<head>
{{- partial "head.html" . -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2 class="text-center pb-2">{{.Title}}</h2>
{{ if and (not (.Site.Params.listPages.disableFeaturedImage | default false)) (.Params.image) }}
<div class="card-header">
<a href="{{ .RelPermalink }}">
<img src="{{ .Params.image }}" class="card-img-top" alt="{{ .Title }}">
<img src="{{ .Params.image }}" class="card-img-top" alt="{{ .Title }}" loading="lazy">
</a>
</div>
{{ end }}
Expand Down
6 changes: 5 additions & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{{ define "head" }}
<meta name="description" content={{ .Site.Params.description }}>
<meta name="description" content="{{ .Site.Params.description }}">
<link rel="stylesheet" href="{{ (printf "%scss/index.css" (.Site.Params.staticPath | default "")) | relURL }}" media="all">
<link rel="stylesheet" href="{{ (printf "%scss/projects.css" (.Site.Params.staticPath | default "")) | relURL }}" media="all">

{{ with .Site.Params.hero.image }}
<link rel="preload" as="image" href="{{ . }}">
{{ end }}

<!-- fontawesome -->
<script defer src="{{ (printf "%sfontawesome-6/all-6.4.2.js" (.Site.Params.staticPath | default "")) | relURL }}"></script>
{{ end }}
Expand Down
20 changes: 17 additions & 3 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
<!-- font configuration -->
<link rel="stylesheet" href="{{ (printf "%scss/font.css" (.Site.Params.staticPath | default "")) | relURL }}" media="all">

<!-- Canonical URL -->
<link rel="canonical" href="{{ .Permalink }}">

<!-- Keywords -->
{{ with .Site.Params.keywords }}
<meta name="keywords" content="{{ . }}">
{{ end }}

<!-- Internal templates -->
{{ template "_internal/google_analytics.html" . }}
{{ template "_internal/opengraph.html" . }}
Expand All @@ -33,8 +41,13 @@
{{ range .AllTranslations }}
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ .Language.LanguageName }}">
{{ end }}
<!-- OpenGraph locale -->
<meta property="og:locale" content="{{ .Language.Lang }}">
{{ $defaultLang := (index .Sites 0).Language.Lang }}
{{ range .AllTranslations }}
{{ if eq .Language.Lang $defaultLang }}
<link rel="alternate" hreflang="x-default" href="{{ .Permalink }}">
{{ end }}
{{ end }}
<!-- OpenGraph locale alternates -->
{{ range .Translations }}
<meta property="og:locale:alternate" content="{{ .Language.Lang }}">
{{ end }}
Expand All @@ -48,7 +61,8 @@
{{- end -}}
<link rel="stylesheet" href="{{ (printf "%scss/header.css" (.Site.Params.staticPath | default "")) | relURL }}" media="all">
<link rel="stylesheet" href="{{ (printf "%scss/language-switcher.css" (.Site.Params.staticPath | default "")) | relURL }}" media="all">
<link rel="stylesheet" href="{{ (printf "%scss/footer.css" (.Site.Params.staticPath | default "")) | relURL }}" media="all">
<link rel="stylesheet" href="{{ (printf "%scss/footer.css" (.Site.Params.staticPath | default "")) | relURL }}" media="print" onload="this.media='all'">
<noscript><link rel="stylesheet" href="{{ (printf "%scss/footer.css" (.Site.Params.staticPath | default "")) | relURL }}"></noscript>

<!-- theme -->
<link rel="stylesheet" href="{{ (printf "%scss/theme.css" (.Site.Params.staticPath | default "")) | relURL }}" media="all">
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/sections/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h3 class="text-center bg-transparent">{{ $about.title | default (i18n "about")
{{ if .Site.Params.about.image }}
<div class="col-sm-12 col-md-8 col-lg-4 mb-5 mb-sm-0 mb-md-5 mb-lg-0 d-none d-sm-none d-md-block">
<div class="image d-flex px-5">
<img src="{{ .Site.Params.about.image }}" class="img-thumbnail mx-auto rounded-circle" alt="{{ .Site.Params.title }} profile picture">
<img src="{{ .Site.Params.about.image }}" class="img-thumbnail mx-auto rounded-circle" alt="{{ .Site.Params.title }} profile picture" loading="lazy">
</div>
</div>
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/sections/achievements.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h3 class="text-center">{{ $achievements.title | default .Site.Params.achievemen
<a class="card my-3 h-100 p-3" href="{{ .url }}" title="{{ .title }}" target="_blank">
{{if .image }}
<div class="card-head">
<img class="card-img-top" src="{{ .image }}">
<img class="card-img-top" src="{{ .image }}" alt="{{ .title }}" loading="lazy">
</div>
{{ end }}
<div class="card-body bg-transparent">
Expand All @@ -27,7 +27,7 @@ <h5 class="card-title bg-transparent">{{ .title }}</h5>
<div class="card my-3 h-100 p-3" title="{{ .title }}">
{{if .image }}
<div class="card-head">
<img class="card-img-top" src="{{ .image }}">
<img class="card-img-top" src="{{ .image }}" alt="{{ .title }}" loading="lazy">
</div>
{{ end }}
<div class="card-body bg-transparent">
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/sections/footer/recentBlogPosts.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{{ if and (not (.Site.Params.footer.recentPosts.disableFeaturedImage | default false)) (.Params.image) }}
<div class="card-header">
<a href="{{ .RelPermalink }}">
<img src="{{ .Params.image }}" class="card-img-top" alt="{{ .Title }}">
<img src="{{ .Params.image }}" class="card-img-top" alt="{{ .Title }}" loading="lazy">
</a>
</div>
{{ end }}
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/sections/hero/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h2>
<img src="{{ .Site.Params.hero.image }}"
class="img-thumbnail mx-auto{{ if .Site.Params.hero.roundImage }} rounded-circle{{ end }}"
alt="{{ .Site.Params.title }} profile image"
fetchpriority="high"
>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/sections/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h3 class="text-center">{{ $projects.title | default .Site.Params.projects.title
<div class="col-lg-4 col-md-6 my-3">
<div class="card my-3 h-100" title="{{ .title }}">
<div class="card-head">
<img class="card-img-top" src="{{ .image }}" alt="{{ .title }}">
<img class="card-img-top" src="{{ .image }}" alt="{{ .title }}" loading="lazy">
</div>
<div class="card-body bg-transparent p-3">
<div class="pb-2 bg-transparent">
Expand Down Expand Up @@ -47,7 +47,7 @@ <h5 class="card-title bg-transparent mt-1">{{ .title }}</h5>
<div class="col-lg-4 col-md-6 my-3">
<div class="card my-3 h-100" title="{{ .Title }}">
<div class="card-head">
<img class="card-img-top" src="{{ .Params.image }}" alt="{{ .Title }}">
<img class="card-img-top" src="{{ .Params.image }}" alt="{{ .Title }}" loading="lazy">
</div>
<div class="card-body bg-transparent p-3">
<div class="pb-2 bg-transparent">
Expand Down