Use Hugo for a custom static page

If I want to use Hugo to create a custom html page is it required that I use a theme for that purpose?

If I don’t have to use a theme, how would I create that? Is there a specific generic hugo.toml for that purpose?

No, you do not have to use a theme. You can work directly in the root and skip building a theme.

I would suggest you start there.

No you don’t need a theme.

to generate a basic (starter) site with a minimal example config and some layouts and content that can be viewed directly.

hugo new theme --themesDir . my-new-site
cd my-new-site
hugo server
Site structure
my-new-site
β”‚   hugo.toml
β”‚
β”œβ”€β”€β”€archetypes
β”‚       default.md
β”‚
β”œβ”€β”€β”€assets
β”‚   β”œβ”€β”€β”€css
β”‚   β”‚   β”‚   main.css
β”‚   β”‚   β”‚
β”‚   β”‚   └───components
β”‚   β”‚           footer.css
β”‚   β”‚           header.css
β”‚   β”‚
β”‚   └───js
β”‚           main.js
β”‚
β”œβ”€β”€β”€content
β”‚   β”‚   _index.md
β”‚   β”‚
β”‚   └───posts
β”‚       β”‚   post-1.md
β”‚       β”‚   post-2.md
β”‚       β”‚   _index.md
β”‚       β”‚
β”‚       └───post-3
β”‚               bryce-canyon.jpg
β”‚               index.md
β”‚
β”œβ”€β”€β”€data
β”œβ”€β”€β”€i18n
β”œβ”€β”€β”€layouts
β”‚   β”‚   baseof.html
β”‚   β”‚   home.html
β”‚   β”‚   page.html
β”‚   β”‚   section.html
β”‚   β”‚   taxonomy.html
β”‚   β”‚   term.html
β”‚   β”‚
β”‚   └───_partials
β”‚       β”‚   footer.html
β”‚       β”‚   head.html
β”‚       β”‚   header.html
β”‚       β”‚   menu.html
β”‚       β”‚   terms.html
β”‚       β”‚
β”‚       └───head
β”‚               css.html
β”‚               js.html
β”‚
└───static
        favicon.ico

you will find a lot of guides around describing how to set up a Hugo site from scratch

Thanks for the response

So, working through the steps now and seeing the structure, since I don’t want a blog site and just a static site that may, or may not, have just one static page, I can make the changes in the hugo.toml to reflect that?

Out of curiosity. If you just want to make a single static page. Why not just skip all tools and make it plain html and css?

there is nothing in the config that tells β€œthis is a blog”

it’s all about Content organization.

a singe page: only index.md in your content folder

a site with multiple pages: _index.md and more md files lalso in subdirectories name the folders to your need.

@willduncanphoto

Funny you should mentioned it. A bit after my last post, that occurred to me. I was overthinking it. I bypassed Hugo and just went the basic route.