Skip to content

Commit 5d59df7

Browse files
DavidLiedleclaude
andcommitted
Fix CSS and JS paths to include baseurl
Replace relative_url filter with direct baseurl references to ensure assets load correctly on GitHub Pages with subpath. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 7ddecab commit 5d59df7

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

_config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ collections:
3232
output: true
3333
permalink: /:collection/:name/
3434

35+
# Include assets
36+
include:
37+
- _layouts
38+
- _includes
39+
- assets
40+
3541
# Exclude from processing
3642
exclude:
3743
- Gemfile
@@ -40,6 +46,7 @@ exclude:
4046
- vendor
4147
- .git
4248
- .gitignore
49+
- JEKYLL_SETUP.md
4350

4451
# Enable relative links
4552
relative_links:

_layouts/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}</title>
7-
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
7+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css">
88
<link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Source+Code+Pro:wght@400;600&family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
99
{% seo %}
1010
</head>
@@ -45,6 +45,6 @@ <h3>Table of Contents</h3>
4545
</main>
4646
</div>
4747

48-
<script src="{{ '/assets/js/navigation.js' | relative_url }}"></script>
48+
<script src="{{ site.baseurl }}/assets/js/navigation.js"></script>
4949
</body>
5050
</html>

_layouts/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>{{ site.title }}</title>
7-
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
7+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css">
88
<link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Source+Code+Pro:wght@400;600&family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
99
{% seo %}
1010
</head>

0 commit comments

Comments
 (0)