# Multiple static pages at root level?

**URL:** <https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680>\
**Category:** support\
**Created:** [January 28, 2019, 3:40am UTC](https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680 "2019-01-28T03:40:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![micael\_carvalho](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/micael_carvalho/32/7800_2.png) [@micael\_carvalho](https://discourse.gohugo.io/u/micael_carvalho)\
**Post date:** [January 28, 2019, 3:40am UTC](https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680/1 "2019-01-28T03:40:31Z")

</div>

Hello,

I’ve been struggling to get this super simple thing to work. I’m not sure if there’s a bug in my version of Hugo or if I’m doing something very wrong.

Basically, I want my website to be accessible by: [http://URL](http://URL), and this gives me the home page — this much is working, index.md is being used. However, whenever I try to implement other pages, like [http://URL/projects](http://URL/projects), the markdown file is not parsed and not put inside the public folder.

This is the structure of my content folder:

```auto
- content
- - index.md
- - projects.md
- - resources.md

```

Inside the public folder, I have index.html, but nothing for the other two. Their headers follow this pattern:

```auto
---
author: Name Here
title: Projects
type: static
---

```

I also tried changing the type to single, and many other values, without success.  
Disclaimer: I’ve read basically all related material online, including topics here about rendering multiple root level html pages, without success. None worked.

Version: `Hugo Static Site Generator v0.53/extended darwin/amd64 BuildDate: unknown`

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [January 28, 2019, 3:44am UTC](https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680/2 "2019-01-28T03:44:33Z")

</div>

Hi. You need to change `content/index.md` to `_index.md`. This will convert that directory level from a leaf bundle to a branch bundle, and allow your other pages to display

---

<div class="post-metadata">

**Author:** ![micael\_carvalho](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/micael_carvalho/32/7800_2.png) [@micael\_carvalho](https://discourse.gohugo.io/u/micael_carvalho)\
**Post date:** [January 28, 2019, 3:46am UTC](https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680/3 "2019-01-28T03:46:11Z")

</div>

Hi @zwbetz,

Thanks for the quick reply! 🙂  
I’ve tried doing this, but then when compiling I get this:  
`Error: Error building site: failed to render pages: render of "home" failed: "/PATH/site/themes/bootstrap/layouts/static/list.html:7:31": execute of template failed: template: static/list.html:7:31: executing "static/list.html" at <.Paginator.Pages>: undefined variable: $index`

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [January 28, 2019, 3:47am UTC](https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680/4 "2019-01-28T03:47:17Z")

</div>

Hmm. This is a separate issue. We’d have to see your code to troubleshoot further

---

<div class="post-metadata">

**Author:** ![micael\_carvalho](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/micael_carvalho/32/7800_2.png) [@micael\_carvalho](https://discourse.gohugo.io/u/micael_carvalho)\
**Post date:** [January 28, 2019, 3:48am UTC](https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680/5 "2019-01-28T03:48:11Z")

</div>

If I change the `type` inside `_index.md` to `single` (it was `static` before), it works for all the pages, except index itself (home is inaccessible, there is an `index.xml` inside public, but no `index.html`).

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [January 28, 2019, 3:54am UTC](https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680/6 "2019-01-28T03:54:22Z")

</div>

Try totally removing that `type` line from front matter

---

<div class="post-metadata">

**Author:** ![micael\_carvalho](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/micael_carvalho/32/7800_2.png) [@micael\_carvalho](https://discourse.gohugo.io/u/micael_carvalho)\
**Post date:** [January 28, 2019, 3:56am UTC](https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680/7 "2019-01-28T03:56:29Z")

</div>

Managed to fix it by creating a file `index.html` inside `layouts` with this content:

```auto
{{ partial "head" . }}
<div class="container content">
  {{ .Content }}
</div>
{{ partial "foot" . }}

```

Now everything is working as intended.

Thank you a lot, @zwbetz. I had spent a lot of time on this without success. 😃

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [January 28, 2019, 3:58am UTC](https://discourse.gohugo.io/t/multiple-static-pages-at-root-level/16680/8 "2019-01-28T03:58:26Z")

</div>

Ah yes, you need a homepage template 🙂 this is why I asked to see your code. Anyways glad you got it working
