Removed unnecessary homeIntro parameter, cleaned up layouts

This commit is contained in:
Francesco 2024-04-29 19:56:50 +02:00
parent 50029aa5b0
commit 1285dc1e53
4 changed files with 20 additions and 18 deletions

View File

@ -72,6 +72,8 @@ In your `hugo.toml` file you can specify the preferred theme:
theme = "light | dark | auto" theme = "light | dark | auto"
``` ```
If nothing is set, the default setting is auto.
### 2.3 Dark and light mode images ### 2.3 Dark and light mode images
You can tags to decide if images are displayed in dark or light mode, as GitHub is doing for readmes. You can tags to decide if images are displayed in dark or light mode, as GitHub is doing for readmes.
@ -130,11 +132,10 @@ disableKinds = ['taxonomy']
googleAnalytics = "G-xxxxxxxxxx" googleAnalytics = "G-xxxxxxxxxx"
[params] [params]
# Math mode # Appearance
math = true theme = 'auto'
# Intro on main page, content in markdown, if you omit title or content the other can be displayed # Intro on main page, content in markdown, if you omit title or content the other can be displayed
homeIntro = true
homeIntroTitle = 'Hello traveler!' homeIntroTitle = 'Hello traveler!'
homeIntroContent = """ homeIntroContent = """
Join me on this journey as I explore the ever-evolving landscape of software engineering, Join me on this journey as I explore the ever-evolving landscape of software engineering,

View File

@ -6,6 +6,7 @@
<h1> typo? </h1> <h1> typo? </h1>
<p> Click <a href="/"> here </a> to return to home </p> <p> Click <a href="/"> here </a> to return to home </p>
</div> </div>
</div> </div>

View File

@ -3,18 +3,17 @@
{{ .Content }} {{ .Content }}
{{/* Intro summary section */}} {{/* Intro summary section */}}
{{ if .Site.Params.homeIntro }}
{{ if or .Site.Params.homeIntroTitle .Site.Params.homeIntroContent }}
<div class="intro"> <div class="intro">
{{ if .Site.Params.homeIntroTitle }} {{ with .Site.Params.homeIntroTitle }}
<h1>{{ .Site.Params.homeIntroTitle }}</h1> <h1>{{ . }}</h1>
{{ end }} {{ end }}
{{ if .Site.Params.homeIntroContent }} {{ with .Site.Params.homeIntroContent }}
<p>{{ .Site.Params.homeIntroContent | markdownify }}</p> <p>{{ . | markdownify }}</p>
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}
{{/* Social Icons */}} {{/* Social Icons */}}

View File

@ -2,28 +2,29 @@
{{/* Intro */}} {{/* Intro */}}
<div {{ if .Param "autonumber" }} class="autonumber" {{end}}> <div {{ if .Param "autonumber" }} class="autonumber" {{ end }}>
<div class=" single-intro-container"> <div class=" single-intro-container">
{{/* Title and Summary */}} {{/* Title and Summary */}}
<h1 class="single-title">{{ .Title }}</h1> <h1 class="single-title">{{ .Title }}</h1>
{{if .Param "summary" }} {{ with .Param "summary" }}
<p class="single-summary">{{ .Summary }}</p> <p class="single-summary">{{ . }}</p>
{{ end }} {{ end }}
{{/* Reading Time */}} {{/* Reading Time */}}
<p class="single-readtime"> <p class="single-readtime">
{{if .Date }} {{ with .Date }}
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} {{ $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }} {{ $dateHuman := . | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
-
{{end}} {{end}}
{{if (.Param "readTime")}}
{{.ReadingTime}} min {{ if .Param "readTime" }}
-
{{ .ReadingTime }} min
{{end }} {{end }}
</p> </p>