118 lines
2.8 KiB
Markdown
118 lines
2.8 KiB
Markdown
# nik4nao — Personal Portfolio
|
|
|
|
Personal portfolio site built with [Hugo](https://gohugo.io/) and the [terminal theme](https://github.com/panr/hugo-theme-terminal). Deployed as a containerised nginx image to a self-hosted Kubernetes cluster via Gitea Actions.
|
|
|
|
Live at [nik4nao.com](https://nik4nao.com)
|
|
|
|
---
|
|
|
|
## Structure
|
|
|
|
```
|
|
content/
|
|
posts/ # Blog posts
|
|
projects/ # Project showcase pages
|
|
cv.md # CV / resume page
|
|
layouts/
|
|
cv/single.html # CV page template with download link
|
|
projects/list.html # Projects index (card grid)
|
|
projects/single.html # Project detail page
|
|
index.html # Homepage
|
|
static/
|
|
css/custom.css # Style overrides
|
|
cv/nik-afiq-cv.pdf # CV PDF (place manually)
|
|
themes/terminal/ # Git submodule
|
|
```
|
|
|
|
---
|
|
|
|
## Local development
|
|
|
|
**Prerequisites:** Hugo extended, Git
|
|
|
|
```bash
|
|
git clone --recurse-submodules <repo-url>
|
|
cd portfolio
|
|
hugo server -D
|
|
```
|
|
|
|
The site will be available at `http://localhost:1313`.
|
|
|
|
---
|
|
|
|
## Adding content
|
|
|
|
### Blog post
|
|
|
|
```bash
|
|
hugo new content posts/my-post.md
|
|
```
|
|
|
|
### Project
|
|
|
|
Create `content/projects/my-project.md` with this front matter:
|
|
|
|
```yaml
|
|
---
|
|
title: "Project Name"
|
|
description: "Short description shown on the projects index."
|
|
tags: ["go", "kubernetes", "docker"]
|
|
github: "https://github.com/nik/project"
|
|
url: "https://project.example.com"
|
|
---
|
|
|
|
Project body in Markdown...
|
|
```
|
|
|
|
No code changes required — the project will appear automatically on `/projects`.
|
|
|
|
### CV
|
|
|
|
Edit `content/cv.md` directly. The PDF download link points to `static/cv/nik-afiq-cv.pdf`; replace that file to update the downloadable version.
|
|
|
|
---
|
|
|
|
## Build
|
|
|
|
```bash
|
|
hugo --minify
|
|
# Output written to public/
|
|
```
|
|
|
|
Or via Docker:
|
|
|
|
```bash
|
|
docker build -t portfolio .
|
|
docker run -p 8080:80 portfolio
|
|
```
|
|
|
|
---
|
|
|
|
## CI/CD
|
|
|
|
Gitea Actions pipeline at [.gitea/workflows/ci.yaml](.gitea/workflows/ci.yaml).
|
|
|
|
| Event | Jobs |
|
|
|-------|------|
|
|
| Push to `main` | Build + push multiarch image (`linux/amd64`, `linux/arm64`), deploy to cluster |
|
|
| Pull request | Hugo build check only — no push, no deploy |
|
|
|
|
Images are tagged `latest` and `<short-sha>` and pushed to `gitea.home.arpa/nik/portfolio`.
|
|
|
|
Deployment rolls out `deployment/portfolio` in the `portfolio` namespace via SSH + kubectl.
|
|
|
|
### Required secrets
|
|
|
|
| Secret | Purpose |
|
|
|--------|---------|
|
|
| `CA_CERT` | Internal CA cert for the self-hosted registry |
|
|
| `REGISTRY_USER` | Gitea container registry username |
|
|
| `REGISTRY_PASSWORD` | Gitea container registry password |
|
|
| `SSH_PRIVATE_KEY` | SSH key for deploy host (`192.168.7.77`) |
|
|
|
|
---
|
|
|
|
## Theme
|
|
|
|
[panr/hugo-theme-terminal](https://github.com/panr/hugo-theme-terminal) — added as a git submodule at `themes/terminal`. Do not modify theme files directly; all overrides live in `layouts/` and `static/css/custom.css`.
|