File tree 3 files changed +26
-4
lines changed
3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ title = "Notre-Dame de Paris"
2
2
baseURL = " https://example.com"
3
3
languageCode = " en-us"
4
4
theme = " gohugo-theme-ananke"
5
+ themesDir = " ../.."
5
6
6
7
MetaDataFormat = " yaml"
7
8
DefaultContentLanguage = " en"
Original file line number Diff line number Diff line change 2
2
< main class ="cf ph3 ph5-l pv3 pv4-l f4 tc-l center measure-wide lh-copy mid-gray ">
3
3
{{ .Content }}
4
4
</ main >
5
- {{/* Create a variable to use the same section twice. Note that we've included the date here. */}}
6
- {{ $section := where .Data.Pages.ByDate.Reverse "Section" "post" }}
5
+ {{/* For Hugo 0.20 this will default to the section with the most number of pages. */}}
6
+ {{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
7
+ {{/* Create a variable to use the same section twice. */}}
8
+ {{ $section := where .Site.RegularPages "Section" "in" $mainSections }}
7
9
{{ if $section }}
8
10
< div class ="pa3 pa4-ns w-100 w-70-ns center ">
9
11
@@ -14,15 +16,15 @@ <h1 class="flex-none">
14
16
< section class ="w-100 mw8 ">
15
17
{{ range (first 3 $section) }}
16
18
< div class ="relative w-100 mb4 ">
17
- {{ .Render "summary-with-image" }}
19
+ {{ partial "summary-with-image.html" . }}
18
20
</ div >
19
21
{{ end }}
20
22
</ section >
21
23
22
24
< section class ="w-100 ">
23
25
< h1 class ="f3 "> More Posts</ h1 >
24
26
{{/* Nest the requirements, "after" then "first" on the outside */}}
25
- {{ range (first 4 (after 1 $section)) }}
27
+ {{ range (first 4 (after 3 $section)) }}
26
28
< h2 class ="f5 fw4 mb4 dib mr3 ">
27
29
< a href ="{{ .URL }} " class ="link black dim ">
28
30
{{ .Title }}
Original file line number Diff line number Diff line change
1
+ < article class ="bb b--black-10 ">
2
+ < a class ="db pv4 ph3 ph0-l no-underline dark-gray dim " href ="{{ .URL }} ">
3
+ < div class ="flex flex-column flex-row-ns ">
4
+ {{ if .Params.featured_image }}
5
+ < div class ="pr3-ns mb4 mb0-ns w-100 w-40-ns ">
6
+ < img src ="{{ .Params.featured_image }} " class ="db " alt ="image from {{ .Title }} ">
7
+ </ div >
8
+ {{ end }}
9
+ < div class ="w-100{{ if .Params.featured_image }} w-60-ns pl3-ns{{ end }} ">
10
+ < h1 class ="f3 fw1 athelas mt0 lh-title "> {{ .Title }}</ h1 >
11
+ < p class ="f6 f5-l lh-copy ">
12
+ {{ .Summary }}
13
+ </ p >
14
+ {{/* TODO: add author
15
+ < p class ="f6 lh-copy mv0 "> By {{ .Author }}</ p > */}}
16
+ </ div >
17
+ </ div >
18
+ </ a >
19
+ </ article >
You can’t perform that action at this time.
0 commit comments