Skip to content

Support for Atom Feeds - #750

Merged
poppastring merged 4 commits into
mainfrom
feature/atom-feed
Dec 24, 2025
Merged

poppastring merged 4 commits into
mainfrom
feature/atom-feed

Conversation

@poppastring

Copy link
Copy Markdown
Owner

PR Classification

New feature: Adds Atom 1.0 feed support to DasBlog for improved syndication and standards compliance.

PR Summary

This pull request implements Atom 1.0 feed generation and exposes Atom endpoints for both global and category-specific feeds. It also updates caching and site layout for Atom autodiscovery.

  • Atom.cs: Introduces AtomRoot, AtomEntry, and related classes for Atom feed serialization.
  • ISubscriptionManager.cs and SubscriptionManager.cs: Add methods and logic to generate Atom feeds and entries from blog posts.
  • FeedController.cs: Adds /feed/atom and /feed/atom/{category} endpoints, Atom feed serialization, and caching logic.
  • _Layout.cshtml and _HtmlAtomPartial.cshtml: Add Atom autodiscovery link to site HTML head.

Refactored Atom model classes to suppress empty/default elements and attributes using ShouldSerialize* methods, resulting in cleaner and more standards-compliant Atom XML. Updated Atom feed endpoints to use a custom XML serialization method with proper namespace and encoding handling. Also switched Atom entry IDs to use relative URLs and added necessary using directives.
Added _HtmlAtomPartial.cshtml to inject Atom feed <link> tag using site settings. Included the new partial in _Layout.cshtml head section to enable Atom feed discovery alongside existing RSS and metadata links.
@poppastring
poppastring merged commit 71bd9c6 into main Dec 24, 2025
@poppastring
poppastring deleted the feature/atom-feed branch December 24, 2025 03:00
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