I have designed my website to a certain extent. Running “hugo -server” it looks as expected, accessed via localhost:1313. Screenshot:
However, when I run “hugo” and upload the “public/” folder to my FTP, the site looks like this:
I checked the docs and found this issue but it didn’t fix anything to add {{ $.Site.BaseURL }} to my css links.
That’s my config.toml (first lines):
baseurl = "https://inspiritana.org/test"
languageCode = "en-us"
title = "inspiritana"
# Enable comments by entering your Disqus shortname
disqusShortname = "devcows"
# Enable Google Analytics by entering your tracking code
googleAnalytics = ""
# Define the number of posts per page
paginate = 10
theme = "universal"
That’s in my head.html partial:
<link href="{{ $.Site.BaseURL }}css/font-awesome.min.css" rel="stylesheet">
<link href="{{ $.Site.BaseURL }}css/bootstrap.min.css" rel="stylesheet">
<link href="{{ $.Site.BaseURL }}css/roboto-font.css" rel="stylesheet">
<!-- Css animations -->
<link href="{{ $.Site.BaseURL }}css/animate.css" rel="stylesheet">
<!-- Theme stylesheet, if possible do not edit this stylesheet -->
<link href="{{ $.Site.BaseURL }}css/style.default.css" rel="stylesheet" id="theme-stylesheet">
<!-- Custom stylesheet - for your changes -->
<link href="{{ $.Site.BaseURL }}css/color-scheme.css" rel="stylesheet">
<link href="{{ $.Site.BaseURL }}css/custom.css" rel="stylesheet">
<!-- Favicon and apple touch icons-->
<link rel="shortcut icon" href="{{ .Site.BaseURL }}img/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="{{ .Site.BaseURL }}img/apple-touch-icon.png" />
<!-- owl carousel css -->
<link href="{{ $.Site.BaseURL }}css/owl.carousel.css" rel="stylesheet">
<link href="{{ $.Site.BaseURL }}css/owl.theme.css" rel="stylesheet">
And those .css files are accessible under the given parts. Even the source code of the deployed site points to the right files.
And that’s inside my scripts.html partial:
<script src="{{ $.Site.BaseURL }}/js/jquery-1.11.0.min.js"></script>
<script>
window.jQuery || document.write('<script src="{{ $.Site.BaseURL }}/js/jquery-1.11.0.min.js"><\/script>')
</script>
<script src="{{ $.Site.BaseURL }}/js/bootstrap.min.js"></script>
<script src="{{ $.Site.BaseURL }}/js/jquery.cookie.js"></script>
<script src="{{ $.Site.BaseURL }}/js/waypoints.min.js"></script>
<script src="{{ $.Site.BaseURL }}/js/jquery.counterup.min.js"></script>
<script src="{{ $.Site.BaseURL }}/js/jquery.parallax-1.1.3.js"></script>
<script src="{{ $.Site.BaseURL }}/js/front.js"></script>
<!-- owl carousel -->
<script src="{{ $.Site.BaseURL }}/js/owl.carousel.min.js"></script>