Skip to content

Commit 6cf23db

Browse files
Update pelicanconf.py
1 parent f927222 commit 6cf23db

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pelicanconf.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,14 @@ def sponsors(preprocessor: Preprocessor, tag: str, markup: str) -> str:
6969
CATEGORY_URL = None
7070
CATEGORY_SAVE_AS = None
7171
CATEGORIES_SAVE_AS = None
72+
# Index is the news listing. We move it in order to have our index.md file as the home page.
7273
INDEX_SAVE_AS = "news/index.html"
73-
PATH_METADATA = r"(pages/(?P<prefix>([^/]+/)|))|(news/(?P<tags>[^/]+)/(?P<date>\d{4}-\d{2}-\d{2})_)(?P<slug>.*)\.md"
74+
# Pages we use prefix in order to split the menu between projects and general links.
75+
# News we set the default tag to the subdirectory. This can be overriden by Tags: header if multiple tags are wanted.
76+
PATH_METADATA = r"((pages/(?P<prefix>([^/]+/)|))|(news/(?P<tags>[^/]+)/(?P<date>\d{4}-\d{2}-\d{2})_))(?P<slug>.*)\.md"
7477
PAGE_URL = "{prefix}{slug}/"
7578
PAGE_SAVE_AS = "{prefix}{slug}/index.html"
79+
# We use tags as categories, so we can occasionally put something under multiple categories.
7680
TAG_URL = "category/{slug}/"
7781
TAG_SAVE_AS = "category/{slug}/index.html"
7882
TAGS_SAVE_AS = "category/index.html"
@@ -104,17 +108,13 @@ def sponsors(preprocessor: Preprocessor, tag: str, markup: str) -> str:
104108
# Theme
105109
THEME = "theme/"
106110
LINKS = (
107-
("Pelican", "https://getpelican.com/"),
108-
("Python.org", "https://www.python.org/"),
109-
("Jinja2", "https://palletsprojects.com/p/jinja/")
111+
# ("Pelican", "https://getpelican.com/"),
110112
)
111113
SOCIAL = (
112-
("You can add links in your config file", "#"),
113-
("Another social link", "#"),
114+
# ("Another social link", "#"),
114115
)
115116

116117
DEFAULT_PAGINATION = 10
117-
PAGINATED_TEMPLATES = {"index": None, "tag": None, "category": None, "author": 5}
118118
PAGINATION_PATTERNS = (
119119
(1, "{url}", "{save_as}"),
120120
(2, "{base_name}/{number}/", "{base_name}/{number}/index.html"),

0 commit comments

Comments
 (0)