Skip to content

Commit

Permalink
Merge branch 'master' into deprecated_code
Browse files Browse the repository at this point in the history
  • Loading branch information
hydr0nium authored Jul 11, 2024
2 parents d7f910a + a48a6fa commit 501eb28
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 22 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ jobs:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/" \
-s "./exampleSite/" \
--themesDir "../../"
run: >
hugo
--minify
--baseURL "${{ steps.pages.outputs.base_url }}/"
-s "./exampleSite/"
--themesDir "../../"
--logLevel info
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
Expand Down
6 changes: 6 additions & 0 deletions data/beautifulhugo/social.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,9 @@ id = "angellist"
url = "https://www.angel.co/p/%s"
title = "AngelList"
icon = "fab fa-angellist"

[[social_icons]]
id = "about"
url = "%s"
title = "About"
icon = "fas fa-at"
3 changes: 2 additions & 1 deletion exampleSite/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pygmentsCodefencesGuessSyntax = true
socialShare = true
delayDisqus = true
showRelatedPosts = true
# cusdisID = "XXX" # Get your App id from cusdis.com
# hideAuthor = true
# gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic"
# disclaimerText = "The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way."
Expand All @@ -46,7 +47,7 @@ pygmentsCodefencesGuessSyntax = true
# src = "img/hexagon.jpg"
# desc = "Hexagon"

[Author]
[Params.author]
# Set only your "username" for default hosts and full URLs otherwise (e.g., "https://MyGitLab.org/username")
name = "Some Person"
website = "yourwebsite.com"
Expand Down
19 changes: 11 additions & 8 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{{ 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 }}
Expand All @@ -14,12 +17,12 @@
<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>
Expand All @@ -41,11 +44,11 @@
{{ 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 }}

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{{- with ($.Scratch.Get "Description") }}
<meta name="description" content="{{ . }}">
{{- end }}
{{- with .Site.Author.name }}
{{- with .Site.Params.author.name }}
<meta name="author" content="{{ . }}"/>
{{- end }}
{{- partial "seo/main.html" . }}
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@
<div class="avatar-container">
<div class="avatar-img-border">
<a title="{{ .Site.Title }}" href="{{ "" | absLangURL }}">
{{- $image := resources.Get ( $.Site.Params.logo) -}}
{{ if $image }}
<img class="avatar-img" src="{{ ($image.Fit "300x300 webp q100").Permalink }}" alt="{{ .Site.Title }}" />
{{else}}
<img class="avatar-img" src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}" />
{{end}}
</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/post_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
&nbsp;|&nbsp;<i class="fas fa-user"></i>&nbsp;{{ .Params.author | safeHTML }}
{{ end }}
{{ else }}
&nbsp;|&nbsp;<i class="fas fa-user"></i>&nbsp;{{ .Site.Author.name | safeHTML }}
&nbsp;|&nbsp;<i class="fas fa-user"></i>&nbsp;{{ .Site.Params.author.name | safeHTML }}
{{ end }}
{{ end }}
{{- if .Site.Params.staticman -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/seo/structured/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@context": "http://schema.org",
"@type": "Article",
"author": {
"name" : "{{ if .Params.author -}}{{ .Params.author }}{{- else if .Site.Author.name -}}{{ .Site.Author.name }}{{- end }}"
"name" : "{{ if .Params.author -}}{{ .Params.author }}{{- else if .Site.Params.author.name -}}{{ .Site.Params.author.name }}{{- end }}"
},
"headline": "{{ .Title }}",
"description" : "{{ if .Description }}{{ .Description | plainify }}{{ else }}{{if .IsPage}}{{ .Summary | plainify }}{{ end }}{{ end }}",
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/seo/structured/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"@type": "Person",
"name": "{{ .Params.author }}"
},
{{- else if .Site.Author.name -}}
{{- else if .Site.Params.author.name -}}
"author": {
"@type": "Person",
"name": "{{ .Site.Author.name }}"
"name": "{{ .Site.Params.author.name }}"
},
{{- end }}
"copyrightYear" : "{{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }}",
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/seo/twitter.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="twitter:image" content="{{ . | absURL }}" />
{{- end }}
<meta name="twitter:card" content="summary_large_image" />
{{- with .Site.Author.twitter }}
{{- with .Site.Params.author.twitter }}
<meta name="twitter:site" content="@{{ . }}" />
<meta name="twitter:creator" content="@{{ . }}" />
{{- end }}
2 changes: 1 addition & 1 deletion layouts/partials/share-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul class="share">
<!-- Twitter -->
<li>
<a href="//twitter.com/share?url={{ .Permalink }}&amp;text={{ .Title }}&amp;via={{ .Site.Author.twitter }}" target="_blank" title="Share on Twitter">
<a href="//twitter.com/share?url={{ .Permalink }}&amp;text={{ .Title }}&amp;via={{ .Site.Params.author.twitter }}" target="_blank" title="Share on Twitter">
<i class="fab fa-twitter"></i>
</a>
</li>
Expand Down
4 changes: 4 additions & 0 deletions static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ figure:not(.dark) img, img.white {
}
}

#cusdis_thread {
margin-top: 30px;
}

/* --- Navbar --- */

.navbar-custom {
Expand Down

0 comments on commit 501eb28

Please sign in to comment.