Skip to content

Commit

Permalink
Merge pull request #138 from dynamist/f/sphinx-7.2-patches
Browse files Browse the repository at this point in the history
Fix a compatibility issue introduced in Sphinx 7.2.0 and later that changes path handling to Pathlib
  • Loading branch information
bashtage authored Aug 18, 2023
2 parents 50f7438 + 348718f commit 0d31923
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 0d31923

Please sign in to comment.