Skip to content

Releases: locomotivemtl/charcoal-contrib-sitemap

charcoal-contrib-sitemap 0.4.1

07 Jun 15:13
Compare
Choose a tag to compare

Summary:

  • Fix URLs for alternate locales in builder.

charcoal-contrib-sitemap 0.4.0

01 Nov 21:13
0.4.0
3250b22
Compare
Choose a tag to compare

Complete commits list: 0.3.1...0.4.0

Breaking Changes:

  • Refactor XML generation in SitemapAction.
    • ✨ Add support for children which was documented but only partially implemented.
    • 🛠️ Replace toXml() method with decoupled builder methods that add to a shared XML element.
  • Refactor loading and parsing of objects and children in Builder.
    • ⚡️ The Builder now transforms objects during the iteration of objects in buildObject() instead of transforming in renderData(). This reduces the number of times an object is transformed from 6–8 down to 1.
    • 🐛 Fix a child object's transformer being applied to the parent object when mutating the child's filters and orders.
    • 🛠️ Ensure an empty object collection is excluded from the parent/sitemap collections.
  • Refactor the renderData() in Builder how transformers are resolved in SitemapPresenter.
    • 🏗️ The renderData() method now accepts only two parameters: data and context (pre-transformed object).
    • 🛠️ The renderData() method now accepts Traversable and Stringable objects.
    • 🛠️ The renderData() method now explicitly returns null instead of void.
  • Refactor and fix merging hierarchy/object options in Builder.
    • 🏗️ Replace method defaultOptions() with getDefaultSitemapOptions() and getDefaultObjectOptions().
    • 🐛 Fix inconsistent merging of default hierarchy/object options with a hierarchy, objects and their children.
  • Add view service to Builder instead of using each object's view handler.
    • 🏗️ This grants more control to the Builder and, by extension, developers integrating the Sitemap package.
    • ➕ Require Composer dependency locomotivemtl/charcoal-view.
  • Remove model factory from Builder.
    • ⚰️ The collection loader of the Builder has its own model factory that can instantiate the object from the class string/object type.
  • Replace renderer method render() with renderTemplate() in Builder since most examples of renderable data used template strings.
    • 🏗️ Given the ambiguity of the method names "render" and "renderTemplate" and with Mustache (the default templating engine of Charcoal) using the same method for both file paths and template strings, this led to widespread misuse which causes trouble with other templating engines such as Twig.
    • ℹ️ The render() method is for template file paths (path/to/view.mustache) and the renderTemplate() method is for template strings ({{> path/to/view.mustache }}).

Changes:

  • Rename method isValidUriHost to isExternalHost in SitemapAction to cause less confusion about its purpose.
  • Rename language/locale variables in Builder to improve clarity.
  • Reduce duplicate logic for generating absolute/relative URLs in Builder.
  • Fix issues reported by PHPCS.

charcoal-contrib-sitemap 0.3.1

01 Nov 20:35
Compare
Choose a tag to compare

Complete commits list: 0.3.0...0.3.1

Summary:

  • Add Translator to SitemapPresenter to use current locale on the cache key in order to generate l10n sitemap content.
  • Fix renderData method in Builder class missing transformer parameter.

charcoal-contrib-sitemap 0.3.0

19 Jan 22:51
Compare
Choose a tag to compare

Complete commits list: 0.2.1...0.3.0

Breaking Changes:

  • Added a layer to transform the models into renderable content. Model transformer is required and can be defined for all objects or for specific objects.

     {
         "sitemap": {
             "global_sitemap": {
                 "transformer": "charcoal/sitemap/transformer/routable",
                 "objects": {
                     "app/object/section": {
                         "transformer": "\\App\\Transformer\\Sitemap\\Section",
                         "label": "{{ title }}",
                         "url": "{{ url }}",
                     }
                 }
             }
         }
     }

charcoal-contrib-sitemap 0.2.1

06 Jun 21:12
Compare
Choose a tag to compare

Complete commits list: 0.2.0...0.2.1

Summary:

  • Added testing of PHP 7.3 to PHP 7.4.
  • Added missing Composer dependencies.
  • Updated Composer requirements.
  • Updated README with more details about configuring sitemaps.
  • Cleaned-up codebase with improved block comments, variable names, and syntax.
  • Removed boilerplate unit tests.
  • Fixed xhtml:link namespace.
  • Fixed URI to latest build badge.
  • Fixed URI to builds on Travis website.
  • Fixed links and Markdown in README.

charcoal-contrib-sitemap 0.2.0

15 Mar 14:25
Compare
Choose a tag to compare

Complete commits list: 0.1.5...0.2.0

Summary:

  • Add Charcoal module to import service provider and set sitemap.xml route.
  • Fix builder to have its own withBaseUrl method in case the library is used from the command line.
  • Update README to fit the new installation process.

charcoal-contrib-sitemap 0.1.5

15 Mar 14:23
Compare
Choose a tag to compare

Complete commits list: 0.1.4...0.1.5

Summary:

  • Remove category / hierarchichal object filtering in basic build mode

charcoal-contrib-sitemap 0.1.4

09 Aug 20:17
Compare
Choose a tag to compare

Complete commits list: 0.1.3...0.1.4

Summary:

  • Add relative_urls option (false by default) to control whether URLs are absolute or just the path
  • Updated documentation

charcoal-contrib-sitemap 0.1.3

27 Jun 15:56
Compare
Choose a tag to compare

Complete commits list: 0.1.2...0.1.3

Summary:

  • Add check_active_routes option (true by default) to check isActiveRoute on routable objects
  • Updated documentation

charcoal-contrib-sitemap 0.1.2

22 Jun 18:31
Compare
Choose a tag to compare

Complete commits list: 0.1.1...0.1.2

Summary:

  • Add xlmns:xhtml attribute to sitemap XML
  • Fix coding style