Skip to content

Commit

Permalink
Fix a compatibility issue introduced in Sphinx 7.2.0 and later that c…
Browse files Browse the repository at this point in the history
…hanges path handling to Pathlib
  • Loading branch information
Grokzen committed Aug 18, 2023
1 parent ac74442 commit 348718f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sphinx_material/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import re
import sys
from multiprocessing import Manager
from pathlib import Path
from typing import List, Optional
from xml.etree import ElementTree

Expand Down Expand Up @@ -71,7 +72,9 @@ def create_sitemap(app, exception):
):
return

filename = app.outdir + "/sitemap.xml"
outdir = app.outdir if isinstance(app.outdir, Path) else str(app.outdir)
filename = str(Path(outdir) / "sitemap.xml")

print(
"Generating sitemap for {0} pages in "
"{1}".format(len(app.sitemap_links), console.colorize("blue", filename))
Expand Down

0 comments on commit 348718f

Please sign in to comment.