I’m trying to create a site without a blog, but I’m not sure how to based on the documentation. I mainly need a couple static page. I’m just want to create a small informational website. Any help would be appreciated.
There are several example themes that are intended as a landing page or a couple of static pages. I think you can go a long way by using or building off one of these:
I have a few of these, but they’re not public. I usually just create a single content file for each page (like /content/about.md
) and set type = "about"
in the front matter. Then I create the layout as /layouts/about/single.html
.
Hey, I am building a non-blog website myself, and Hugo makes things very easy for you. I am no developer, but I did the codecademy html + css + bootstrap tutorial and then the basic Hugo tutorial and you figure it out little by little from this discussion site. Here’s the site (not all reports are live, but the agriculture one is already working, with downloadables and stuff, more or less):
And here’s the repository of the hugo setup for it.
Pay attention to the content directory (folder) for content, and themes/seeagt/layouts/report/single.html and and themes/seeagt/layouts/index.html which are the only two templates in use (for all of the reports and the home page, respectively). Good luck in your endeavors.
My site is mostly a collection of different kinds of content: https://harishnarayanan.org
Like @renatovargas pointed out, you can learn how this is done by looking at the content
directory and see how this relates to the templates
directory: https://github.com/hnarayanan/harishnarayanan.org
Great site! Beautiful photos.
As a Hugo noob (just started using it today) I’ve found everything pretty intuitive, but trying to get regular non-data-driven pages to render, while maintaining the use of partials / blocks etc is a little confusing.