Available Feeds
Memos automatically generates RSS feeds for public content:Explore Feed
Public memos from all users on the instance:User Feed
Public memos from a specific user:Only memos with
PUBLIC visibility are included in RSS feeds. Private and protected memos are automatically excluded.Feed Format
Memos generates RSS 2.0 compliant feeds using the gorilla/feeds library.Feed Structure
Feed Item Details
Title Generation
Memos automatically generates item titles from memo content:- Extracts the first line of the memo
- Removes markdown heading syntax (
#,##, etc.) - Truncates to 100 characters at word boundary
- Adds ellipsis (
...) if truncated - Falls back to “Memo” if empty
| Memo Content | Generated Title |
|---|---|
# Hello World\n\nThis is content | Hello World |
This is a memo | This is a memo |
A very long title that exceeds one hundred characters and needs to be truncated... | A very long title that exceeds one hundred characters and needs to be truncated... |
| (empty) | Memo |
Content Rendering
Memo content is rendered as HTML using the markdown service:- Markdown is converted to HTML
- Both
<description>and<content:encoded>contain the full HTML - Inline styles and formatting are preserved
- Code blocks are rendered with proper formatting
Author Information
Each feed item includes author details:- Uses the user’s display name or username as fallback
- Includes email address if available
- In explore feeds, each item shows its respective author
- In user feeds, all items share the same author
Attachments as Enclosures
The first attachment of a memo is included as an RSS enclosure:- Local storage:
{baseURL}/file/attachments/{uid}/{filename} - External storage: Direct reference URL
- S3 storage: Direct reference URL (presigned if configured)
Only the first attachment is included in the RSS enclosure. To access all attachments, users must visit the memo’s web page.
Caching and Performance
Server-Side Caching
RSS feeds are cached to improve performance:- Cache duration: 1 hour (3600 seconds)
- Maximum cache size: 50 feeds
- Eviction policy: Least Recently Used (LRU)
- Cache keys:
exploreanduser:{username}
HTTP Caching Headers
Feeds include standard HTTP caching headers:Conditional Requests
RSS readers can useIf-None-Match for efficient polling:
Request:
Feed Limits
To maintain performance and reasonable feed sizes:- Maximum items per feed: 100 memos
- Ordering: Most recently updated first
- Visibility: Only
PUBLICmemos are included - Status: Only
NORMAL(non-archived) memos are included
Custom Feed Configuration
Feed metadata can be customized via instance settings:<title> and <description> elements in the RSS channel.
Example: Subscribe to User Feed
Using curl
Using RSS Readers
Feedly, Inoreader, NewsBlur, etc.:- Copy the feed URL:
https://your-memos.com/u/steven/rss.xml - Add to your RSS reader
- The reader will poll the feed periodically for updates
Implementation Details
Feed Generation Process
Source:server/router/rss/rss.go
- Fetch memos: Query database for public memos (max 100)
- Batch load resources: Fetch all attachments and creators in bulk to avoid N+1 queries
- Generate items: Convert each memo to RSS item with title, content, author
- Add enclosures: Include first attachment as enclosure
- Render XML: Use gorilla/feeds to generate RSS 2.0 XML
- Cache result: Store in memory cache with ETag
- Return response: Send with cache headers
Performance Optimizations
- Batch loading of attachments prevents N+1 query problems
- Batch loading of user information reduces database round-trips
- In-memory caching reduces repeated rendering
- ETag support allows RSS readers to skip unchanged feeds
- Cache-Control headers enable CDN and browser caching
Use Cases
Personal Knowledge Garden
Share your public notes with others:Team Blog
Use the explore feed for a team blog:Read-it-Later Integration
Connect RSS feeds to read-it-later services:- Pocket: Use IFTTT to send new feed items to Pocket
- Instapaper: Use Zapier to forward items
- Wallabag: Direct RSS subscription
Aggregate Multiple Users
Create a feed aggregator for multiple Memos users:Limitations
- No authentication support (feeds are public only)
- No filtering by tags or date range
- Maximum 100 items per feed
- No pagination for feeds with many items
- No custom feed formats (Atom, JSON Feed)
- Attachments beyond the first are not included in enclosures
- No support for categories/tags in RSS items
Troubleshooting
Feed Shows No Items
Possible causes:- User has no public memos
- All memos are set to
PRIVATEorPROTECTEDvisibility - All memos are archived (not
NORMALstatus)
- Visibility:
PUBLIC - Status:
NORMAL(not archived)
Feed URL Returns 404
Possible causes:- Username is incorrect
- User doesn’t exist
- RSS routes are not registered
Images Not Loading
Possible causes:- Attachment storage is misconfigured
- Presigned URLs have expired (S3 storage)
- External references are broken
Related Resources
- Memo Resource - Memo visibility and structure
- Attachment Resource - Attachment storage types
- Instance Settings - Customize feed metadata