Skip to content

Commit 48a2d70

Browse files
authored
Merge pull request #16 from NC3-LU/hugoFix
fix: [hugo] Latest hugo versions need updated config files and ...
2 parents 00b0123 + 69c73f1 commit 48a2d70

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

config.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ main_button_sub = "powered by the two centres hosted at the Luxembourg House of
99
subtitle = "**Open source software is more important than ever!** *And we are committed to improve and cyber secure the society through open technologies.*"
1010
copyright = "The Luxembourg House of Cybersecurity - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)"
1111

12+
[pagination]
13+
pagerSize = 4
14+
1215
enableRobotsTXT = true
13-
Paginate = 4
1416

1517
theme = "kode"
1618

content/projects/coral.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ image_alt: "Logo of CORAL"
77
logo: "logo-coral.png"
88
weight: 60
99
tags: ["projects", "coral", "nc3"]
10-
logo: "logo_nc3.jpg"
1110
author: "NC3"
1211
draft: true
1312
---

layouts/shortcodes/readme.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1-
{{ $data := resources.GetRemote ( printf "https://raw.githubusercontent.com/%s/master/README.md" $.Page.Params.repository) }}
2-
{{ $data.Content | markdownify | safeHTML }}
1+
{{ $repo := $.Page.Params.repository }}
2+
{{ $main := resources.GetRemote (printf "https://raw.githubusercontent.com/%s/main/README.md" $repo) }}
3+
{{ with $main }}
4+
{{ .Content | markdownify | safeHTML }}
5+
{{ else }}
6+
{{ $master := resources.GetRemote (printf "https://raw.githubusercontent.com/%s/master/README.md" $repo) }}
7+
{{ with $master }}
8+
{{ .Content | markdownify | safeHTML }}
9+
{{ else }}
10+
{{ warnf "readme shortcode: README.md not found on main or master for repository %s" $repo }}
11+
<p><em>README.md not found for {{ $repo }}.</em></p>
12+
{{ end }}
13+
{{ end }}

0 commit comments

Comments
 (0)