diff --git a/components/Footer.tsx b/components/Footer.tsx
index 542fca8..4fc10b7 100644
--- a/components/Footer.tsx
+++ b/components/Footer.tsx
@@ -3,6 +3,7 @@ import { FaTwitter } from '@react-icons/all-files/fa/FaTwitter'
import { FaZhihu } from '@react-icons/all-files/fa/FaZhihu'
import { FaGithub } from '@react-icons/all-files/fa/FaGithub'
import { FaLinkedin } from '@react-icons/all-files/fa/FaLinkedin'
+import { FaEnvelopeOpenText } from '@react-icons/all-files/fa/FaEnvelopeOpenText'
import { IoSunnyOutline } from '@react-icons/all-files/io5/IoSunnyOutline'
import { IoMoonSharp } from '@react-icons/all-files/io5/IoMoonSharp'
@@ -95,6 +96,18 @@ export const FooterImpl: React.FC = () => {
)}
+
+ {config.newsletter && (
+
+
+
+ )}
)
diff --git a/components/PageSocial.module.css b/components/PageSocial.module.css
index bb16f8d..9731dd3 100644
--- a/components/PageSocial.module.css
+++ b/components/PageSocial.module.css
@@ -107,6 +107,13 @@
border-color: #00ab6c;
}
+.newsletter .actionBgPane {
+ background: #777777;
+}
+.newsletter:hover {
+ border-color: #777777;
+}
+
.email .actionBgPane {
background: #777;
}
diff --git a/components/PageSocial.tsx b/components/PageSocial.tsx
index 246f946..0d2900c 100644
--- a/components/PageSocial.tsx
+++ b/components/PageSocial.tsx
@@ -44,6 +44,17 @@ const socialLinks: SocialLink[] = [
)
+ },
+
+ config.newsletter && {
+ name: 'newsletter',
+ href: `${config.newsletter}`,
+ title: `Newsletter ${config.author}`,
+ icon: (
+
+ )
}
].filter(Boolean)
diff --git a/components/styles.module.css b/components/styles.module.css
index 0824880..7b1c7de 100644
--- a/components/styles.module.css
+++ b/components/styles.module.css
@@ -105,6 +105,10 @@
color: #0077b5;
}
+.newsletter:hover {
+ color: #777777;
+}
+
.comments {
width: 100%;
margin-top: 2em;
diff --git a/lib/config.ts b/lib/config.ts
index 3d17ae5..74bb373 100644
--- a/lib/config.ts
+++ b/lib/config.ts
@@ -57,6 +57,7 @@ export const language: string = getSiteConfig('language', 'en')
export const twitter: string | null = getSiteConfig('twitter', null)
export const github: string | null = getSiteConfig('github', null)
export const linkedin: string | null = getSiteConfig('linkedin', null)
+export const newsletter: string | null = getSiteConfig('newsletter', null)
export const zhihu: string | null = getSiteConfig('zhihu', null)
// default notion values for site-wide consistency (optional; may be overridden on a per-page basis)
diff --git a/lib/site-config.ts b/lib/site-config.ts
index 4521c86..a518b78 100644
--- a/lib/site-config.ts
+++ b/lib/site-config.ts
@@ -13,6 +13,7 @@ export interface SiteConfig {
twitter?: string
github?: string
linkedin?: string
+ newsletter?: string
zhihu?: string
defaultPageIcon?: string | null
diff --git a/site.config.ts b/site.config.ts
index b58e7fe..64d0d92 100644
--- a/site.config.ts
+++ b/site.config.ts
@@ -20,6 +20,7 @@ export default siteConfig({
twitter: 'transitive_bs',
github: 'transitive-bullshit',
linkedin: 'fisch2',
+ newsletter: '#', //Use full newsletter URL
// default notion icon and cover images for site-wide consistency (optional)
// page-specific values will override these site-wide defaults