I’m having a hard time making the hugo console theme work. In the development server, the theme is properly applied and all pages are properly linked but with builds or deploys, the homepage is just static html without the theme and my two other pages don’t load at all. Here’s the code. I would appreciate the help
As a first step, you could have a look at the messages in your browser’s developer tools. If your CSS isn’t loaded, they’ll tell you where the browser is looking for it. That might give you an idea where the issue lies.
hi so i just realized the css isn’t loading even though i’ve set my base url to the given github pages url. i also realized when i build the website, the server attempts to get the css files from localhost rather even though that’s not my baseURL. see the css links in the html:
<link rel="stylesheet" href="http://localhost:1313/hugo-theme-console/css/terminal-0.7.4.min.css">
<link rel="stylesheet" href="http://localhost:1313/hugo-theme-console/css/animate-4.1.1.min.css">
<link rel="stylesheet" href="http://localhost:1313/hugo-theme-console/css/console.css">
I’m totally unsure why this is happening
Perhaps you copied public
from your development machine to your site?
I don’t know anything about git workflows, can’t help with that.
two root causes:
- you have your public folder committed that was build with
hugo server
. if you want to go with that:
use
hugo
only. This will create the correct links
- you have to active workflows. one using a hugo build, and one using a simple static deploy.
if you go with option 1) remove the hugo wf
if you want the hugo workflow, remove the public folder from your repo commit the removal and add it to your .gitignore and delete the other workflow