Skip to content

Releases: timnarr/kirby-helpers

v1.3.0

19 Nov 10:50

Choose a tag to compare

Added

  • Added getUsedBlockTypesFromLayouts() function to extract all block types from Layouts objects, iterating through all layouts, columns, and blocks

Full Changelog: v1.2.0...v1.3.0

v1.2.0

05 Nov 12:17

Choose a tag to compare

Added

  • ensureHashed() field method: New field method to ensure a string starts with a hash (#). This complements the existing ensureLeft() and ensureRight() methods for consistent string formatting.
  • getUsedBlockTypes() function: Extract all used block types from a Blocks object or array of blocks. Useful for conditional CSS loading based on which blocks are used on a page. Returns an array of unique block type strings.

Changed

  • Updated README documentation
  • Updated composer.json

Full Changelog: v1.1.0...v1.2.0

v1.1.0

29 Oct 15:11

Choose a tag to compare

Added

Field Methods:

  • autoLinkTitles(): Automatically adds title attributes to links if not already present. The title value is generated from the href attribute.

Helper Functions:

  • autoLinkTitles(): Processes HTML string and automatically adds title attributes to all tags (if not already present)
  • getMissingTranslations(): Returns an array of language codes for which the page translation does not exist

Page Methods:

  • getMissingTranslations(): Get missing translations for a page
  • missingTranslationsBadge(): Generate a Kirby Panel info badge showing translation status (green badge if all translations exist, red badge with missing language codes)

Changed

  • Field methods (ensureLeft(), ensureRight(), autoLinkTitles()) now return a Field object instead of a string, enabling method chaining
  • Updated and expanded documentation in README.md

Full Changelog: v1.0.0...v1.1.0

v1.0.0

24 Oct 14:15

Choose a tag to compare

Added

  • Error handling with try-catch blocks for improved stability
  • SVG sanitization in readAccessible() function for enhanced security
  • Path traversal protection in inlineViteAsset() for security hardening
  • Static caching to isViteDevMode() function for better performance

Fixed

  • Use imported Str class in buildMailtoLink()
  • Rename named argument for consistency
  • Improve type casting in inlineViteAsset()
  • Improve type casting in cssIfTemplate()
  • Check if incrementHeadingLevel() not exists before usage
  • Extract heading level validation into separate function
  • Use named arguments consistently for Html methods
  • Optimize array iteration in shouldIgnorePageFromCache()
  • Add missing echo statements in cssIfBlock() and cssIfTemplate()
  • Improve readability of linkLabel() function
  • Simplify setBlankIfExternal() function

Changed

  • Improve buildMailtoLink() documentation
  • Improve cssLazy() documentation
  • Update README.md documentation

Full Changelog: v0.5.0...v1.0.0

v0.5.0

20 Oct 11:12

Choose a tag to compare

  • Add new incrementHeadingLevel() helper to increment or decrement a heading level by a specified number of steps
  • Add new buildMailtoLink() helper to build a mailto link with optional subject and body parameters

Full Changelog: v0.4.0...v0.5.0

v0.4.0

04 Aug 11:13

Choose a tag to compare

  • Add new readAccessible() file method to reads the SVG content and adds accessibility attributes

Full Changelog: v0.3.5...v0.4.0

v0.3.5

24 Sep 19:39

Choose a tag to compare

Full Changelog: v0.3.4...v0.3.5

v0.3.4

24 Sep 14:53

Choose a tag to compare

Full Changelog: v0.3.3...v0.3.4

v0.3.3

18 Sep 09:10

Choose a tag to compare

Full Changelog: v0.3.2...v0.3.3

v0.3.2

11 Sep 13:54

Choose a tag to compare

Full Changelog: v0.3.0...v0.3.2