1
Fork 0
This commit is contained in:
MMaker 2025-12-02 23:49:51 -05:00
commit cf7a27bfa1
Signed by: mmaker
GPG key ID: CCE79B8FEDA40FB2
225 changed files with 3580 additions and 0 deletions

18
layouts/videos/list.html Normal file
View file

@ -0,0 +1,18 @@
{{ define "main" }}
<main>
<article>
{{ if or .Title .Content }}
<div>
{{ with .Title }}<h2 class="title">{{ . }}</h2>{{ end }}
<hr />
{{ with .Content }}<div>{{ . }}</div>{{ end }}
</div>
{{ end }}
<hr />
{{ partial "comments" }}
</article>
</main>
{{ end }}

36
layouts/videos/rss.xml Normal file
View file

@ -0,0 +1,36 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1" xmlns:content="http://purl.org/rss/1.0/modules/content" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>
{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} by {{ end }}
{{ .Site.Title }}{{ end }}
</title>
<link>{{ .Permalink }}</link>
<description>Recent videos by MMaker</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>
{{end}}
{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>
{{end}}
{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range $index, $elem := sort $.Site.Data.videos.videos "date" "desc" }}
{{ if and $elem.videoid $elem.date }}
<item>
<title>{{ $elem.title }}</title>
<link>https://mmaker.moe/videos/?v={{ $elem.videoid }}</link>
<pubDate>{{ dateFormat "Mon, 02 Jan 2006" (time $elem.date) | safeHTML }}</pubDate>
<guid>https://mmaker.moe/videos/?v={{ $elem.videoid }}</guid>
<media:content type="image/jpeg" medium="image" url="https://cdn.mmaker.moe/video/thumbnail/{{ $elem.date }}_{{ $elem.videoid }}.jpg"/>
<description></description>
</item>
{{ end }}
{{ end }}
</channel>
</rss>

View file