Add a newsletter archive so past issues can be shared and found; v2.3.0
Publish Container / build (push) Successful in 20m51s
Publish Container / build (push) Successful in 20m51s
Web-hosted copies of episode newsletters, published from Resend broadcasts tagged with the "New Episode" topic. Gives Facebook (and anyone else) a proper link to share instead of raw HTML email, and makes issues findable via site search and Google. - Admin "Newsletter Archive" tab lists sent Resend broadcasts, flags ones tagged "New Episode", and publishes them with one click (pulls the HTML straight from Resend's API) - Public /newsletter archive index and /newsletter/:slug issue pages, server-rendered with per-issue Open Graph tags for social previews - Unsubscribe merge-tag stripped from the web copy; archive + subscribe links appended - Issues added to sitemap.xml and the on-site search index Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
60b23b0fba
commit
fe4c09f8a3
11 files changed
+516
-4
No files matched your search
@@ -8,6 +8,7 @@ const TYPE_LABEL: Record<SearchResultType, string> = {
|
||||
question: 'Q&A',
|
||||
resource: 'Download',
|
||||
series: 'Series',
|
||||
newsletter: 'Newsletter',
|
||||
}
|
||||
|
||||
const TYPE_ICON: Record<SearchResultType, string> = {
|
||||
@@ -15,6 +16,7 @@ const TYPE_ICON: Record<SearchResultType, string> = {
|
||||
question: '❓',
|
||||
resource: '📄',
|
||||
series: '📚',
|
||||
newsletter: '✉️',
|
||||
}
|
||||
|
||||
interface Props {
|
||||
@@ -57,6 +59,9 @@ export function GlobalSearch({ query, setQuery, results }: Props) {
|
||||
setQuery('')
|
||||
if (result.href.startsWith('http')) {
|
||||
window.open(result.href, '_blank', 'noreferrer')
|
||||
} else if (result.type === 'newsletter') {
|
||||
// Newsletter issues are server-rendered outside the SPA (for social-share OG tags), so use a full navigation.
|
||||
window.location.href = result.href
|
||||
} else {
|
||||
navigate(result.href)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user