Upgrade theme version

This commit is contained in:
nemunaire 2024-08-29 20:02:34 +02:00
parent 1fd75b775c
commit 68224fb954
4 changed files with 55 additions and 105 deletions

View File

@ -19,7 +19,7 @@ steps:
environment:
- HUGO_ENV=production
settings:
hugo_version: 0.91.2
hugo_version: 0.127.0
validate: true
when:
branch: master
@ -29,7 +29,7 @@ steps:
environment:
- "HUGO_BASEURL=https://nemunai.re/${CI_COMMIT_BRANCH//\\//-}/"
settings:
hugo_version: 0.91.2
hugo_version: 0.127.0
validate: true
buildDrafts: true
buildExpired: true

View File

@ -28,13 +28,13 @@ params:
desc: "My school: Épita."
link: "http://epita.fr/"
author:
name: "Pierre-Olivier Mercier"
email: "blog@nemunai.re"
github: "nemunaire"
gitlab: "nemunaire"
bitbucket: "nemunaire"
linkedin: "pierre-olivier-mercier"
author:
name: "Pierre-Olivier Mercier"
email: "blog@nemunai.re"
github: "nemunaire"
gitlab: "nemunaire"
bitbucket: "nemunaire"
linkedin: "pierre-olivier-mercier"
menu:
main:

View File

@ -1,18 +1,28 @@
{{ if eq .Type "page" }}
{{ partial "page_meta.html" . }}
{{ end }}
{{- if and (not (isset .Site.Params "author")) (isset .Site "author") -}}
{{ errorf "Please move [author] to [params.author]; Hugo has deprecated the former." }}
{{- end -}}
<footer>
<div class="container">
{{ if .Site.Params.disclaimerText }}
<div class="row">
<div class="disclaimer">
<b>Disclaimer:</b> {{ .Site.Params.disclaimerText }}
</div>
</div>
{{ end }}
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center footer-links">
{{ range .Site.Data.beautifulhugo.social.social_icons }}
{{- if isset $.Site.Author .id }}
{{- if isset $.Site.Params.author .id }}
<li>
{{ if or ( hasPrefix ( index $.Site.Author .id ) "http://" ) ( hasPrefix ( index $.Site.Author .id ) "https://" ) }}
<a {{ if .rel }}rel="{{ .rel }}"{{- end -}} href="{{ printf "%s" (index $.Site.Author .id) }}" title="{{ .title }}">
{{ if or ( hasPrefix ( index $.Site.Params.author .id ) "http://" ) ( hasPrefix ( index $.Site.Params.author .id ) "https://" ) }}
<a {{ if .rel }}rel="{{ .rel }}"{{- end -}} href="{{ printf "%s" (index $.Site.Params.author .id) }}" title="{{ .title }}">
{{ else }}
<a {{ if .rel }}rel="{{ .rel }}"{{- end -}} href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}">
<a {{ if .rel }}rel="{{ .rel }}"{{- end -}} href="{{ printf .url (index $.Site.Params.author .id) }}" title="{{ .title }}">
{{ end }}
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
@ -23,8 +33,9 @@
{{- end -}}
{{ end }}
{{ if .Site.Params.rss }}
{{ with .OutputFormats.Get "RSS" }}
<li>
<a href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" title="RSS">
<a href="{{ .RelPermalink }}" title="RSS">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fas fa-rss fa-stack-1x fa-inverse"></i>
@ -32,21 +43,22 @@
</a>
</li>
{{ end }}
{{ end }}
</ul>
<p class="credits copyright text-muted">
{{ if .Site.Author.name }}
{{ if .Site.Author.website }}
<a href="{{ .Site.Author.website }}">{{ .Site.Author.name }}</a>
{{ if .Site.Params.author.name }}
{{ if .Site.Params.author.website }}
<a href="{{ .Site.Params.author.website }}">{{ .Site.Params.author.name }}</a>
{{ else }}
{{ .Site.Author.name }}
{{ .Site.Params.author.name }}
{{ end }}
{{ end }}
<span class="colored">&nbsp;&bull;&nbsp;</span>
{{ if .Site.Params.since }}
{{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }}
{{ .Site.Params.since }} - {{ .Site.Lastmod.Format "2006" }}
{{ else }}
{{ .Site.LastChange.Format "2006" }}
{{ .Site.Lastmod.Format "2006" }}
{{ end }}
{{ if .Site.Title }}
@ -55,8 +67,10 @@
{{ end }}
</p>
{{ if $.GitInfo }}
<!-- Please don't remove this, keep my open source work credited :) -->
<p class="credits theme-by text-muted">
[<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]
{{ i18n "poweredBy" . | safeHTML }}
{{ if $.GitInfo }}&nbsp;&bull;&nbsp;[<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]{{ end }}
</p>
{{ end }}
</div>
@ -65,11 +79,15 @@
</footer>
{{- if .Site.Params.selfHosted -}}
<script src="{{ "js/jquery-3.5.1.slim.min.js" | absURL }}"></script>
<script defer src="{{ "js/katex.min.js" | absURL }}"></script>
<script defer src="{{ "js/auto-render.min.js" | absURL }}" onload="renderMathInElement(document.body);"></script>
<script src="{{ "js/jquery-3.7.0.slim.min.js" | absURL }}"></script>
<script src="{{ "js/bootstrap.min.js" | absURL }}"></script>
{{- else -}}
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.7/dist/katex.min.js" integrity="sha384-G0zcxDFp5LWZtDuRMnBkk3EphCK1lhEf4UEyEM693ka574TZGwo4IWwS6QLzM/2t" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.7/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
<script src="https://code.jquery.com/jquery-3.7.0.slim.min.js" integrity="sha384-w5y/xIeYixWvfM+A1cEbmHPURnvyqmVg5eVENruEdDjcyRLUSNej7512JQGspFUr" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
{{- end }}
<script src="{{ "js/main.js" | absURL }}"></script>
@ -81,7 +99,15 @@
<script> hljs.initHighlightingOnLoad(); </script>
<script> $(document).ready(function() {$("pre.chroma").css("padding","0");}); </script>
{{- end -}}
<script> renderMathInElement(document.body); </script>
{{- if .Site.Params.selfHosted -}}
<script src="{{ "js/photoswipe.min.js" | absURL }}"></script>
<script src="{{ "js/photoswipe-ui-default.min.js" | absURL }}"></script>
{{- else -}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.js" integrity="sha384-QELNnmcmU8IR9ZAykt67vGr9/rZJdHbiWi64V88fCPaOohUlHCqUD/unNN0BXSqy" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe-ui-default.min.js" integrity="sha384-m67o7SkQ1ALzKZIFh4CiTA8tmadaujiTa9Vu+nqPSwDOqHrDmxLezTdFln8077+q" crossorigin="anonymous"></script>
{{- end -}}
<script src="{{ "js/load-photoswipe.js" | absURL }}"></script>
<!-- Google Custom Search Engine -->
{{ if .Site.Params.gcse }}
@ -121,12 +147,13 @@
<!-- End Piwik Code -->
{{ end }}
{{ if and .Site.Params.delayDisqus .Site.DisqusShortname }}
{{ if and .Site.Params.delayDisqus .Site.Config.Services.Disqus.Shortname }}
<!-- Delayed Disqus -->
<script type="text/javascript">
$(function(){
$('#show-comments').on('click', function(){
var disqus_shortname = '{{ .Site.DisqusShortname }}';
var disqus_shortname = '{{ .Site.Config.Services.Disqus.Shortname }}';
(function() {
var disqus = document.createElement('script');
@ -141,7 +168,7 @@ $(function(){
});
</script>
<script id="dsq-count-scr" src="//{{ .Site.DisqusShortname }}.disqus.com/count.js" async></script>
<script id="dsq-count-scr" src="//{{ .Site.Config.Services.Disqus.Shortname }}.disqus.com/count.js" async></script>
<!-- End Delayed Disqus -->
{{ end }}

View File

@ -1,77 +0,0 @@
{{- if eq .Kind "taxonomyTerm" }}
{{- range $key, $value := .Data.Terms.ByCount }}
{{- $.Scratch.Add "most_used" (slice $value.Name) }}
{{- end }}
{{- if not ($.Scratch.Get "most_used") }}
{{- $description := printf "A full overview of all pages with %s, ordered by %s" .Data.Plural .Data.Singular | truncate 180 }}
{{- $.Scratch.Set "Description" $description }}
{{- else }}
{{- $description := printf "A full overview of all pages with %s, ordered by %s, such as: %s" .Data.Plural .Data.Singular ( delimit ( $.Scratch.Get "most_used" ) ", " ", and " ) | truncate 180 }}
{{- $.Scratch.Set "Description" $description }}
{{- end }}
{{- $title := printf "Overview of all pages with %s, ordered by %s" .Data.Plural .Data.Singular }}
{{- $.Scratch.Set "Title" $title }}
{{- else if eq .Kind "taxonomy" }}
{{- $description := printf "Overview of all pages with the %s #%s, such as: %s" .Data.Singular $.Title ( index .Pages 0).Title | truncate 160 }}
{{- $.Scratch.Set "Description" $description }}
{{- $title := printf "Overview of all pages with the %s #%s" .Data.Singular $.Title }}
{{- $.Scratch.Set "Title" $title }}
{{- else }}
{{- $.Scratch.Set "Description" ( .Description | default .Params.subtitle | default .Summary ) }}
{{- $.Scratch.Set "Title" ( .Title | default .Site.Title ) }}
{{- end }}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Site Title, Description, Author, and Favicon -->
{{- with ($.Scratch.Get "Title") }}
<title>{{ . }}{{- if ne . $.Site.Title }} - {{ $.Site.Title }}{{- end}}</title>
{{- end }}
{{- with ($.Scratch.Get "Description") }}
<meta name="description" content="{{ . }}">
{{- end }}
{{- with .Site.Author.name }}
<meta name="author" content="{{ . }}"/>
{{- end }}
{{- partial "seo/main.html" . }}
{{- with .Site.Params.favicon }}
<link href='{{ . | absURL }}' rel='icon' type='image/x-icon'/>
{{- end -}}
<!-- Hugo Version number -->
{{ hugo.Generator -}}
<!-- Links and stylesheets -->
<link rel="alternate" href="{{ "index.xml" | absLangURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
{{- if .Site.Params.selfHosted -}}
<link rel="stylesheet" href="{{ "fontawesome/css/all.css" | absURL }}" />
<link rel="stylesheet" href="{{ "css/bootstrap.min.css" | absURL }}" />
{{- else -}}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
{{- end -}}
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}" />
{{- if .Site.Params.staticman -}}
<link rel="stylesheet" href="{{ "css/staticman.css" | absURL }}" />
{{- end -}}
{{- if .Site.Params.selfHosted -}}
<link rel="stylesheet" href="{{ "css/fonts.css" | absURL }}" />
{{- else -}}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" />
{{- end -}}
{{- if .Site.Params.useHLJS }}
<link rel="stylesheet" href="{{ "css/highlight.min.css" | absURL }}" />
{{- else -}}
<link rel="stylesheet" href="{{ "css/syntax.css" | absURL }}" />
{{- end -}}
<link rel="stylesheet" href="{{ "css/codeblock.css" | absURL }}" />
{{- partial "head_custom.html" . }}
{{ template "_internal/google_analytics_async.html" . }}