Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My robots.txt file disappeared when I moved to 0.123.0 #12071

Closed
simonhollingshead opened this issue Feb 20, 2024 · 3 comments · Fixed by #12074
Closed

My robots.txt file disappeared when I moved to 0.123.0 #12071

simonhollingshead opened this issue Feb 20, 2024 · 3 comments · Fixed by #12074

Comments

@simonhollingshead
Copy link

simonhollingshead commented Feb 20, 2024

I just cut over from 0.122.0 to 0.123.0 (simonhollingshead/simonhollingshead.com@457da72). I made no other changes.

I have always had enableRobotsTXT enabled. https://github.com/simonhollingshead/simonhollingshead.com/blob/main/hugo.toml#L6

The template is not being overwritten at either of the two lookup paths - neither exist (/layouts/robots.txt, /themes/<THEME>/layouts/robots.txt) but even if it was I would expect an empty or otherwise changed file, not a lack of a file.

simonhollingshead/simonhollingshead.com@bc822a0 - a github action writes the files back for me. You can see the expected mutations of the change of version in the meta tag, a completely acceptable change where the sitemap now actually generates a modified date for the homepage where it didn't before, but also the removal of the robots.txt file.

I saw no breaking change or description in the release notes that any changes were being made to the robots.txt generation.

What version of Hugo are you using (hugo version)? 0.123.0

Does this issue reproduce with the latest release? This is the latest.

@jmooring
Copy link
Member

Confirmed. We're not generating a robots.txt file when enableRobotsTxt is true in site configuration.

@bep bep added this to the v0.123.1 milestone Feb 20, 2024
@bep
Copy link
Member

bep commented Feb 20, 2024

I will fix this. I see that the only test we have for this is with a custom robotstxt template (which I then assume work), but not a test for the built-in template.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants