summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-05-08 18:47:08 +0200
committerDanilo M. <danix@danix.xyz>2026-05-08 18:47:08 +0200
commitcfb6c0668d8303982779b4a2687031eafccb90df (patch)
tree3e43bf458ebdbc7304599342549c09584acb25df
parent4a8ba8c24c95a251ac752ddc20bf8b275978128e (diff)
downloaddanixme-cfb6c0668d8303982779b4a2687031eafccb90df.tar.gz
danixme-cfb6c0668d8303982779b4a2687031eafccb90df.zip
Add Blog link to nav and fix Hugo deprecation warnings
- Add external Blog menu entry (danix.xyz) via Hugo menus system - Wire nav.html to render Site.Menus.main with external link support - Replace deprecated languageName with label in hugo.toml - Replace deprecated .Language.LanguageName with .Language.Label in nav.html - Add CLAUDE.md with project guidance Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rw-r--r--CLAUDE.md35
-rw-r--r--hugo.toml11
-rw-r--r--themes/danixme/layouts/partials/nav.html7
3 files changed, 49 insertions, 4 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000..425894d
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,35 @@
+# CLAUDE.md
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## Commands
+
+```bash
+# Dev server (live reload)
+hugo server
+
+# Production build (output to public/)
+hugo build
+
+# Restore PHP contact form deps (after fresh clone)
+cd static/api && composer install
+```
+
+## Architecture
+
+Single-page bilingual portfolio site (EN/IT). Hugo ≥ 0.120.0 required.
+
+**Data-driven content:** All section content lives in `data/*.yaml` (projects, skills, services, education, certs, contact). Templates in `themes/danixme/layouts/partials/` render these via Hugo's `.Site.Data`. To update site content, edit YAML — not templates.
+
+**Theme:** Custom `themes/danixme/` — no external theme dependency.
+- `assets/css/main.css` — ~1763 lines. CSS vars: `--accent` (#a855f7 purple), `--accent2` (#00ff88 neon). Dark mode base; light mode overrides via `.light` class on `<body>`.
+- `assets/js/main.js` — contact form AJAX, hero typing effect, dark/light toggle, carousel.
+- `layouts/partials/` — one partial per section (hero, about, skills, projects, certs, contact, etc.)
+
+**i18n:** Translation keys in `themes/danixme/i18n/en.toml` and `it.toml`. Use `i18n "key"` in templates; never hardcode visible text.
+
+**Languages:** Configured in `hugo.toml`. Each language has its own `contentDir` (`content/en/`, `content/it/`) and CV path param. The `_index.md` files hold only frontmatter metadata — sections render from YAML data.
+
+**Contact backend:** `static/api/contact.php` uses PHPMailer. Credentials are in `mail-config.php` (gitignored). The PHP file is deployed as-is under `/api/` on the server.
+
+**Static assets:** `static/img/` for images, `static/files/` for downloadable CVs (referenced in `hugo.toml` params per language).
diff --git a/hugo.toml b/hugo.toml
index 773b000..7c019d1 100644
--- a/hugo.toml
+++ b/hugo.toml
@@ -20,9 +20,16 @@ defaultContentLanguageInSubdir = false
description = "Cybersecurity Specialist and eJPT-certified Penetration Tester helping companies secure networks, apps, and systems."
og_image = "/img/og-cover.jpg" # 1200×630 social sharing image — create this file
+[[menus.main]]
+ name = "Blog"
+ url = "https://danix.xyz"
+ weight = 80
+ [menus.main.params]
+ external = true
+
[languages]
[languages.en]
- languageName = "EN"
+ label = "EN"
weight = 1
contentDir = "content/en"
title = "Danilo Macrì — Cybersecurity Specialist"
@@ -31,7 +38,7 @@ defaultContentLanguageInSubdir = false
cv = "/files/Danilo Macri - EN.pdf"
og_locale = "en_GB"
[languages.it]
- languageName = "IT"
+ label = "IT"
weight = 2
contentDir = "content/it"
title = "Danilo Macrì — Specialista in Cybersecurity"
diff --git a/themes/danixme/layouts/partials/nav.html b/themes/danixme/layouts/partials/nav.html
index 8a045d0..deddaa3 100644
--- a/themes/danixme/layouts/partials/nav.html
+++ b/themes/danixme/layouts/partials/nav.html
@@ -15,6 +15,9 @@
<li><a href="#certifications">{{ i18n "nav_certs" }}</a></li>
<li><a href="#projects">{{ i18n "nav_projects" }}</a></li>
<li><a href="#contact">{{ i18n "nav_contact" }}</a></li>
+ {{- range .Site.Menus.main }}
+ <li><a href="{{ .URL }}"{{ if .Params.external }} target="_blank" rel="noopener"{{ end }}>{{ .Name }}</a></li>
+ {{- end }}
<li class="nav-theme-item">
<button class="theme-toggle" aria-label="Toggle theme">
<i class="fa-solid fa-sun"></i>
@@ -28,11 +31,11 @@
</button>
<div class="lang-toggle" role="group" aria-label="Language">
- <span class="lang-btn active" title="{{ .Site.Language.LanguageName }}">
+ <span class="lang-btn active" title="{{ .Site.Language.Label }}">
<span class="fi fi-{{ .Site.Language.Params.flag }}"></span>
</span>
{{- range .Translations -}}
- <a href="{{ .RelPermalink }}" class="lang-btn" title="{{ .Language.LanguageName }}">
+ <a href="{{ .RelPermalink }}" class="lang-btn" title="{{ .Language.Label }}">
<span class="fi fi-{{ .Language.Params.flag }}"></span>
</a>
{{- end -}}