Skip to content

Commit

Permalink
docs: improve SEO by adding sitemap (#435)
Browse files Browse the repository at this point in the history
* add sphinx-sitemap

* update sitemap version

* add robots.txt file

---------

Co-authored-by: Adrien Barbaresi <[email protected]>
  • Loading branch information
tonyyanga and adbar authored Oct 30, 2023
1 parent 2c3b751 commit 2aa3197
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode'
'sphinx.ext.viewcode',
'sphinx_sitemap'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -135,3 +136,8 @@
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
}

html_baseurl = 'https://trafilatura.readthedocs.io/'
sitemap_url_scheme = "{lang}latest/{link}"

html_extra_path = ['robots.txt']
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pydata-sphinx-theme>=0.14.1
docutils>=0.20.1
# without version specifier
trafilatura
sphinx-sitemap
3 changes: 3 additions & 0 deletions docs/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
User-agent: *

Sitemap: https://trafilatura.readthedocs.io/en/latest/sitemap.xml

0 comments on commit 2aa3197

Please sign in to comment.