Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the site compatible with latest Hugo #64

Closed
wants to merge 1 commit into from
Closed
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
30 changes: 16 additions & 14 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ copyright = "llvm.org"
canonifyurls = true
theme = "hugo-kiera"

paginate = 10

summaryLength = 30
enableEmoji = true
pygmentsCodeFences = true
Expand All @@ -14,23 +12,14 @@ ignoreFiles = ['template.md']

#disqusShortname = "myShortName"

[pagination]
pagerSize = 10

[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true

# Note: to disable a social network icon delete or comment out the corresponding line
[author]
name = "LLVM Project"
github = "llvm"
#gitlab = "username"
#linkedin = "username"
facebook = "llvmorg"
twitter = "llvmorg"
#instagram = "username"
#stackoverflow = "username"
youtube = "c/LLVMPROJ" # or channel/channelname

[params]
tagline = "LLVM Project News and Details from the Trenches"
description = "LLVM Project News and Details from the Trenches"
Expand All @@ -42,6 +31,19 @@ ignoreFiles = ['template.md']
homepageLength = 10
#commentAutoload = true #This mean reader don't need click, disqus comment autoload

# Note: to disable a social network icon delete or comment out the corresponding line
[params.author]
name = "LLVM Project"
id="llvmorg"
github = "llvm"
#gitlab = "username"
#linkedin = "username"
facebook = "llvmorg"
twitter = "llvmorg"
#instagram = "username"
#stackoverflow = "username"
youtube = "c/LLVMPROJ" # or channel/channelname

[[menu.main]]
identifier = "about"
name = "About"
Expand Down
8 changes: 4 additions & 4 deletions themes/hugo-kiera/layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<language>{{.}}</language>{{end}}{{ with .Site.Params.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
<webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
Expand All @@ -21,7 +21,7 @@
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | replaceRE `[\x00-\x1F\x7F]` "" | html}}</description>
</item>
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-kiera/layouts/partials/disqus.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
return;

var disqus_loaded = false;
var disqus_shortname = '{{ .Site.DisqusShortname }}';
var disqus_shortname = '{{ .Site.Config.Services.Disqus.Shortname }}';
var disqus_button = document.getElementById("show-comments");

var disqus_autoload = {{ .Site.Params.commentAutoload }};
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-kiera/layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h6><a class="{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasM
</footer>
</div>
<script src="{{ "js/scripts.js" | relURL }}"></script>
{{ if .Site.GoogleAnalytics }}
{{ if .Site.Config.Services.GoogleAnalytics.ID }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ partial "user_footer" . }}
Expand Down
4 changes: 2 additions & 2 deletions themes/hugo-kiera/layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h1>
{{ end }}
{{- end -}}
{{- range .Site.Data.social.social_icons -}}
{{- if isset $.Site.Author .id }}
{{- if isset $.Site.Params.Author .id }}
<li>
<a href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}">
<a href="{{ printf .url (index $.Site.Params.Author .id) }}" title="{{ .title }}">
<i class="{{ .icon }} fa-lg"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-kiera/layouts/partials/meta.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="{{ .Site.Params.description | default "The HTML5 Herald" }}" />
<meta name="author" content="{{ .Params.Author | default .Site.Author.name }}" />
<meta name="author" content="{{ .Params.Author | default .Site.Params.Author.name }}" />
{{- with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-kiera/layouts/partials/single_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{{ if .Site.Params.UtterancesRepo }}
{{ partial "utterances" . }}
{{ end }}
{{ if .Site.DisqusShortname }}
{{ if .Site.Config.Services.Disqus.Shortname }}
{{ partial "disqus" . }}
{{ end }}
{{ end }}
Expand Down