Please read and follow the below guidelines before asking for help in the forum.
Welcome to the Hugo forums and thanks for using Hugo! The below are a few friendly tips on getting help from the other Hugo volunteers in this forum.
Dare we say that while Hugo is indeed pretty magical, it is not meant to be a “magic wand” to suddenly give you a published website a la Square Space or Wordpress. You are expected to already know how to assemble a static web page, for which you do need some basic knowledge of html, css, command line and text editors. Or how to prepare a space to host your website. The bottom line is, if you are unwilling to invest the time required to learn these things, then Hugo is not for you.
There are too many such sites to mention but if you’re just starting out, here are a couple of sites to take a look at: w3schools, HTML5 Boilerplate or hackr.io. Take a look at the Recommended Reading wiki post in the forum, as well.
Thanks for bearing with me on the above, which needed to be said given the sheer volume of people asking similar questions. Here are several points that if you follow, will help get you a positive outcome in the forums:
Search the forum , because it is likely that your question has been asked and answered already. Do your homework.
N.B. We discourage reviving old topics because people who participated in those discussions of yesteryear are usually not here anymore and they rarely reply to questions. It is best to open a new topic rather than bumping an old one.
Read the docs, because they are pretty good and a lot of work goes into them. Then read them again. But note that they sometimes lag behind releases a bit. If you can help with that, please do.
A corollary to this is, read the release notes. If you are having a problem after upgrading Hugo, you may find a hint here.
Notes to address repeat inquiries about common problems:
- If your posts are not showing up, check if draft is set to true in your content frontmatter.
hugo serverfor the development server for inspecting your site during development, and just
hugoto generate the
/publicfolder in your project, which you upload to your site container.
- In your config, make sure
- If you are using a theme, you can override the theme’s files to make a change. For instance, assuming you are using Hyde, installed at
/themes/hydein your project, you can copy
/layouts/index.htmland edit that. Your copy will override that of the theme.
- Hugo’s lookup order is a source of confusion at first, but it is well defined and will help you understand what template is being applied to a given page.
- Hugo commands are case-sensitive, so pay attention to that when you build your templates.
Create a new thread in #support, for each new issue. Generally speaking, let us know:
- what you were doing or what you tried,
- what you expected, and
- what actually happened.
When you do get an answer, mark the best answer in the thread using the checkbox icon from the comment action menu (with like, edit, bookmark etc). This marks the thread as solved. Please do not add words like
SOLVED to the title.
Finally, please close the loop, by posting a summary in your thread about how you were able to solve the problem. In fact, keeping communications public, clear and complete helps the project.
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick
git clone on your repo, then run
hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
Git repository hosting services include Github, Bitbucket, Codebase, Gitlab, Sourcehut, and others. If you select Github, even if you do not know
git or have a repository, you can use Github “gists” for pasting logs and files. You can include multiple files in a single gist, like this one.
Consider contacting the theme’s author, if it is a theme-specific question because often the author will know better than the random passer-by in the forum. Check the theme’s README. But at least include a link to the theme, to help a person trying to help you.
First, use the
--verbose switch on
hugo server to produce more details on the command line including about errors.
Include the output of
hugo env from the command line, and any other relevant versions.
~> hugo env Hugo Static Site Generator v0.55.2-9D0203488/extended darwin/amd64 BuildDate: 2019-04-17T12:29:48Z GOOS="darwin" GOARCH="amd64" GOVERSION="go1.12.2" ~> git version git version 2.20.1
Finally, this is a positive and friendly community, and as with other open source projects, the Hugo project runs on unpaid volunteer work. Please be reminded of a couple of rules to make things easier in the forum:
- Pitch in!, and offer what help you can, as there is never enough time to do everything. If you noticed that something is lacking in the docs, you’re probably right, so please contribute!
- Assume good intentions. English is the language of the forum except for a couple subforums, but, it is not every user’s native language. Try to avoid too much slang, abbreviations, or idiomatic expressions.
- Keep it civil, courteous and polite. No personal or ad hominem attacks.
- Don’t waste people’s time.
- Discussion should be on topic, related to
- Consider this forum as the official support forum, not Stack Overflow or Reddit.
We haven’t had to do it very often, but, we reserve the right to ban or suspend from this community anyone who cannot play by the rules. Thanks for your understanding and cooperation.