I’ve followed the Quick Start guide and run:
hugo new site hugotest
cd hugotest
git init
mkdir themes
cd themes
git submodule add https://github.com/halogenica/beautifulhugo.git beautifulhugo
Now, following the Homepage Template doc, I’ve created the file content/_index.md with the following contents:
Hello, world
I’ve started Hugo by running:
hugo server -D
and browsed to http://localhost:1313 , but there’s nothing there.
I tried adding a layouts/index.html file as described in the Homepage Template doc, but that made no difference. What am I doing wrong?
Here’s my site:
zwbetz
January 21, 2019, 6:51pm
2
Your content/_index.md
has no front matter. At minimum, you at least need empty front matter. So try something like this:
---
---
Hello, world!
Update: Well, nevermind, I just tested this, and looks like you can indeed have markdown content with no front matter.
Assuming you’re back at the root of your site and you’ve updated your content/_index.md as zwbetz suggested, can you try hugo server -t beautifulhugo
to use the theme you installed?
1 Like
zwbetz
January 21, 2019, 6:58pm
4
Yep @bitfield , you didn’t specify your theme. So as @michael_henderson mentioned, specify it through command line, or in your config.toml
like so:
theme = "beautifulhugo"
mojoa
January 21, 2019, 10:27pm
5
You may want to try zwbetz’s excellent tutorial.
Copied from the tutorial intro:
In my opinion, Hugo’s current quick start is ample. It does just what the name says, gets you started you quickly .
Still, there have many requests on the forums for a tutorial that dives deeper than the quick start, and gets into some templating basics. The thing you’re reading is my go at that. Starting from scratch, we’ll build a Hugo blog.
For the folks out there thinking, “just show me the money already”, here’s the finished product source code and demo . …
And Mike Dane’s Youtube series for a quick start.