diff options
| author | Fuwn <[email protected]> | 2025-05-12 00:01:45 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-05-12 00:01:45 -0700 |
| commit | d77c5f0f8e07651b656d5dc9ad7a777a565f1b7b (patch) | |
| tree | 3782e882bd80188a04d4887871c4890367af9514 /src/modules | |
| parent | feat(blog): Change post metadata display format (diff) | |
| download | locus-d77c5f0f8e07651b656d5dc9ad7a777a565f1b7b.tar.xz locus-d77c5f0f8e07651b656d5dc9ad7a777a565f1b7b.zip | |
feat(contact): Obfuscate email address
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/contact.rs | 8 |
1 files changed, 7 insertions, 1 deletions
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(); |