Overview
Public campaign archives allow you to:- Share campaigns on your website without requiring subscription
- Provide an RSS feed for campaign updates
- Create a public newsletter archive
- Use custom slugs for SEO-friendly URLs
Enabling Archive Functionality
Archives are controlled by theapp.enable_public_archive setting (defined in schema.sql:244).
Enable via Settings UI
- Go to Settings → General
- Enable “Public campaign archives”
- Save settings
Enable via Configuration
In your configuration:cmd/handlers.go:279-284:
Archive URL Structure
listmonk provides several archive endpoints:Archive Index
Lists all archived campaigns:- Paginated list of campaigns
- Shows campaign subject and send date
- Links to individual campaign pages
cmd/archive.go:99-116.
Individual Campaign
View a specific campaign by UUID:cmd/archive.go:119-174) supports both UUID and custom slug lookups.
Latest Campaign
Always shows the most recent archived campaign:JSON API
Get campaign archives as JSON:cmd/handlers.go:262 and handler in cmd/archive.go:27-50.
Archiving Campaigns
Campaigns must be explicitly enabled for archiving.Enable Archive for Campaign
When creating or editing a campaign:Database Schema
Archive settings are stored in the campaigns table (schema.sql:126-129):
API: Enable Archive
RSS Feed for Archives
listmonk provides an RSS feed for archived campaigns.RSS Feed URL
RSS Feed Configuration
Control RSS content withapp.enable_public_archive_rss_content setting:
true- Include full campaign HTML in feed itemsfalse- Include only title and link
schema.sql:246:
RSS Feed Implementation
The feed is generated incmd/archive.go:53-96:
- Uses the
github.com/gorilla/feedslibrary - Feed title comes from
app.site_namesetting - Feed description: “Campaign Archives”
- Items include:
- Title: Campaign subject
- Link: Archive URL
- Content: Full campaign HTML (if enabled)
- Published date: Campaign send_at or created_at
Feed Pagination
Archive Metadata
When archiving a campaign, you provide metadata that substitutes for actual subscriber data.Why Archive Metadata?
Campaigns use template variables like:Setting Archive Metadata
Configure when enabling archive:archive_meta JSONB column and used during rendering (cmd/archive.go:252-257).
Use generic values in archive metadata to protect subscriber privacy.
Privacy Considerations
Best Practices
Review content before archiving
Ensure no sensitive subscriber information is in the campaign content
Consider subscriber-only content
Use conditional template logic to hide sensitive content in archives:
What’s Not Tracked in Archives
Fromcmd/public.go:584:
- Campaign views are excluded if campaign UUID is the dummy UUID
- No subscriber-specific tracking
- Unsubscribe links don’t work
- Preference management links are disabled
Customizing Archive Pages
Archive pages use the standard public template system.Archive Page Template
The archive list page uses thearchive template (cmd/archive.go:109-115):
Individual Campaign Template
Individual campaigns use their assigned campaign template or archive template. The rendering process (cmd/archive.go:165-173):
- Compiles the campaign template
- Loads archive metadata as subscriber
- Renders the campaign body
- Returns raw HTML
Custom Archive Template
Create a dedicated template for archives:- Create template with type “Campaign”
- When archiving, set
archive_template_idto this template - The archive will use this template instead of the campaign’s template
Custom CSS and JavaScript
Customize archive appearance with custom CSS/JS.Add Custom Styles
In Settings → Appearance → Public custom CSS:cmd/handlers.go:286 at /public/custom.css.
Add Custom Scripts
In Settings → Appearance → Public custom JS:cmd/handlers.go:287 at /public/custom.js.
Embedding Archives on Your Website
Embed Latest Campaign
Use an iframe:Fetch and Display with JavaScript
Subscribe to RSS
Add RSS link to your website:Use Cases
Company Newsletter Archive
Company Newsletter Archive
Blog Post Announcements
Blog Post Announcements
Archive campaigns that announce new blog posts:
- Use archive as alternative content feed
- SEO benefits from indexed campaign content
- RSS feed as blog update notification
Product Update Log
Product Update Log
Public archive of product updates and release notes:
- Chronological history of product changes
- RSS feed for developer updates
- Link from documentation
Event Announcements
Event Announcements
Public archive of past event announcements:
- Shows history of community events
- Helps with event discovery
- Can be embedded on events page
SEO Optimization
Custom Slugs
Use descriptive, keyword-rich slugs:- ✅
monthly-security-update-january-2024 - ✅
new-feature-announcement-dark-mode - ❌
campaign-123 - ❌
nl-jan
Archive Metadata
The archive pages include metadata from your settings:- Site name from
app.site_name - Favicon from
app.favicon_url - Logo from
app.logo_url
Sitemap
listmonk doesn’t automatically generate a sitemap. Consider creating one that includes your archive URLs.
Troubleshooting
Archives Not Appearing
Template Rendering Errors
- Ensure archive_meta includes all variables used in templates
- Check template syntax
- Review application logs for specific errors
RSS Feed Not Updating
- RSS feeds are generated in real-time, not cached
- Check browser/feed reader cache
- Verify campaigns have proper send_at dates