Skip to content

Commit 82be8f9

Browse files
fix(head): fix broken RSS feed and canonical link URLs (#43)
The Pug attributes for the RSS feed and canonical links used single-quoted Pug attributes with double-quoted Liquid strings. When Pug renders to HTML, it converts attributes to double-quote syntax, causing the inner double quotes to break the attribute value — resulting in truncated URLs (missing /feed.xml, etc.). Fix by switching to double-quoted Pug attributes with single-quoted Liquid strings, matching the working pattern used by the CSS link on the line above. Fixes #31
1 parent 3998d55 commit 82be8f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_includes/head.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ head
88

99
link(rel='icon', type='image/png', href='/img/logo.png')
1010
link(rel='stylesheet', href="{{ '/css/main.css' | prepend: site.baseurl }}")
11-
link(rel='canonical', href='{{ page.url | replace:"index.html","" | prepend: site.baseurl | prepend: site.url }}')
12-
link(rel='alternate', type='application/rss+xml', title='{{ site.title }}', href='{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}')
11+
link(rel='canonical', href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}")
12+
link(rel='alternate', type='application/rss+xml', title='{{ site.title }}', href="{{ '/feed.xml' | prepend: site.baseurl | prepend: site.url }}")
1313

1414
// Bootstrap CSS and JS
1515
link(rel='stylesheet', href='https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css', integrity='sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm', crossorigin='anonymous')

0 commit comments

Comments
 (0)