aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-05-12 00:01:45 -0700
committerFuwn <[email protected]>2025-05-12 00:01:45 -0700
commitd77c5f0f8e07651b656d5dc9ad7a777a565f1b7b (patch)
tree3782e882bd80188a04d4887871c4890367af9514
parentfeat(blog): Change post metadata display format (diff)
downloadlocus-d77c5f0f8e07651b656d5dc9ad7a777a565f1b7b.tar.xz
locus-d77c5f0f8e07651b656d5dc9ad7a777a565f1b7b.zip
feat(contact): Obfuscate email address
-rw-r--r--content/json/contacts.json6
-rw-r--r--src/modules/contact.rs8
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": {
+ "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::<Vec<_>>();
contacts.sort();