Skip to content

v0.23.0

Choose a tag to compare

@stuartmaxwell stuartmaxwell released this 29 Mar 03:05
· 205 commits to main since this release
4062aa1

Release Notes - DJ Press 0.23.0

⚠️ Breaking Changes ⚠️

This release introduces many improvements and breaking changes to the template tag system, providing better consistency across the tags, and including more flexible styling options.

Template Tag Changes

Several tags have been renamed or had their parameters modified to improve consistency across the library.

Renamed Tags

  • blog_categories → site_categories
  • blog_tags → site_tags
  • dj_header → djpress_header
  • dj_footer → djpress_footer

Parameter Changes

  • post_title: Now supports an outer_class parameter. The outer_tag parameter is now a positional-or-keyword argument, while others remain keyword-only.
  • site_pages: The outer parameter has been renamed to outer_tag. The default value has changed from ul to div.
  • page_link: The outer parameter has been renamed to outer_tag. The default value has changed from div to "" (no wrapping tag).
  • Keyword-Only Arguments: Most optional parameters in tags like site_categories, site_tags, and site_pages_list are now enforced as keyword-only to prevent accidental parameter mismatch.

New Tags ✨

  • site_description: Returns the site description as safely marked HTML, with support for outer_tag and outer_class.
  • site_pages: Completely redesigned. It now generates a comma-separated list of linked pages (default) or a custom-wrapped list, ideal for simple navigation bars.
  • search_url: Returns the URL of the search page (useful for custom search forms).

Tag Enhancements 🚀

site_pages_list

  • Added include_home parameter (bool) to automatically include a link to the site root.
  • Added levels parameter (int) to control the depth of nested child pages (use 0 for unlimited).

site_categories & site_tags

  • Added separator, pre_text, and post_text parameters. These allow you to create inline, comma-separated lists with custom prefixes/suffixes when not using the default ul structure.

post_author

  • Now supports outer_tag, outer_class, pre_text, and post_text for much greater control over how author attribution is rendered.

post_content

  • Improved logic for "Read More" links. The tag now handles truncation more reliably and supports custom outer_class and read_more_text directly.

tag_title

  • Now supports a separator parameter for views displaying multiple concatenated tags.

Internal Improvements

  • Plugin Hook Chaining: Hooks like djpress_header and djpress_footer now correctly concatenate output from multiple plugins rather than overwriting.
  • URL Dispatching: Fixed an issue where the dispatcher would prematurely 404 on URLs matching the post prefix, allowing proper fall-through to pages and categories.
  • Search Provider Robustness: Improved error handling in the search plugin handler to prevent site-wide crashes if a search plugin returns invalid data.

Full Changelog: v0.22.3...v0.23.0