How to create the simplest of sites

I need help getting started by creating the simplest site. I just want one page that says “hello world” and then I can go from there. I’m having trouble because no matter what I do the site is just “Page not found.” I’ve followed these two tutorials but I still have the same problem: The most basic possible Hugo site | Simon Willison’s TILs , Really getting started with Hugo: four simple steps | BryceWray.com

If you’re sure that’s what you want…

# Create a minimal site skeleton.
mkdir -p mysite/{content,layouts/_default}

# Change the current working directory.
cd mysite

# Create a minimal site configuration file.
echo "baseURL = 'https://example.org'" >> hugo.toml
echo "title = 'My Site'" >> hugo.toml
echo "languageCode = 'en-US'" >> hugo.toml
echo "disableKinds = ['rss','sitemap','taxonomy','term']" >> hugo.toml

# Create a template for the home page.
echo "<h1>{{ .Site.Title }}</h1>" >> layouts/_default/home.html
echo "{{ .Content }}" >> layouts/_default/home.html

# Create content for the home page.
hugo new content content/_index.md
echo "Hello world." >> content/_index.md

# Build the site and examine the project structure.
hugo --buildDrafts
tree

# Run the development server to see the home page.
hugo server --buildDrafts

But I’d do this instead:

hugo new site mysite
cd mysite
hugo new theme mytheme
echo "theme = 'mytheme'" >> hugo.toml
hugo server

I tried both of the tutorials you referenced; both work fine.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.