Theme 'Page Not Found'

Github repo: GitHub - jpnfighter/steve-site: hugo website

  • When trying to make a theme from scratch I am greeted with ‘Page Not Found’ being displayed when I ‘hugo server -D’
  • Any help would be appreciated, thank-you in advance
  • I have made a new theme from scratch and added the following:

hugo.toml

baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
theme = 'steve-theme'

list.html

<html>
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8"/>

<style>
.align {
max-width: 500;
margin: auto;
}
</style>

<div class="align">
<link rel="stylesheet" href="style.css">
<html>

<body>

{{ range .Pages }}
<ul>
<li><a href="{{.Permalink}}">{{.Title}}</a></li>
</ul>
{{end}}

<center>
<a href="website.com">
Home
</a>
</center>

</body>
</html>

single.html

<html>
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8"/>
<style>
.align {
max-width: 500;
margin: auto;
}
</style>

<div class="align">
<link rel="stylesheet" href="style.css">
<html>

<body>

{{.Content}}

<center>
<a href="website.com">
Home
</a>
</center>

</body>
</html>

style.css (located at Hugo\steve-site\themes\steve-theme\static\css)

h1 {
    color: red
}

body {
    background: #14141E
}

post.md

---
title: "post"
---

# Post heading

Hello world.

This is not enough information to troubleshoot your problem.

Please post a link to the public repository for your project.

See Requesting Help.

Let us see your code

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.

1 Like

1) You’ve nested (duplicated) the top level directory in your repository.

2) Your home page template is empty.

https://github.com/jpnfighter/steve-site/blob/main/steve-site/themes/steve-theme/layouts/index.html

For whatever reason I thought a blank index.html would automatically use my list.html- guess not. Thank-you

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