generated from cncf/hugo-netlify-starter
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from celestehorgan/add-blog
Add blogging
- Loading branch information
Showing
10 changed files
with
117 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Blog | ||
linkTitle: Blog | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "Welcome to the Inclusive Naming Blog" | ||
date: 2021-01-01 | ||
slug: welcome-post | ||
--- | ||
|
||
Content goes here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{ define "title" }} | ||
{{ .Title }} | ||
{{ end }} | ||
|
||
{{ define "main" }} | ||
{{ partial "blog/hero.html" . }} | ||
{{ partial "blog/post-list.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{ define "title" }} | ||
{{ .Title }} | The Longhorn blog | ||
{{ end }} | ||
|
||
{{ define "main" }} | ||
{{ partial "blog/hero.html" . }} | ||
{{ partial "blog/content.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{ $posts := where site.RegularPages "Section" "blog" }} | ||
<div class="container"> | ||
<div class="columns"> | ||
<div class="col col-12"> | ||
<div class=""> | ||
{{ .Content }} | ||
</div> | ||
|
||
<a class="btn btn-primary" href="/blog"> | ||
<span> | ||
Back to blog | ||
</span> | ||
</a> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{ $isPost := ne .File.BaseFileName "_index" }} | ||
<div class="container bg-secondary text-light p-4 mb-3"> | ||
<h1> | ||
{{ .Title }} | ||
</h1> | ||
{{ if $isPost }} | ||
{{ $date := dateFormat "January 2, 2006" .Date }} | ||
<h2> | ||
{{ .Params.author }} | {{ $date }} | ||
</h2> | ||
{{ end }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{ $posts := where site.RegularPages "Section" "blog" }} | ||
<div class="container"> | ||
<div class="row"> | ||
{{ range (.Paginate $posts).Pages }} | ||
{{ $date := dateFormat "January 2, 2006" .Date }} | ||
<div class="col col-lg-6 col-md-12 col-12"> | ||
<div> | ||
<a href="{{ .RelPermalink }}"> | ||
<h2> | ||
{{ .Title }} | ||
</h2> | ||
<h3> | ||
{{ $date }} | ||
</h3> | ||
</a> | ||
</div> | ||
<div> | ||
{{ .Summary }}... | ||
</div> | ||
</div> | ||
{{ end }} | ||
</div> | ||
<div class="row"> | ||
<div class="mx-auto pt-5"> | ||
{{ template "_internal/pagination.html" . }} | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ <h1> | |
{{ .Inner }} | ||
</p> | ||
</div> | ||
</section> | ||
</section> |