From d77c5f0f8e07651b656d5dc9ad7a777a565f1b7b Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 12 May 2025 00:01:45 -0700 Subject: feat(contact): Obfuscate email address --- content/json/contacts.json | 6 +++--- src/modules/contact.rs | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/content/json/contacts.json b/content/json/contacts.json index b387821..d63c7cd 100644 --- a/content/json/contacts.json +++ b/content/json/contacts.json @@ -1,8 +1,8 @@ { - "Other": { + "Related Resources": { "GitHub": "https://github.com/Fuwn" }, - "Email": { - "contact@fuwn.me": "mailto:contact@fuwn.me" + "Electronic Mail": { + "contact at fuwn dot me": "" } } diff --git a/src/modules/contact.rs b/src/modules/contact.rs index 8c0798a..a37f15c 100644 --- a/src/modules/contact.rs +++ b/src/modules/contact.rs @@ -14,7 +14,13 @@ pub fn module(router: &mut windmark::router::Router) { format!("## {}\n\n{}", category, { let mut contacts = contacts .iter() - .map(|(tag, href)| format!("=> {href} {tag}")) + .map(|(tag, href)| { + if href.is_empty() { + tag.to_string() + } else { + format!("=> {href} {tag}") + } + }) .collect::>(); contacts.sort(); -- cgit v1.2.3