Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index page to list all audio posts #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions content/audio/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Issue #263: Test _index.md for to list all audio posts"
date: "2021-12-13"
---

### Audio Posts

Here I want to list all posts of the `Audio` type.
29 changes: 29 additions & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{ define "main" }}

<div class="content">
<div class="article-wrapper u-cf single">
<a class="bubble" href="{{ .Permalink }}">
<i class="fa fa-fw fa-list"></i>
</a>

<article class="article">
<div class="content">
<h1 class="article-title">{{ .Title }}</h1>
<div class="meta"></div>
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{.Content}}
<div class="archive-list">
<ul>
<!-- Ranges through content/audio/*.md -->
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }} <span>({{.Date.Format "2006-01-02"}})</span></a>
</li>
{{ end }}
</ul>
</div>
</div>
</article>
</div>
</div>
{{ end }}