Initial commit: Hugo site with Caddy infra and deploy tooling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
7
site/content/posts/hello-world.md
Normal file
7
site/content/posts/hello-world.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: "Hello, World"
|
||||
date: 2026-04-08
|
||||
draft: false
|
||||
---
|
||||
|
||||
This is the first post on Monotrope. More to come.
|
||||
13
site/hugo.toml
Normal file
13
site/hugo.toml
Normal file
@@ -0,0 +1,13 @@
|
||||
baseURL = "https://monotrope.au"
|
||||
languageCode = "en-au"
|
||||
title = "Monotrope"
|
||||
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = false
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS"]
|
||||
section = ["HTML", "RSS"]
|
||||
|
||||
[params]
|
||||
description = "A personal blog."
|
||||
35
site/layouts/_default/baseof.html
Normal file
35
site/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-AU">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ if not .IsHome }}{{ .Title }} · {{ end }}{{ .Site.Title }}</title>
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
<link rel="stylesheet" href="/css/main.css">
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `
|
||||
<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="site-wrap">
|
||||
<header class="site-header">
|
||||
<a class="site-title" href="/">{{ .Site.Title }}</a>
|
||||
<nav class="site-nav">
|
||||
<a href="/posts/">Writing</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<p>© {{ now.Year }} Monotrope. Built with <a href="https://gohugo.io">Hugo</a>.</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
11
site/layouts/_default/list.html
Normal file
11
site/layouts/_default/list.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ define "main" }}
|
||||
<h2 class="page-heading">{{ .Title }}</h2>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
<li>
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
9
site/layouts/_default/single.html
Normal file
9
site/layouts/_default/single.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ define "main" }}
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p class="post-meta">
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>
|
||||
</p>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
{{ end }}
|
||||
10
site/layouts/index.html
Normal file
10
site/layouts/index.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ define "main" }}
|
||||
<ul class="post-list">
|
||||
{{ range (where .Site.RegularPages "Type" "posts").ByDate.Reverse }}
|
||||
<li>
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
195
site/static/css/main.css
Normal file
195
site/static/css/main.css
Normal file
@@ -0,0 +1,195 @@
|
||||
/* ── Reset & base ─────────────────────────────── */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* ── Colour tokens ────────────────────────────── */
|
||||
:root {
|
||||
--bg: #ffffff;
|
||||
--fg: #1a1a1a;
|
||||
--muted: #6b7280;
|
||||
--accent: #2563eb;
|
||||
--border: #e5e7eb;
|
||||
--code-bg: #f3f4f6;
|
||||
--max-width: 680px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: #111111;
|
||||
--fg: #e5e5e5;
|
||||
--muted: #9ca3af;
|
||||
--accent: #60a5fa;
|
||||
--border: #2d2d2d;
|
||||
--code-bg: #1e1e1e;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Typography ───────────────────────────────── */
|
||||
html {
|
||||
font-size: 18px;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--fg);
|
||||
font-family: Georgia, "Times New Roman", serif;
|
||||
line-height: 1.7;
|
||||
padding: 2rem 1.25rem;
|
||||
}
|
||||
|
||||
/* ── Layout ───────────────────────────────────── */
|
||||
.site-wrap {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* ── Header ───────────────────────────────────── */
|
||||
.site-header {
|
||||
margin-bottom: 3rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 1.1rem;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.02em;
|
||||
text-decoration: none;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.site-nav a {
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
font-size: 0.9rem;
|
||||
font-family: system-ui, sans-serif;
|
||||
margin-left: 1.25rem;
|
||||
}
|
||||
|
||||
.site-nav a:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
/* ── Footer ───────────────────────────────────── */
|
||||
.site-footer {
|
||||
margin-top: 4rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid var(--border);
|
||||
color: var(--muted);
|
||||
font-size: 0.8rem;
|
||||
font-family: system-ui, sans-serif;
|
||||
}
|
||||
|
||||
/* ── Post list ────────────────────────────────── */
|
||||
.post-list {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.post-list li {
|
||||
margin-bottom: 1.5rem;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.post-list time {
|
||||
color: var(--muted);
|
||||
font-size: 0.85rem;
|
||||
font-family: system-ui, sans-serif;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.post-list a {
|
||||
color: var(--fg);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post-list a:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
/* ── Article ──────────────────────────────────── */
|
||||
article h1 {
|
||||
font-size: 1.75rem;
|
||||
line-height: 1.25;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
color: var(--muted);
|
||||
font-size: 0.85rem;
|
||||
font-family: system-ui, sans-serif;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
article h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; }
|
||||
article h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
|
||||
|
||||
article p { margin-bottom: 1.25rem; }
|
||||
|
||||
article a {
|
||||
color: var(--accent);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
article ul,
|
||||
article ol {
|
||||
padding-left: 1.5rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
article li { margin-bottom: 0.25rem; }
|
||||
|
||||
article blockquote {
|
||||
border-left: 3px solid var(--border);
|
||||
padding-left: 1rem;
|
||||
color: var(--muted);
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
article code {
|
||||
background: var(--code-bg);
|
||||
padding: 0.1em 0.35em;
|
||||
border-radius: 3px;
|
||||
font-size: 0.875em;
|
||||
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
|
||||
}
|
||||
|
||||
article pre {
|
||||
background: var(--code-bg);
|
||||
padding: 1rem;
|
||||
border-radius: 4px;
|
||||
overflow-x: auto;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
article pre code {
|
||||
background: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
article hr {
|
||||
border: none;
|
||||
border-top: 1px solid var(--border);
|
||||
margin: 2rem 0;
|
||||
}
|
||||
|
||||
/* ── Page heading ─────────────────────────────── */
|
||||
.page-heading {
|
||||
font-size: 1.1rem;
|
||||
color: var(--muted);
|
||||
font-family: system-ui, sans-serif;
|
||||
font-weight: normal;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
Reference in New Issue
Block a user