This commit is contained in:
Luke Smith 2022-04-14 16:07:48 -04:00
commit 4ae859b630
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252
16 changed files with 214 additions and 0 deletions

6
archetypes/default.md Normal file
View File

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

11
config.toml Normal file
View File

@ -0,0 +1,11 @@
baseURL = 'https://example.org'
languageCode = 'en-us'
title = "Website Name"
# [menu]
# [[menu.main]]
# identifier = 'home'
# name = 'Home'
# pre = "🏡"
# url = '/index.html'
# weight = -110

7
layouts/404.html Normal file
View File

@ -0,0 +1,7 @@
{{ partial "header.html" . }}
<header><h1>404: Page not found</h1></header>
{{ .Content }}
{{ partial "footer.html" . }}

View File

@ -0,0 +1,16 @@
{{ partial "header.html" . }}
<header><h1>{{ .Title }}</h1></header>
{{ .Content }}
{{ range.Pages }}
<li>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 2" }}</time> &ndash;
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
{{ partial "footer.html" . }}

26
layouts/_default/rss.xml Normal file
View File

@ -0,0 +1,26 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</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 .Pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{- .Content | html -}}</description>
</item>
{{ end }}
</channel>
</rss>

View File

@ -0,0 +1,7 @@
{{ partial "header.html" . }}
<header><h1>{{ .Title }}</h1></header>
{{ .Content }}
{{ partial "footer.html" . }}

View File

@ -0,0 +1,7 @@
{{ partial "header.html" . }}
<header><h1>{{ .Title }}</h1></header>
{{ .Content }}
{{ partial "footer.html" . }}

10
layouts/blog.html Normal file
View File

@ -0,0 +1,10 @@
{{ define "main" }}
{{ .Content }}
{{range.Site.RegularPages}}
<li><a href="{{.Permalink}}">{{.Title}}</a></li>
{{end}}
{{ partial "tagcloud.html" . }}
{{ end }}

9
layouts/index.html Normal file
View File

@ -0,0 +1,9 @@
{{ partial "header.html" . }}
<header><h1>{{ .Site.Title }}</h1></header>
{{ .Content }}
{{ partial "tagcloud.html" . }}
{{ partial "footer.html" . }}

View File

@ -0,0 +1,17 @@
{{ if isset .Params "tags" }}
{{ $tagsLen := len .Params.tags }}
{{ if gt $tagsLen 0 }}
<div class=taglist>
See related recipes:</br>
{{ range $k, $v := .Params.tags }}
{{ $url := printf "tags/%s" (. | urlize | lower) }}
<a href="{{ $url | absURL }}">{{ . }}</a>
{{ if lt $k (sub $tagsLen 1) }}&middot;{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}
</main>
<footer><a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a></footer>
</body>
</html>

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language }}">
<head>
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
<meta charset="utf-8"/>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel='stylesheet' type='text/css' href='/style.css'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="{{ .Params.tags }}">
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/rss.xml'>
</head>
<body>
{{ partial "nav.html" . }}
<main>

View File

@ -0,0 +1,7 @@
<nav>
<ul>
{{ range.Site.Menus.main }}
<a href="{{ .URL }}"><li>{{ .Pre }}{{ .Name }}</li></a>
{{ end }}
</ul>
</nav>

View File

@ -0,0 +1,10 @@
{{ if isset .Site.Taxonomies "tags" }}
{{ if not (eq (len .Site.Taxonomies.tags) 0) }}
<div class="tagcloud">
{{ range $name, $items := .Site.Taxonomies.tags }}
{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}
<a href="{{ $url | absURL }}">{{ $name }}</a>
{{ end }}
</div>
{{ end }}
{{ end }}

View File

@ -0,0 +1,9 @@
<details>
<summary>Click to reveal video.</summary>
<iframe src="{{ index .Params 0 }}"
loading="lazy"
sandbox="allow-same-origin allow-scripts allow-popups"
allowfullscreen frameborder="0"
title="Embedded Video">
</iframe>
</details>

View File

@ -0,0 +1,6 @@
<iframe src="{{ index .Params 0 }}"
loading="lazy"
sandbox="allow-same-origin allow-scripts allow-popups"
allowfullscreen frameborder="0"
title="Embedded Video">
</iframe>

52
static/style.css Normal file
View File

@ -0,0 +1,52 @@
body {
font-style: sans-serif ;
background: #100 ;
color: #ddd ;
}
main {
max-width: 800px ;
margin: auto ;
}
header h1 {
text-align: center ;
}
h1,h2,h3,h4,h5,h6 {
text-align: center ;
}
nav,footer {
text-align: center ;
clear: both ;
border-radius: 20px ;
margin: auto ;
}
nav li,footer li {
display: inline-block ;
list-style: none ;
border-radius: 10px ;
padding: .5em ;
max-width: 7em ;
}
nav ul, footer ul, #taglist {
padding: 0;
margin: .5em;
}
@media (min-width: 1200px) {
nav {
float: left ;
width: 175px ;
position: fixed ;
text-align: left ;
font-size: large ;
}
nav li {
display: block ;
text-align: center ;
margin: .5em auto ;
}
}