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

Manually create a sitemap.xml for docs SEO #4261

Merged
merged 16 commits into from
Nov 26, 2024
5 changes: 0 additions & 5 deletions docs/source/_templates/layout.html

This file was deleted.

9 changes: 5 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,11 @@

# html_extra_path used to define a path to robots.txt which is used by webcrawlers
# to ignore or allow certain links.
# We've decided to rely on RTD's default robots.txt, so we no longer need to specify a custom one,
# see discussion at https://github.com/kedro-org/kedro/issues/3741
# html_extra_path = [str(here / "robots.txt")]
html_extra_path = [str(here / "sitemap.xml")]
# We've tried to rely on RTD's default `robots.txt`, but it doesn't support sub-projects (Viz and Datasets),
# so we decided to use our own `robots.txt` again, with a link to the custom `sitemap.xml`.
# See the discussion at https://github.com/kedro-org/kedro/issues/3741.
DimedS marked this conversation as resolved.
Show resolved Hide resolved
# html_extra_path = [str(here / "robots.txt"), str(here / "sitemap.xml")]
html_extra_path = [str(here / "robots.txt")]

# Removes, from all docs, the copyright footer.
html_show_copyright = False
Expand Down
8 changes: 8 additions & 0 deletions docs/source/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
User-agent: *
Disallow: /

Allow: /en/stable/
Allow: /projects/kedro-viz/en/stable/
Allow: /projects/kedro-datasets/en/latest/

Sitemap: https://docs.kedro.org/en/stable/sitemap.xml
13 changes: 5 additions & 8 deletions docs/source/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://docs.kedro.org/en/stable/</loc>
<lastmod>2024-09-01T18:53:11.571849+00:00</lastmod>
<lastmod>2024-11-26T18:53:11.571849+00:00</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://docs.kedro.org/en/latest/</loc>
<lastmod>2024-11-26T18:53:11.571849+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://docs.kedro.org/projects/kedro-viz/en/stable/</loc>
<lastmod>2024-09-01T18:53:11.571849+00:00</lastmod>
<lastmod>2024-11-26T18:53:11.571849+00:00</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://docs.kedro.org/projects/kedro-viz/en/latest/</loc>
<lastmod>2024-11-26T18:53:11.571849+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://docs.kedro.org/projects/kedro-datasets/en/stable/</loc>
<lastmod>2024-09-01T18:53:11.571849+00:00</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://docs.kedro.org/projects/kedro-datasets/en/latest/</loc>
<lastmod>2024-11-26T18:53:11.571849+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
Expand Down