feat: improve RSS feed discovery in templates

Updates RSS feed links to use Flask url_for() and config values.

Changes:
- Use url_for('public.feed') for RSS navigation link
- Use _external=True for feed discovery link (full URL)
- Use config.SITE_NAME in feed title for customization

This ensures proper URL generation and makes the site more customizable.
This commit is contained in:
2025-11-19 08:43:34 -07:00
parent d420269bc0
commit deb784ad4f

View File

@@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}StarPunk{% endblock %}</title> <title>{% block title %}StarPunk{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link rel="alternate" type="application/rss+xml" title="StarPunk RSS Feed" href="/feed.xml"> <link rel="alternate" type="application/rss+xml" title="{{ config.SITE_NAME }} RSS Feed" href="{{ url_for('public.feed', _external=True) }}">
{% block head %}{% endblock %} {% block head %}{% endblock %}
</head> </head>
<body> <body>
@@ -19,7 +19,7 @@
<h1><a href="/">StarPunk</a></h1> <h1><a href="/">StarPunk</a></h1>
<nav> <nav>
<a href="/">Home</a> <a href="/">Home</a>
<a href="/feed.xml">RSS</a> <a href="{{ url_for('public.feed') }}">RSS</a>
{% if g.me %} {% if g.me %}
<a href="{{ url_for('admin.dashboard') }}">Admin</a> <a href="{{ url_for('admin.dashboard') }}">Admin</a>
{% endif %} {% endif %}