when you look at the site in Chrome and open the inspector and look at the console what does it say? file not found for your css I’m sure, but what is the url it is looking for it at?
I’m new to hugo also (from jekyll as well) but when working locally maybe you need the baseurl to be empty - “” or “/”?
Mine is set to: baseURL: "/"
though I am not using a theme.
The command I use to show local changes is hugo server --theme=theme-name. But if your config isn’t working properly, it can cause problems. First of all, make sure the base URL is set to the address of the site you want. Don’t include a port number. That might fix it.
Do you have content in your site? Or layouts? Because it doesn’t seem like a CSS issue, if the difference between what you see and the site is the content part of the site.
So far I have followed the standard instruction installing a THEME in a project.
That means that I UNZIP a CLONED Repository from GITHUB in the THEMES folder of the desired project, BUILD with hugo new site “name_site”
The project in question is situated in C:\Hugo\sites.
As for any THEME you download, there is no content & no files in the PARENTfolder, in other words, these folders are EMPTY by default. Unless you mean the content & file folder inside the THEME folder. (Look picture below)
Skins are the files responsible for the look and feel of your site. It’s the CSS that controls colors and fonts, it’s the Javascript that determines actions and reactions. It’s also the rules that Hugo uses to transform your content into the HTML that the site will serve to visitors.
You have two ways to create a skin. The simplest way is to create it in the layouts/ directory. If you do, then you don’t have to worry about configuring Hugo to recognize it. The first place that Hugo will look for rules and files is in the layouts/ directory so it will always find the skin.
Your second choice is to create it in a sub-directory of the themes/ directory. If you do, then you must always tell Hugo where to search for the skin. It’s extra work, though, so why bother with it?
The difference between creating a skin in layouts/ and creating it in themes/ is very subtle. A skin in layouts/ can’t be customized without updating the templates and static files that it is built from. A skin created in themes/, on the other hand, can be and that makes it easier for other people to use it.
The rest of this tutorial will call a skin created in the themes/ directory a theme.
Note that you can use this tutorial to create a skin in the layouts/ directory if you wish to. The main difference will be that you won’t need to update the site’s configuration file to use a theme.
How to tell HUGO to look for layout in THEMEfolder?
I have unzipped a repo straight into the root directory: C:\Hugo\sites\name-site
Just so i could possibly bypass hugo’s search for the layout & content files, but no result.
If you find a theme called “Awesome Blog”, and you download it and it creates a directory called awesome-blog, then you need put that directory in the Hugo site theme directory.
If your site is at C:\Hugo\sites\example, the theme should be at C:\Hugo\sites\example\themes\awesome-blog.
Then in your config.toml, you set theme with theme = "awesome-blog".
Then it should work when you run hugo or hugo server.
The classic method you describe from the hugo tutorial (of which I explained that i applied it step-by-step) is not working for me, so far.
Thank you for your help, but according to this method I am now able to host it locally, yet I need to use: hugo server --theme="theme_name" --buildDrafts
It was this tutorial that helped me figuring this out:
Put your site online somewhere, such as a public git repo, and share the link to it. We can’t see what you are doing, so no one can assist you.
Don’t post any more messages in this thread until you’ve shared the code for your site. You are sending too many messages, and to receive help you need to show the code you are working with.
If you host a Jekyll website on GitHub, you’ll need to create a private or public GitHub repository for that. So just do the same as you’d normally do when you create a repository for a Jekyll website with GitHub desktop. (Except, of course, setting the repository to a Jekyll website on GitHub.com).
Once you have a repository set up, you can share the link here for others to inspect.