initial hugo site (init6ish theme, bilingual EN/PT-BR)

This commit is contained in:
authentik Default Admin 2026-05-27 09:39:13 +02:00 committed by root
parent c683ea0f2f
commit 825746cc79
27 changed files with 553 additions and 0 deletions

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
/public/
/resources/
/.hugo_build.lock
.DS_Store
*.swp

7
archetypes/default.md Normal file
View file

@ -0,0 +1,7 @@
---
title: "{{ replace .File.ContentBaseName "-" " " | title }}"
date: {{ .Date }}
draft: true
tags: []
description: ""
---

5
content/en/_index.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "Richard Nixon"
---
software engineer, focused on security and self-hosted sysadmin.

8
content/en/about.md Normal file
View file

@ -0,0 +1,8 @@
---
title: "about"
description: "About Richard Nixon"
---
Software engineer focused on security and self-hosted infrastructure.
Personal code on [Forgejo](https://git.richardnixon.dev). Contact: [rnixonaf@gmail.com](mailto:rnixonaf@gmail.com).

View file

@ -0,0 +1,3 @@
---
title: "writing"
---

View file

@ -0,0 +1,24 @@
---
title: "first post"
date: 2026-05-26T10:00:00-03:00
slug: "hello-world"
tags: ["meta"]
description: "First post on the new static blog."
---
Migrated from Django to Hugo. Less to maintain, more focus on what matters: the writing.
## code
```python
def hello():
print("init 6")
```
## lists
- item one
- item two
- item three
Simple line with [link](https://richardnixon.dev) and `inline code`.

5
content/pt-br/_index.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "Richard Nixon"
---
engenheiro de software, foco em seguranca e sysadmin self-hosted.

8
content/pt-br/about.md Normal file
View file

@ -0,0 +1,8 @@
---
title: "about"
description: "Sobre Richard Nixon"
---
Engenheiro de software focado em seguranca e infraestrutura self-hosted.
Codigo pessoal no [Forgejo](https://git.richardnixon.dev). Contato: [rnixonaf@gmail.com](mailto:rnixonaf@gmail.com).

View file

@ -0,0 +1,3 @@
---
title: "writing"
---

View file

@ -0,0 +1,24 @@
---
title: "primeiro post"
date: 2026-05-26T10:00:00-03:00
slug: "hello-world"
tags: ["meta"]
description: "Primeiro post no novo blog estatico."
---
Migrei de Django para Hugo. Menos coisa pra manter, mais foco no que importa: o texto.
## codigo
```python
def hello():
print("init 6")
```
## listas
- item um
- item dois
- item tres
Linha simples com [link](https://richardnixon.dev) e `inline code`.

14
deploy.sh Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# build + sync hugo output to /root/richardnixon.dev-hugo/public (mounted into blog-static container).
# blog-static serves directly from the bind-mount, so no docker restart needed.
set -euo pipefail
cd "$(dirname "$0")"
hugo --minify --gc
echo "build OK"
# Optional: warm the container by hitting it via traefik network.
if docker ps --format '{{.Names}}' | grep -q '^blog-static$'; then
docker exec traefik wget -q --spider http://blog-static/pt-br/ && echo "blog-static reachable"
fi

76
hugo.toml Normal file
View file

@ -0,0 +1,76 @@
baseURL = "https://richardnixon.dev/"
title = "Richard Nixon"
theme = "init6ish"
defaultContentLanguage = "pt-br"
defaultContentLanguageInSubdir = true
enableRobotsTXT = true
enableEmoji = false
summaryLength = 30
pluralizeListTitles = false
buildFuture = false
buildDrafts = false
[pagination]
pagerSize = 50
[taxonomies]
tag = "tags"
[markup]
[markup.goldmark.renderer]
unsafe = false
[markup.highlight]
style = "bw"
noClasses = false
lineNos = false
tabWidth = 2
[outputs]
home = ["html", "rss"]
section = ["html", "rss"]
[outputFormats]
[outputFormats.RSS]
mediatype = "application/rss+xml"
baseName = "feed"
[languages]
[languages.pt-br]
languageName = "PT"
languageCode = "pt-BR"
contentDir = "content/pt-br"
weight = 1
title = "Richard Nixon"
[languages.pt-br.params]
description = "Notas de um engenheiro de software."
tagline = "engenharia, seguranca, sysadmin."
[[languages.pt-br.menu.main]]
name = "writing"
url = "/posts/"
weight = 1
[[languages.pt-br.menu.main]]
name = "about"
url = "/about/"
weight = 2
[languages.en]
languageName = "EN"
languageCode = "en-US"
contentDir = "content/en"
weight = 2
title = "Richard Nixon"
[languages.en.params]
description = "Notes from a software engineer."
tagline = "engineering, security, sysadmin."
[[languages.en.menu.main]]
name = "writing"
url = "/posts/"
weight = 1
[[languages.en.menu.main]]
name = "about"
url = "/about/"
weight = 2
[params]
author = "Richard Nixon"
email = "rnixonaf@gmail.com"
forgejo = "https://git.richardnixon.dev/richard"

4
static/robots.txt Normal file
View file

@ -0,0 +1,4 @@
User-agent: *
Allow: /
Sitemap: https://richardnixon.dev/sitemap.xml

View file

@ -0,0 +1,200 @@
:root {
--fg: #1a1a1a;
--fg-dim: #666;
--bg: #fafafa;
--link: #0066cc;
--link-visited: #551a8b;
--rule: #ddd;
--code-bg: #f0f0f0;
}
@media (prefers-color-scheme: dark) {
:root {
--fg: #e6e6e6;
--fg-dim: #888;
--bg: #111;
--link: #6aa9ff;
--link-visited: #b58aff;
--rule: #2a2a2a;
--code-bg: #1c1c1c;
}
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--fg);
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
font-size: 15px;
line-height: 1.55;
}
body {
max-width: 72ch;
margin: 0 auto;
padding: 2rem 1.25rem 4rem;
}
a {
color: var(--link);
text-decoration: none;
border-bottom: 1px dotted var(--link);
}
a:visited { color: var(--link-visited); border-bottom-color: var(--link-visited); }
a:hover { border-bottom-style: solid; }
header.site {
margin-bottom: 2.5rem;
border-bottom: 1px solid var(--rule);
padding-bottom: 1rem;
}
header.site .prompt {
color: var(--fg-dim);
}
header.site h1 {
display: inline;
font-size: 1rem;
font-weight: 600;
margin: 0;
}
header.site h1 a {
color: var(--fg);
border: none;
}
header.site nav {
margin-top: 0.5rem;
}
header.site nav a {
margin-right: 1.25rem;
color: var(--fg);
border-bottom: 1px dotted var(--fg-dim);
}
header.site nav a.lang {
float: right;
margin-right: 0;
color: var(--fg-dim);
}
main h1, main h2, main h3 {
font-weight: 600;
line-height: 1.3;
}
main h1 { font-size: 1.15rem; margin-top: 0; }
main h2 { font-size: 1.05rem; margin-top: 2rem; }
main h3 { font-size: 1rem; margin-top: 1.5rem; }
.post-meta {
color: var(--fg-dim);
font-size: 0.9rem;
margin-bottom: 1.5rem;
}
ul.post-list {
list-style: none;
padding: 0;
margin: 0;
}
ul.post-list li {
display: flex;
gap: 1rem;
padding: 0.2rem 0;
}
ul.post-list time {
color: var(--fg-dim);
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
.year-heading {
margin-top: 1.5rem;
margin-bottom: 0.5rem;
color: var(--fg-dim);
font-size: 0.95rem;
font-weight: 600;
}
.year-heading:first-of-type { margin-top: 0; }
code {
background: var(--code-bg);
padding: 0.1em 0.35em;
border-radius: 2px;
font-size: 0.92em;
}
pre {
background: var(--code-bg);
padding: 0.8rem 1rem;
overflow-x: auto;
border-radius: 2px;
font-size: 0.88em;
line-height: 1.45;
}
pre code {
background: none;
padding: 0;
}
blockquote {
border-left: 2px solid var(--rule);
padding-left: 1rem;
margin: 1rem 0;
color: var(--fg-dim);
}
hr {
border: none;
border-top: 1px solid var(--rule);
margin: 2rem 0;
}
img {
max-width: 100%;
height: auto;
}
table {
border-collapse: collapse;
margin: 1rem 0;
}
th, td {
border-bottom: 1px solid var(--rule);
padding: 0.4rem 0.8rem 0.4rem 0;
text-align: left;
}
footer.site {
margin-top: 4rem;
padding-top: 1rem;
border-top: 1px solid var(--rule);
color: var(--fg-dim);
font-size: 0.9rem;
}
.tags {
margin-top: 2rem;
color: var(--fg-dim);
font-size: 0.9rem;
}
.tags a { color: var(--fg-dim); }
.pagination {
margin-top: 2rem;
color: var(--fg-dim);
font-size: 0.9rem;
}

View file

@ -0,0 +1,2 @@
[recent_posts]
other = "recent"

View file

@ -0,0 +1,2 @@
[recent_posts]
other = "recentes"

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="{{ site.Language.Lang }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
{{ partial "header.html" . }}
<main>
{{ block "main" . }}{{ end }}
</main>
{{ partial "footer.html" . }}
</body>
</html>

View file

@ -0,0 +1,22 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ with .Content }}{{ . }}{{ end }}
{{ $pages := .Pages }}
{{ if eq .Section "posts" }}
{{ $pages = where .Pages "Params.draft" "!=" true }}
{{ end }}
{{ $byYear := $pages.GroupByDate "2006" }}
{{ range $byYear }}
<div class="year-heading">{{ .Key }}</div>
<ul class="post-list">
{{ range .Pages }}
<li>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}

View file

@ -0,0 +1,23 @@
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>{{ site.Params.description }}</description>
<generator>Hugo</generator>
<language>{{ site.Language.LanguageCode }}</language>
{{- $posts := where site.RegularPages "Section" "posts" -}}
{{- $posts = where $posts "Params.draft" "!=" true -}}
{{- range first 1 $posts }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{- end }}
<atom:link href="{{ .Permalink }}feed.xml" rel="self" type="application/rss+xml" />
{{ range first 20 $posts }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<guid>{{ .Permalink }}</guid>
<description>{{ with .Description }}{{ . | html }}{{ else }}{{ .Summary | html }}{{ end }}</description>
</item>
{{ end }}
</channel>
</rss>

View file

@ -0,0 +1,21 @@
{{ define "main" }}
<article>
<h1>{{ .Title }}</h1>
{{ if and .Date (eq .Section "posts") }}
<div class="post-meta">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
</div>
{{ end }}
{{ .Content }}
{{ with .Params.tags }}
<div class="tags">
tags:
{{ range . }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}/">#{{ . }}</a>
{{ end }}
</div>
{{ end }}
</article>
{{ end }}

View file

@ -0,0 +1,16 @@
{{ define "main" }}
<h1>#{{ .Title }}</h1>
{{ $byYear := .Pages.GroupByDate "2006" }}
{{ range $byYear }}
<div class="year-heading">{{ .Key }}</div>
<ul class="post-list">
{{ range .Pages }}
<li>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}

View file

@ -0,0 +1,11 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<ul class="post-list">
{{ range .Data.Terms.Alphabetical }}
<li>
<a href="{{ .Page.RelPermalink }}">#{{ .Page.Title }}</a>
<span style="color: var(--fg-dim);">({{ .Count }})</span>
</li>
{{ end }}
</ul>
{{ end }}

View file

@ -0,0 +1,16 @@
{{ define "main" }}
{{ .Content }}
{{ $posts := where (where site.RegularPages "Section" "posts") "Params.draft" "!=" true }}
{{ if $posts }}
<h2>{{ i18n "recent_posts" | default "recent" }}</h2>
<ul class="post-list">
{{ range first 10 $posts }}
<li>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}

View file

@ -0,0 +1,3 @@
<footer class="site">
<span class="prompt">$ init 6</span> &middot; {{ site.Params.tagline | default site.Params.description }}
</footer>

View file

@ -0,0 +1,16 @@
{{ $css := resources.Get "css/main.css" | resources.Minify | resources.Fingerprint }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }} · {{ site.Title }}{{ end }}</title>
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ site.Params.description }}{{ end }}">
<meta name="author" content="{{ site.Params.author }}">
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.Title }}" href="{{ "feed.xml" | relLangURL }}">
{{ range .AllTranslations }}
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}">
{{ end }}
<link rel="canonical" href="{{ .Permalink }}">
<meta property="og:title" content="{{ .Title }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ site.Params.description }}{{ end }}">

View file

@ -0,0 +1,14 @@
{{ $home := site.Home }}
<header class="site">
<span class="prompt">$ whoami&nbsp;</span><h1><a href="{{ $home.RelPermalink }}">{{ site.Params.author }}</a></h1>
<nav>
{{ range site.Menus.main }}
<a href="{{ .URL | relLangURL }}">{{ .Name }}</a>
{{ end }}
{{ range .AllTranslations }}
{{ if ne .Lang $.Lang }}
<a class="lang" href="{{ .Permalink }}">{{ .Language.LanguageName | lower }}</a>
{{ end }}
{{ end }}
</nav>
</header>

View file

@ -0,0 +1,8 @@
name = "init6ish"
license = "MIT"
description = "Minimal monospace theme inspired by init6.com"
homepage = "https://richardnixon.dev/"
min_version = "0.123.0"
[author]
name = "Richard Nixon"