Skip to content

Commit

Permalink
Turn off building various useless pages
Browse files Browse the repository at this point in the history
Also replace custom post list with built-in post list.
  • Loading branch information
zeha committed Oct 3, 2024
1 parent 610907c commit e468f00
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 31 deletions.
5 changes: 5 additions & 0 deletions content/categories/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
[_build]
render = "never"
list = "never"
+++
5 changes: 5 additions & 0 deletions content/page/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
[_build]
render = "never"
list = "never"
+++
1 change: 0 additions & 1 deletion content/page/archive.md → content/post/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: "All posts"
layout: archive
slug: archive
type: page
menus: archives
Expand Down
16 changes: 13 additions & 3 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,22 @@ mediaTypes:
- "rss2"

outputFormats:
RSS:
rss:
mediaType: "application/rss+xml"
path: feeds/
noUgly: false

outputs:
home:
- HTML
- RSS
- html
- rss
page:
- html
rss:
- rss
section:
- html
taxonomy:
- html
term:
- html
19 changes: 0 additions & 19 deletions layouts/_default/archive.html

This file was deleted.

25 changes: 17 additions & 8 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Content }}

<a href="{{ .RelPermalink }}">read more</a>
{{ end }}
<section>
{{ range (where .Site.RegularPages "Section" .Params.archive_page_type).GroupByDate "2006" }}
<h1>{{ .Key }}</h1>
<ul>
{{ range .Pages }}
{{ if (ne .Params.hidden true) }}
<li>
<span>{{ .Date.Format "Jan 02" }}</span> &mdash;
<a href="{{ .RelPermalink }}">
{{ .Title }}
</a>
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}
</section>
{{ end }}

0 comments on commit e468f00

Please sign in to comment.