From 8b4d7475ea9ee7f998f482ce6fc1f5267e12a73d Mon Sep 17 00:00:00 2001 From: Chris Rose Date: Wed, 31 Dec 2025 08:45:17 -0800 Subject: [PATCH 01/13] dev: Switch from PDM to standard dev-dependencies PDM supports this specification (per https://pdm-project.org/latest/usage/dependency/#add-development-only-dependencies) and this lets other frontends (uv, baby!) make use of the same dependencies. --- pyproject.toml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 09fcbdb6..f6cb125b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,24 +59,7 @@ pelican-plugins = "pelican.plugins._utils:list_plugins" pelican-quickstart = "pelican.tools.pelican_quickstart:main" pelican-themes = "pelican.tools.pelican_themes:main" -[tool.autopub] -project-name = "Pelican" -git-username = "botpub" -git-email = "52496925+botpub@users.noreply.github.com" -changelog-file = "docs/changelog.rst" -changelog-header = "###############" -version-header = "=" - -[tool.pdm] -ignore_package_warnings = ["sphinx"] - -[tool.pdm.scripts] -docbuild = "invoke docbuild" -docserve = "invoke docserve" -lint = "invoke lint" -test = "invoke tests" - -[tool.pdm.dev-dependencies] +[dependency-groups] dev = [ "BeautifulSoup4>=4.13.3", "jinja2>=3.1.2", @@ -100,6 +83,23 @@ dev = [ "tomli>=2.0.1; python_version < \"3.11\"", ] +[tool.autopub] +project-name = "Pelican" +git-username = "botpub" +git-email = "52496925+botpub@users.noreply.github.com" +changelog-file = "docs/changelog.rst" +changelog-header = "###############" +version-header = "=" + +[tool.pdm] +ignore_package_warnings = ["sphinx"] + +[tool.pdm.scripts] +docbuild = "invoke docbuild" +docserve = "invoke docserve" +lint = "invoke lint" +test = "invoke tests" + [tool.pdm.build] source-includes = [ "CONTRIBUTING.rst", From 4444f99c179e44984eef905617e9cfd34b639df0 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Thu, 19 Feb 2026 22:58:11 +0000 Subject: [PATCH 02/13] Don't render 'By' if no authors --- pelican/themes/simple/templates/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pelican/themes/simple/templates/index.html b/pelican/themes/simple/templates/index.html index 97caac6a..5eabc244 100644 --- a/pelican/themes/simple/templates/index.html +++ b/pelican/themes/simple/templates/index.html @@ -11,11 +11,13 @@
{{ article.summary }}

Published:

+ {%- if article.authors %}
By {% for author in article.authors %} {{ author }} {% endfor %}
+ {%- endif %}
{% endfor %} From d9b76ac0e7c348c198d0a1ff00ab467624f812c0 Mon Sep 17 00:00:00 2001 From: nkr <42086312+nkr0@users.noreply.github.com> Date: Tue, 7 Oct 2025 03:06:13 +0200 Subject: [PATCH 03/13] Use a city closer to the equator and that does not use daylight savings in tests --- pelican/tests/test_utils.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py index 95bf197a..2d370c64 100644 --- a/pelican/tests/test_utils.py +++ b/pelican/tests/test_utils.py @@ -64,8 +64,13 @@ class TestUtils(LoggedTestCase): date_hour_z = utils.SafeDatetime( year=2012, month=11, day=22, hour=22, minute=11, tzinfo=timezone.utc ) - date_hour_est = utils.SafeDatetime( - year=2012, month=11, day=22, hour=22, minute=11, tzinfo=ZoneInfo("EST") + date_hour_wib = utils.SafeDatetime( + year=2012, + month=11, + day=22, + hour=22, + minute=11, + tzinfo=ZoneInfo("Asia/Jakarta"), ) date_hour_sec = utils.SafeDatetime( year=2012, month=11, day=22, hour=22, minute=11, second=10 @@ -79,14 +84,14 @@ class TestUtils(LoggedTestCase): second=10, tzinfo=timezone.utc, ) - date_hour_sec_est = utils.SafeDatetime( + date_hour_sec_wib = utils.SafeDatetime( year=2012, month=11, day=22, hour=22, minute=11, second=10, - tzinfo=ZoneInfo("EST"), + tzinfo=ZoneInfo("Asia/Jakarta"), ) date_hour_sec_frac_z = utils.SafeDatetime( year=2012, @@ -108,10 +113,10 @@ class TestUtils(LoggedTestCase): "22.11.2012": date, "22.11.2012 22:11": date_hour, "2012-11-22T22:11Z": date_hour_z, - "2012-11-22T22:11-0500": date_hour_est, + "2012-11-22T22:11+0700": date_hour_wib, "2012-11-22 22:11:10": date_hour_sec, "2012-11-22T22:11:10Z": date_hour_sec_z, - "2012-11-22T22:11:10-0500": date_hour_sec_est, + "2012-11-22T22:11:10+0700": date_hour_sec_wib, "2012-11-22T22:11:10.123Z": date_hour_sec_frac_z, } From e78a555fff7e3474a759fdcf40df6debc1788f62 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Mon, 30 Mar 2026 10:59:20 +0200 Subject: [PATCH 04/13] fix: Appease linter --- pelican/themes/simple/templates/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pelican/themes/simple/templates/index.html b/pelican/themes/simple/templates/index.html index 5eabc244..100a7200 100644 --- a/pelican/themes/simple/templates/index.html +++ b/pelican/themes/simple/templates/index.html @@ -12,11 +12,11 @@

Published:

{%- if article.authors %} -
By - {% for author in article.authors %} - {{ author }} - {% endfor %} -
+
By + {% for author in article.authors %} + {{ author }} + {% endfor %} +
{%- endif %}
From c495634138bba98d0e64cfcea0ad7b60ec74dbfe Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 30 Mar 2026 11:03:31 +0200 Subject: [PATCH 05/13] Add `SSH_PORT` to `sftp_upload` in Makefile template --- pelican/tools/templates/Makefile.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/templates/Makefile.jinja2 b/pelican/tools/templates/Makefile.jinja2 index 67571b47..467b1976 100644 --- a/pelican/tools/templates/Makefile.jinja2 +++ b/pelican/tools/templates/Makefile.jinja2 @@ -128,7 +128,7 @@ ssh_upload: publish {% set upload = upload + ["sftp_upload"] %} sftp_upload: publish - printf 'put -r $(OUTPUTDIR)/*' | sftp $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) + printf 'put -r $(OUTPUTDIR)/*' | sftp -P $(SSH_PORT) $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) {% set upload = upload + ["rsync_upload"] %} rsync_upload: publish From 862ac78310d45532f582ee76c2210d26e734e194 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Mon, 30 Mar 2026 12:04:55 +0100 Subject: [PATCH 06/13] Add `page_content` block for better template inheritance --- pelican/themes/simple/templates/page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/themes/simple/templates/page.html b/pelican/themes/simple/templates/page.html index 0eefc7e3..4096e7a4 100644 --- a/pelican/themes/simple/templates/page.html +++ b/pelican/themes/simple/templates/page.html @@ -20,7 +20,7 @@ {% import 'translations.html' as translations with context %} {{ translations.translations_for(page) }} - {{ page.content }} + {% block page_content %}{{ page.content }}{% endblock page_content %} {% if page.modified %}