File: getting-started.rst

package info (click to toggle)
sphinx-sitemap 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 300 kB
  • sloc: python: 368; makefile: 13
file content (42 lines) | stat: -rw-r--r-- 964 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Getting Started
===============

Installation
------------

Directly install via ``pip`` by using:

.. code::

   pip install sphinx-sitemap

Or with ``conda`` via ``conda-forge``:

.. code::

   conda install -c conda-forge sphinx-sitemap

Usage
-----

Add ``sphinx_sitemap`` to :confval:`extensions` in your Sphinx **conf.py**.
For example:

.. code:: python

   extensions = ['sphinx_sitemap']

Set the value of :confval:`html_baseurl` in your Sphinx **conf.py** to the current
base URL of your documentation. For example:

.. code:: python

   html_baseurl = 'https://my-site.com/docs/'

After the HTML finishes building, **sphinx-sitemap** will output the location of the sitemap::

    sitemap.xml was generated for URL https://my-site.com/docs/ in /path/to/_build/sitemap.xml

.. tip:: Make sure to confirm the accuracy of the sitemap after installs and upgrades.

See :doc:`advanced-configuration` for more information about how to use **sphinx-sitemap**.