Hugo not deploying humans.txt file from root to public folder

I have a humans.txt file included at the root of my site, which I’m migrating to Hugo. I’ve already moved my work site, Policymakr, to Hugo and its humans.txt file is deployed and displays normally. Both sites are hosted on Cloudflare pages. But for some reason when I deploy the second site, even after deleting the public folder it doesn’t deploy, whether locally or on Cloudflare.

I haven’t consciously included anything different in the two config.toml files, so I don’t know why the same file is being treated differently when, in effect, the setup for these two sites is — for all relevant purposes that I can identify — identical. Any suggestions?

Both of these work for me:

https://www.policymakr.com/humans.txt
https://www.donaldjenkins.com/humans.txt

Sorry. The donaldjenkins.com DNS hasn’t migrated to Cloudflare yet as I still have issues with the Hugo framework (including this one). The domain for the Hugo staging site is https/://donaldjenkins.pages.dev.

The policymakr.com site is on Cloudflare and I never had any issues deploying the humans.txt file for it.

| jmooring
May 12 |

  • | - |

Both of these work for me:

https://www.policymakr.com/humans.txt
https://www.donaldjenkins.com/humans.txt

If this is the repo:
https://github.com/donaldjenkins/donaldjenkins

Then you should move humans.txt to the static directory.

1 Like

Thanks. That solved it. I was still a little confused about how the static directory operates and in particular about how it handles mounts. But it seems perfectly logical: if you want something to be in the root, put in in static. :star_struck:

2 Likes

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