Add RSS subscribe links with icon across blog pages, footer, and head
- Add <.rss_icon> inline SVG component in core_components.ex - Inject RSS <link> tags into <head> on blog pages for auto-discovery - Show RSS icon next to blog title on index and tag pages - Show RSS icon on post pages next to back-link - Add Subscribe section in footer with links to both feeds - Wire feed URL through blog controller (index, show, tag actions) 174 tests pass, credo clean.
This commit is contained in:
@@ -39,4 +39,30 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="border-t border-base-200 px-4 py-8 sm:px-6 lg:px-8">
|
||||
<div class="mx-auto max-w-2xl space-y-3">
|
||||
<h3 class="text-sm font-semibold tracking-wide text-base-content/60 uppercase">Subscribe</h3>
|
||||
<div class="flex flex-wrap gap-4">
|
||||
<a
|
||||
href="/api/blog/engineering/feed.xml"
|
||||
class="inline-flex items-center gap-2 text-sm text-base-content/70 hover:text-primary transition-colors"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<.rss_icon class="size-4 text-orange-500" />
|
||||
Engineering Blog
|
||||
</a>
|
||||
<a
|
||||
href="/api/blog/releases/feed.xml"
|
||||
class="inline-flex items-center gap-2 text-sm text-base-content/70 hover:text-primary transition-colors"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<.rss_icon class="size-4 text-orange-500" />
|
||||
Release Notes
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<.flash_group flash={@flash} />
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
<% end %>
|
||||
<meta name="twitter:card" content={meta.twitter_card} />
|
||||
<% end %>
|
||||
<%= for feed <- get_content_for(assigns, :feed_links) do %>
|
||||
<link rel="alternate" type="application/rss+xml" title={feed.title} href={feed.rss_url} />
|
||||
<% end %>
|
||||
</head>
|
||||
<body>
|
||||
{@inner_content}
|
||||
|
||||
Reference in New Issue
Block a user