Skip to content
Draft
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
6 changes: 4 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ title: "Scientific Python blog"
theme: ["hugo-atom-feed", "scientific-python-hugo-theme"]
relativeURLs: true
disableKinds: ["RSS", "taxonomy"]
ignoreErrors: ["error-disable-taxonomy"]

markup:
highlight:
Expand All @@ -28,7 +27,10 @@ frontmatter:
date: [":filename", ":default"]

permalinks:
posts: "/:sections[1:]/:filename"
page:
posts: "/:sections[1:]/:filename"
section:
posts: "/:sections[1:]"

outputs:
home: ["HTML", "ATOM"]
Expand Down
3 changes: 3 additions & 0 deletions content/posts/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
url: /posts
---
Empty file.
9 changes: 7 additions & 2 deletions layouts/posts/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ <h2 class="tag-cloud-title">{{ i18n "tags" }}</h2>
</div>

<div class="content-container">
{{ $latest := (where $.Site.RegularPages.ByPublishDate.Reverse "Section" "posts") }}
{{ partial "posts.html" $latest }}
<!-- Here, we try to render all blog posts under a certain subdirectory -->
<!-- The exception is /posts, on which we want to render all posts -->
{{ if (eq .Page.RelPermalink "/posts/") }}
{{ partial "posts.html" (where .Site.RegularPages.ByPublishDate.Reverse "Section" .Section) }}
{{ else }}
{{ partial "posts.html" (where $.RegularPagesRecursive.ByPublishDate.Reverse "Section" .Section) }}
{{ end }}
</div>

</section>
Expand Down