From 7fd66d8a95337251b7ee2626e3565d17dfe79450 Mon Sep 17 00:00:00 2001 From: Kristinita Date: Tue, 15 Apr 2025 11:14:33 +0300 Subject: [PATCH] docs: Use raw string for the `PATH_METADATA` setting --- docs/faq.rst | 2 +- docs/settings.rst | 2 +- pelican/settings.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 8ae3af29..dc6097c8 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -118,7 +118,7 @@ How do I make my output folder structure identical to my content hierarchy? Try these settings:: USE_FOLDER_AS_CATEGORY = False - PATH_METADATA = "(?P.*)\..*" + PATH_METADATA = r"(?P.*)\..*" ARTICLE_URL = ARTICLE_SAVE_AS = PAGE_URL = PAGE_SAVE_AS = "{path_no_ext}.html" How do I assign custom templates on a per-page basis? diff --git a/docs/settings.rst b/docs/settings.rst index 89333f47..775bd528 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -458,7 +458,7 @@ If you don't want that flexibility and instead prefer that your generated output paths mirror your source content's filesystem path hierarchy, try the following settings:: - PATH_METADATA = '(?P.*)\..*' + PATH_METADATA = r'(?P.*)\..*' ARTICLE_URL = ARTICLE_SAVE_AS = PAGE_URL = PAGE_SAVE_AS = '{path_no_ext}.html' Otherwise, you can use a variety of file metadata attributes within URL-related diff --git a/pelican/settings.py b/pelican/settings.py index 3abe11bb..2932627e 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -144,7 +144,7 @@ DEFAULT_CONFIG = { "DEFAULT_ORPHANS": 0, "DEFAULT_METADATA": {}, "FILENAME_METADATA": r"(?P\d{4}-\d{2}-\d{2}).*", - "PATH_METADATA": "", + "PATH_METADATA": r"", "EXTRA_PATH_METADATA": {}, "ARTICLE_PERMALINK_STRUCTURE": "", "TYPOGRIFY": False,