From 270296ef4b4f386258078b100b8a0889daf39a32 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Thu, 18 Apr 2024 15:15:21 -0700 Subject: [PATCH] removed old templates --- .pre-commit-config.yaml | 3 + docs/release/ablog-v0.12-released.rst | 22 +++++- src/ablog/templates/archives.html | 15 ---- src/ablog/templates/authors.html | 15 ---- src/ablog/templates/catalog.html | 26 ------- src/ablog/templates/categories.html | 15 ---- src/ablog/templates/collection.html | 57 -------------- src/ablog/templates/languages.html | 15 ---- src/ablog/templates/locations.html | 15 ---- src/ablog/templates/page.html | 56 -------------- src/ablog/templates/postcard.html | 19 ----- src/ablog/templates/postcard2.html | 105 -------------------------- src/ablog/templates/postnavy.html | 30 -------- src/ablog/templates/recentposts.html | 18 ----- src/ablog/templates/redirect.html | 10 --- src/ablog/templates/tagcloud.html | 20 ----- 16 files changed, 21 insertions(+), 420 deletions(-) delete mode 100644 src/ablog/templates/archives.html delete mode 100644 src/ablog/templates/authors.html delete mode 100644 src/ablog/templates/catalog.html delete mode 100644 src/ablog/templates/categories.html delete mode 100644 src/ablog/templates/collection.html delete mode 100644 src/ablog/templates/languages.html delete mode 100644 src/ablog/templates/locations.html delete mode 100644 src/ablog/templates/page.html delete mode 100644 src/ablog/templates/postcard.html delete mode 100644 src/ablog/templates/postcard2.html delete mode 100644 src/ablog/templates/postnavy.html delete mode 100644 src/ablog/templates/recentposts.html delete mode 100644 src/ablog/templates/redirect.html delete mode 100644 src/ablog/templates/tagcloud.html diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f5a0c1d2..77d06420 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,6 @@ +ci: + autofix_prs: false + autoupdate_schedule: "quarterly" repos: - repo: https://github.com/myint/docformatter rev: v1.7.5 diff --git a/docs/release/ablog-v0.12-released.rst b/docs/release/ablog-v0.12-released.rst index f828f99d..100ea5f2 100644 --- a/docs/release/ablog-v0.12-released.rst +++ b/docs/release/ablog-v0.12-released.rst @@ -8,9 +8,23 @@ ABlog v0.12 released ABlog v0.12 is released with the main focus being retemplating the library. -``pyproject.toml`` is now the source of package infomation. -``ruff`` has been widely deployed to fix any underlying issues found. +Features +-------- -Ablog also got parts of its internal process rewritten to follow modern sphinx. +- None -We dropped support for Python 3.9 and Sphinx 5.X.Y. \ No newline at end of file +Internal Fixes +-------------- + +- ``pyproject.toml`` is now the source of package information. +- ``ruff`` has been widely deployed to fix any underlying issues found. +- Internal process rewritten to follow modern sphinx. +- Increaseed pytest coverage + +Breaking Changes +---------------- + +- Dropped support for Python 3.9 +- Dropped support for Sphinx 5 +- Removed non-ablog scoped templates +- Removed the myriad of language config options diff --git a/src/ablog/templates/archives.html b/src/ablog/templates/archives.html deleted file mode 100644 index d3dedeaa..00000000 --- a/src/ablog/templates/archives.html +++ /dev/null @@ -1,15 +0,0 @@ -{{ warning("archives.html is an old template path, that is no longer used by -ablog. Please use ablog/archives.html instead.") }} {% if ablog.archive %} -
-

- {{ gettext("Archives") }} -

- -
-{% endif %} diff --git a/src/ablog/templates/authors.html b/src/ablog/templates/authors.html deleted file mode 100644 index db7340b3..00000000 --- a/src/ablog/templates/authors.html +++ /dev/null @@ -1,15 +0,0 @@ -{{ warning("authors.html is an old template path, that is no longer used by -ablog. Please use ablog/authors.html instead.") }} {% if ablog.author %} -
-

- {{ gettext("Authors") }} -

- -
-{% endif %} diff --git a/src/ablog/templates/catalog.html b/src/ablog/templates/catalog.html deleted file mode 100644 index 196a8510..00000000 --- a/src/ablog/templates/catalog.html +++ /dev/null @@ -1,26 +0,0 @@ -{{ warning("catalog.html is an old template path, that is no longer used by -ablog. Please use ablog/catalog.html instead.") }} {%- extends "page.html" %} {% -macro postlink(post) -%} {% if post.external_link -%} {{- post.external_link -}} -{% else %} {{- pathto(post.docname) }}{{ anchor(post) -}} {%- endif %} {%- -endmacro %} {% block body %} {% for collection in catalog %} {% if collection %} -
-

- {{ header }} - {{ collection }} -

- {% for post in collection %} -
-

- {% if post.published %} - {{ post.date.strftime(ablog.post_date_format) }} - {% else %} - Draft - {% endif %} - - {{ post.title }} -

-
- {% endfor %} -
-{% endif %} {% endfor %} {% endblock body %} diff --git a/src/ablog/templates/categories.html b/src/ablog/templates/categories.html deleted file mode 100644 index 3ac38891..00000000 --- a/src/ablog/templates/categories.html +++ /dev/null @@ -1,15 +0,0 @@ -{{ warning("category.html is an old template path, that is no longer used by -ablog. Please use ablog/category.html instead.") }} {% if ablog.category %} -
-

- {{ gettext("Categories") }} -

- -
-{% endif %} diff --git a/src/ablog/templates/collection.html b/src/ablog/templates/collection.html deleted file mode 100644 index fbefeddb..00000000 --- a/src/ablog/templates/collection.html +++ /dev/null @@ -1,57 +0,0 @@ -{{ warning("collection.html is an old template path, that is no longer used by -ablog. Please use ablog/collection.html instead.") }} {%- extends "page.html" %} -{% block body %} {% macro postlink(post) -%} {% if post.external_link -%} {{- -post.external_link -}} {% else %} {{- pathto(post.docname) }}{{ anchor(post) -}} -{%- endif %} {%- endmacro %} {% endmacro %} -
-

- {% if archive_feed and fa %} - - - {% endif %} - {{ header }} {% if collection.href %} - {{ collection }} - {% else %} {{ collection }} {% endif %} - -

- {% if ablog.blog_archive_titles %} {% for post in collection %} -
-

- {% if post.published %} - {{ post.date.strftime(ablog.post_date_format) }} - {% else %} - Draft - {% endif %} - - {{ post.title }} -

-
- {% endfor %} {% else %} {% for post in collection %} -
-

- {{ post.title }} -

-
    -
  • - {% if post.published %} {% if fa %} - {% endif %} - {{ post.date.strftime(ablog.post_date_format) }} - {% else %} {% if fa %}{% endif %} {% if - post.date %} - {{ post.date.strftime(ablog.post_date_format) }} - {% else %} - Draft - {% endif %} {% endif %} -
  • - {% include "ablog/postcard2.html" %} -
- {{ post.to_html(collection.docname) }} -

- {{ _("Read more ...") }} -

-
-
- {% endfor %} {% endif %} -
-{% endblock body %} diff --git a/src/ablog/templates/languages.html b/src/ablog/templates/languages.html deleted file mode 100644 index 68a32286..00000000 --- a/src/ablog/templates/languages.html +++ /dev/null @@ -1,15 +0,0 @@ -{{ warning("languages.html is an old template path, that is no longer used by -ablog. Please use ablog/languages.html instead.") }} {% if ablog.language %} -
-

- {{ gettext("Languages") }} -

- -
-{% endif %} diff --git a/src/ablog/templates/locations.html b/src/ablog/templates/locations.html deleted file mode 100644 index e2ecd60d..00000000 --- a/src/ablog/templates/locations.html +++ /dev/null @@ -1,15 +0,0 @@ -{{ warning("locations.html is an old template path, that is no longer used by -ablog. Please use ablog/locations.html instead.") }} {% if ablog.location %} -
-

- {{ gettext("Locations") }} -

- -
-{% endif %} diff --git a/src/ablog/templates/page.html b/src/ablog/templates/page.html deleted file mode 100644 index 527b0f00..00000000 --- a/src/ablog/templates/page.html +++ /dev/null @@ -1,56 +0,0 @@ -{%- extends "layout.html" %} {% set fa = ablog.fontawesome %} {%- block -extrahead %} {{ super() }} {% if feed_path %} - -{% endif %} {% if ablog.fontawesome_link_cdn %} - -{% elif ablog.fontawesome_css_file %} - -{% endif %} {% endblock extrahead %} {% block body %} {{ body }} -
- {% if pagename in ablog %} {% include "ablog/postnavy.html" %} {% endif %} {% - if ablog.disqus_shortname and ablog.blog_baseurl and (not - ablog[pagename].nocomments) and ((pagename in ablog and - (ablog[pagename].published or ablog.disqus_drafts)) or (not pagename in ablog - and ablog.disqus_pages)) %} -
-

Comments

-
- - - - comments powered by Disqus - -
- {% endif %} -
-{% endblock body %} diff --git a/src/ablog/templates/postcard.html b/src/ablog/templates/postcard.html deleted file mode 100644 index 00839980..00000000 --- a/src/ablog/templates/postcard.html +++ /dev/null @@ -1,19 +0,0 @@ -{{ warning("postcard.html is an old template path, that is no longer used by -ablog. Please use ablog/postcard.html instead.") }} {% if pagename in ablog %} -
- {% set fa = ablog.fontawesome %} {% set post = ablog[pagename] %} -

- {% if post.published %} {% if fa %}{% endif %} - {{ post.date.strftime(ablog.post_date_format) }} - {% else %} {% if fa %}{% endif %} {% if - post.date %} - {{ post.date.strftime(ablog.post_date_format) }} - {% else %} - Draft - {% endif %} {% endif %} -

- -
-{% endif %} diff --git a/src/ablog/templates/postcard2.html b/src/ablog/templates/postcard2.html deleted file mode 100644 index bbb16139..00000000 --- a/src/ablog/templates/postcard2.html +++ /dev/null @@ -1,105 +0,0 @@ -{{ warning("postcard2.html is an old template path, that is no longer used by -ablog. Please use ablog/postcard2.html instead.") }} -
- {% if post.published and post.date != post.update %} -
  • - - {% if fa %} - - {% else %} {{ gettext("Update") }}: {% endif %} - - {{ post.update.strftime(ablog.post_date_format) }} -
  • - {% endif %} {% if post.author %} -
  • - - {% if fa %} - - {% else %} {{ gettext("Author") }}: {% endif %} - - {% for coll in post.author %} {% if coll|length %} - {{ coll }} - {% if loop.index < post.author|length %},{% endif %} {% else %} {{ coll }} - {% if loop.index < post.author|length %},{% endif %} {% endif %} {% endfor - %} -
  • - {% endif %} {% if post.location %} -
  • - - {% if fa %} - - {% else %} {{ gettext("Location") }}: {% endif %} - - {% for coll in post.location %} {% if coll|length %} - {{ coll }} - {% if loop.index < post.location|length %},{% endif %} {% else %} {{ coll }} - {% if loop.index < post.location|length %},{% endif %} {% endif %} {% endfor - %} -
  • - {% endif %} {% if post.language %} -
  • - - {% if fa %} - - {% else %} {{ gettext("Language") }}: {% endif %} - - {% for coll in post.language %} {% if coll|length %} - {{ coll }} - {% if loop.index < post.language|length %},{% endif %} {% else %} {{ coll }} - {% if loop.index < post.language|length %},{% endif %} {% endif %} {% endfor - %} -
  • - {% endif %} {% if post.category %} -
  • - - {% if fa %} - - {% else %} {{ gettext("Category") }}: {% endif %} - - {% for coll in post.category %} {% if coll|length %} - {{ coll }} - {% if loop.index < post.category|length %},{% endif %} {% else %} {{ coll }} - {% if loop.index < post.category|length %},{% endif %} {% endif %} {% endfor - %} -
  • - {% endif %} {% if post.tags %} -
  • - - {% if post.tags|length > 1 %} {% if fa %} - - {% else %} {{ gettext("Tags") }}: {% endif %} {% else %} {% if fa %} - - {% else %} {{ gettext("Tag") }}: {% endif %} {% endif %} - - {% for coll in post.tags %} {% if coll|length %} - {{ coll }} - {% if loop.index < post.tags|length %}{% endif %} {% else %} {{ coll }} {% - if loop.index < post.tags|length %} {% endif %} {% endif %} {% endfor %} -
  • - {% endif %} {% if ablog.disqus_shortname and (ablog[pagename].published or - ablog.disqus_drafts) %} -
  • - - {% if fa %}{% endif %} - - {% if not fa %}Comments{% endif %} - -
  • - {% endif %} -
    diff --git a/src/ablog/templates/postnavy.html b/src/ablog/templates/postnavy.html deleted file mode 100644 index 09ccba87..00000000 --- a/src/ablog/templates/postnavy.html +++ /dev/null @@ -1,30 +0,0 @@ -{{ warning("postnavy.html is an old template path, that is no longer used by -ablog. Please use ablog/postnavy.html instead.") }} {# prev/next are not set for -drafts #} {% set post = ablog[pagename] %} {% if post.published and -ablog.post_show_prev_next %} -
    - - {% if post.prev %} {% if not ablog.fontawesome %} {{ gettext("Previous") }}: - {% endif %} - - {% if ablog.fontawesome %} - - {% endif %} - {{ post.prev.title }} - - {% endif %} - -   - - {% if post.next %} {% if not ablog.fontawesome %} {{ gettext("Next") }}: {% - endif %} - - {{ post.next.title }} - {% if ablog.fontawesome %} - - {% endif %} - - {% endif %} - -
    -{% endif %} diff --git a/src/ablog/templates/recentposts.html b/src/ablog/templates/recentposts.html deleted file mode 100644 index fc8c8287..00000000 --- a/src/ablog/templates/recentposts.html +++ /dev/null @@ -1,18 +0,0 @@ -{{ warning("recentposts.html is an old template path, that is no longer used by -ablog. Please use ablog/recentposts.html instead.") }} {% if ablog %} -
    -

    - {{ gettext("Recent Posts") }} -

    - -
    -{% endif %} diff --git a/src/ablog/templates/redirect.html b/src/ablog/templates/redirect.html deleted file mode 100644 index 12304946..00000000 --- a/src/ablog/templates/redirect.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ warning("redirect.html is an old template path, that is no longer used by -ablog. Please use ablog/redirect.html instead.") }} {%- extends "!layout.html" -%} {%- block extrahead %} {{ super() }} - -{% endblock extrahead %} {% block body %} You are being redirected to -{{ post.title }} in {{ -ablog.post_redirect_refresh }} seconds; {% endblock body %} diff --git a/src/ablog/templates/tagcloud.html b/src/ablog/templates/tagcloud.html deleted file mode 100644 index e27ac507..00000000 --- a/src/ablog/templates/tagcloud.html +++ /dev/null @@ -1,20 +0,0 @@ -{{ warning("tagcloud.html is an old template path, that is no longer used by -ablog. Please use ablog/tagcloud.html instead.") }} {% if ablog.tags %} -
    - -

    - {{ gettext("Tags") }} -

    - -
    -{% endif %}