Skip to content

✨ Feat: Email obfuscation#2815

Open
ZhenShuo2021 wants to merge 3 commits intonunocoracao:devfrom
ZhenShuo2021:email
Open

✨ Feat: Email obfuscation#2815
ZhenShuo2021 wants to merge 3 commits intonunocoracao:devfrom
ZhenShuo2021:email

Conversation

@ZhenShuo2021
Copy link
Collaborator

Closes #2711

Implemented base64 encoding for email addresses to block spam bots. Email is encoded at build time and decoded by JavaScript at runtime.

Research Details

I asked Claude to research why personal websites need email obfuscation/encryption. The research found the main purposes are:

  1. Prevent spam - Email harvesters crawl websites to collect addresses for spam campaigns
  2. Block automated bots - Automated scrapers extract emails from public sources
  3. Prevent phishing attacks - Harvested emails become targets for phishing
  4. Privacy protection - Keep personal information from being permanently exposed
  5. Prevent ransomware - Email lists fuel targeted ransomware campaigns

Implementation Choice

After reviewing Spencer Mortensen's comprehensive email obfuscation analysis, I found that most spammers rely on pure HTML parsing without JavaScript execution.

Since Hugo is an SSG, the email address must be encoded into the HTML at build time. Hugo's built-in encoding support is limited to base64 only. Therefore, this is the only practical obfuscation method available given Hugo's constraints and SSG architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant