# Copy of 404.html page in themes/ananke/layouts does not generate any html file in public on build

**URL:** <https://discourse.gohugo.io/t/copy-of-404-html-page-in-themes-ananke-layouts-does-not-generate-any-html-file-in-public-on-build/46560>\
**Category:** support\
**Created:** [October 7, 2023, 4:44am UTC](https://discourse.gohugo.io/t/copy-of-404-html-page-in-themes-ananke-layouts-does-not-generate-any-html-file-in-public-on-build/46560 "2023-10-07T04:44:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yace](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/yace/32/20495_2.png) [@yace](https://discourse.gohugo.io/u/yace)\
**Post date:** [October 7, 2023, 4:44am UTC](https://discourse.gohugo.io/t/copy-of-404-html-page-in-themes-ananke-layouts-does-not-generate-any-html-file-in-public-on-build/46560/1 "2023-10-07T04:44:58Z")

</div>

Hi, new to Hugo so apologies if this is a silly question.

I want to add a thank-you.html page to my ananke theme once someone has submitted a contact request.

I added a new thank-you.html page alongside the 404.html page in themes/ananke/layouts/ but when I run hugo, the new file is not copied to public. This is true of any file I add there. But if I update the content of the 404.html file, it is updated in public.

What am I missing, and what is the cleanest way to add this file?

hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e+extended darwin/arm64 BuildDate=2023-09-24T15:20:17Z VendorInfo=brew  
GOOS=“darwin”  
GOARCH=“arm64”  
GOVERSION=“go1.21.1”  
[github.com/sass/libsass=“3.6.5”](http://github.com/sass/libsass=%223.6.5%22)  
[github.com/webmproject/libwebp=“v1.2.4”](http://github.com/webmproject/libwebp=%22v1.2.4%22)

Any advice appreciated!

---

<div class="post-metadata">

**Author:** ![Arif](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arif/32/20931_2.png) [@Arif](https://discourse.gohugo.io/u/Arif)\
**Post date:** [October 7, 2023, 6:59am UTC](https://discourse.gohugo.io/t/copy-of-404-html-page-in-themes-ananke-layouts-does-not-generate-any-html-file-in-public-on-build/46560/2 "2023-10-07T06:59:48Z")

</div>

> [@yace](#):
>
> What am I missing, and what is the cleanest way to add this file?

Add it to the static directory.

> **[Static files](https://gohugo.io/content-management/static-files/)**
>
> Files that get served \*\*statically\*\* (as-is, no modification) on the site root.

---

<div class="post-metadata">

**Author:** ![yace](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/yace/32/20495_2.png) [@yace](https://discourse.gohugo.io/u/yace)\
**Post date:** [October 7, 2023, 10:50am UTC](https://discourse.gohugo.io/t/copy-of-404-html-page-in-themes-ananke-layouts-does-not-generate-any-html-file-in-public-on-build/46560/3 "2023-10-07T10:50:48Z")

</div>

Thanks a lot, I’ve got something working for now with that approach.

I made a copy of the expanded 404.html file from output and edited it by hand.

But I’d still rather just put a simple new file in layouts, so that it gets regenerated each time to pick up any changes elsewhere.

Ideally something like this as “thank-you.html”:

```auto
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
{{ define "main" }}
    <article class="center cf pv5 measure-wide-l">
      <h1>
        Thank you for your feedback.
      </h1>
    </article>
{{ end }}

```

Any idea why this approach isn’t working?

Thanks again

---

<div class="post-metadata">

**Author:** ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)\
**Post date:** [October 7, 2023, 11:01am UTC](https://discourse.gohugo.io/t/copy-of-404-html-page-in-themes-ananke-layouts-does-not-generate-any-html-file-in-public-on-build/46560/4 "2023-10-07T11:01:04Z")

</div>

`layout` contains _templates_ that render MD files. And there are only so many predefined template names (like `single.html`, `index.html`, `list.html`, `404.html`). `thank-you.html` is not one of them, so Hugo wouldn’t look for it and consequently not copy it anywhere.

You could either follow @jmooring’s suggestion or create a directory `thank-you` below `content` and an `index.md` inside it, telling that file to use the template you want. Or rely on Hugo’s automatism and create also a `thank-you` directory in your `layout` directory and add a `single.html` template to it.

---

<div class="post-metadata">

**Author:** ![yace](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/yace/32/20495_2.png) [@yace](https://discourse.gohugo.io/u/yace)\
**Post date:** [October 7, 2023, 11:45am UTC](https://discourse.gohugo.io/t/copy-of-404-html-page-in-themes-ananke-layouts-does-not-generate-any-html-file-in-public-on-build/46560/5 "2023-10-07T11:45:02Z")

</div>

Thanks, that makes more sense now, I appreciate the lesson.
