Skip to content

Commit

Permalink
Fix asset paths when baseURL has sub-folder
Browse files Browse the repository at this point in the history
See #97
  • Loading branch information
anthonyfok committed May 2, 2018
1 parent 41727a6 commit d013825
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

{{ $stylesheet := .Site.Data.webpack_assets.app }}
{{ with $stylesheet.css }}
<link href="{{ absURL (printf "%s%s" "/dist/" .) }}" rel="stylesheet">
<link href="{{ relURL (printf "%s%s" "dist/" .) }}" rel="stylesheet">
{{ end }}

{{ range .Site.Params.custom_css }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/site-scripts.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $script := .Site.Data.webpack_assets.app }}
{{ with $script.js }}
<script src="{{ absURL (printf "%s%s" "/dist/" .) }}"></script>
<script src="{{ relURL (printf "%s%s" "dist/" .) }}"></script>
{{ end }}

0 comments on commit d013825

Please sign in to comment.