Skip to content

Add robots.txt#239

Draft
Raquezin wants to merge 1 commit into
mainfrom
feat/add-robots
Draft

Add robots.txt#239
Raquezin wants to merge 1 commit into
mainfrom
feat/add-robots

Conversation

@Raquezin

@Raquezin Raquezin commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 3, 2026 16:44
@github-actions github-actions Bot requested a review from kennyfh June 3, 2026 16:44

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a robots.txt layout file. The review comments point out two critical issues: first, using Disallow: / will completely block search engines from crawling the site; second, the sitemap URL concatenation will result in an invalid URL due to a missing trailing slash, and should instead use the absURL function.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread layouts/robots.txt
@@ -0,0 +1,4 @@
User-agent: *
Disallow: /

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using Disallow: / will completely prevent search engines from crawling and indexing your website. If this is a public production site, you should allow crawling by leaving Disallow: empty.

Disallow:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Raquezin importante

Comment thread layouts/robots.txt
User-agent: *
Disallow: /

Sitemap: {{ .Site.BaseURL }}sitemap.xml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Since baseURL in config/_default/hugo.yaml is defined as https://clubalgoritmiaus.es (without a trailing slash), {{ .Site.BaseURL }}sitemap.xml will evaluate to https://clubalgoritmiaus.essitemap.xml. Using the absURL function is the idiomatic and safe way in Hugo to generate the absolute URL for the sitemap.

Sitemap: {{ "sitemap.xml" | absURL }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Raquezin échale un ojo

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a custom robots.txt template to the Hugo site, overriding Hugo’s built-in robots generation (currently enabled via enableRobotsTXT: true).

Changes:

  • Introduces layouts/robots.txt to control crawler behavior.
  • Adds a sitemap directive pointing to sitemap.xml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread layouts/robots.txt
Comment on lines +1 to +2
User-agent: *
Disallow: /
Comment thread layouts/robots.txt
User-agent: *
Disallow: /

Sitemap: {{ .Site.BaseURL }}sitemap.xml
@Raquezin Raquezin marked this pull request as draft June 3, 2026 16:48
@Pablo-Davila

Copy link
Copy Markdown
Member

Es gracioso porque las dos IAs coinciden en todo jajaja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants