# Custom output for list page (\_index.html) is not working

**URL:** <https://discourse.gohugo.io/t/custom-output-for-list-page-index-html-is-not-working/12392>\
**Category:** support\
**Created:** [June 13, 2018, 8:05am UTC](https://discourse.gohugo.io/t/custom-output-for-list-page-index-html-is-not-working/12392 "2018-06-13T08:05:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![looeee](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/looeee/32/9668_2.png) [@looeee](https://discourse.gohugo.io/u/looeee)\
**Post date:** [June 13, 2018, 8:05am UTC](https://discourse.gohugo.io/t/custom-output-for-list-page-index-html-is-not-working/12392/1 "2018-06-13T08:05:40Z")

</div>

I’m using Hugo to build static pages for a django site.

To populate the meta description tag, I’ve added a custom “description” type which outputs a txt file. In `config.toml` I’ve added:

```auto
[outputFormats]
  [outputFormats.description]
    baseName = "description"
    isHTML = true
    path = 'meta/description'
    mediaType = "text/plain"

[outputs]
  page = ["HTML", "description"]

```

Then in my `layout/_default/` folder I’ve added two extra templates, to correspond to the existing `list.html` and `single.html`:

`list.txt` and `single.txt`, both of which contain:

```auto
{{.Description | safeHTML }}

```

The files from `single.txt` are created as expected, however the `list.txt` pages don’t seem to work.

The [last time this topic was raised](https://discourse.gohugo.io/t/can-i-have-a-custom-layout-for-a-list-view/6857), this github issue was linked to:

> <https://github.com/gohugoio/hugo/issues/3005>

However, as far as I can see from reading it, it doesn’t have anything to do with custom templates.

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/looeee/32/9668_2.png) [@looeee](https://discourse.gohugo.io/u/looeee)\
**Post date:** [June 13, 2018, 8:11am UTC](https://discourse.gohugo.io/t/custom-output-for-list-page-index-html-is-not-working/12392/2 "2018-06-13T08:11:58Z")

</div>

I was able to find a workaround for this. I added a custom type and layout for list pages, now in each list page I’ve added this to my front matter:

```auto
type: listCustomType
layout: listCustomLayout

```

And I’ve added the file `layouts/listCustomType/listCustomLayout.html`.

`listCustomLayout.html` looks like this:

```auto
{{define "main"}}
  // everything from layouts/_default/list.html copied here
{{ end }}

```

~~And it works! The custom type is generated as expected.~~

EDIT: oops, I spoke too soon! I’m getting errors:

`error calling Paginate: Paginators not supported for pages of type "page"`. So I guess this workaround will not work after all.
