Fix /rss.xml link on trailing slash

This commit is contained in:
prototypa
2023-01-18 01:32:04 -05:00
parent e276a99077
commit 6ea771991b
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
--- ---
import { Icon } from 'astro-icon'; import { Icon } from 'astro-icon';
import { getHomePermalink, getPermalink } from '~/utils/permalinks'; import { getHomePermalink, getPermalink, getAsset } from '~/utils/permalinks';
const links = [ const links = [
{ {
@ -53,7 +53,7 @@ const social = [
{ label: 'Twitter', icon: 'tabler:brand-twitter', href: '#' }, { label: 'Twitter', icon: 'tabler:brand-twitter', href: '#' },
{ label: 'Instagram', icon: 'tabler:brand-instagram', href: '#' }, { label: 'Instagram', icon: 'tabler:brand-instagram', href: '#' },
{ label: 'Facebook', icon: 'tabler:brand-facebook', href: '#' }, { label: 'Facebook', icon: 'tabler:brand-facebook', href: '#' },
{ label: 'RSS', icon: 'tabler:rss', href: getPermalink('/rss.xml') }, { label: 'RSS', icon: 'tabler:rss', href: getAsset('/rss.xml') },
{ label: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/onwidget/astrowind' }, { label: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/onwidget/astrowind' },
]; ];
--- ---

View File

@ -4,7 +4,7 @@ import Logo from '~/components/common/Logo.astro';
import ToggleTheme from '~/components/common/ToggleTheme.astro'; import ToggleTheme from '~/components/common/ToggleTheme.astro';
import ToggleMenu from '~/components/common/ToggleMenu.astro'; import ToggleMenu from '~/components/common/ToggleMenu.astro';
import { getHomePermalink, getBlogPermalink, getPermalink } from '~/utils/permalinks'; import { getHomePermalink, getBlogPermalink, getPermalink, getAsset } from '~/utils/permalinks';
const links = [ const links = [
{ {
@ -108,7 +108,7 @@ const links = [
<a <a
class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 inline-flex items-center" class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 inline-flex items-center"
aria-label="RSS Feed" aria-label="RSS Feed"
href={getPermalink('/rss.xml')} href={getAsset('/rss.xml')}
> >
<Icon name="tabler:rss" class="w-5 h-5" /> <Icon name="tabler:rss" class="w-5 h-5" />
</a> </a>