ssg/CHANGELOG.md
2023-02-13 13:45:27 +01:00

1.5 KiB

Changelog

All notable changes to SSG will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Next/Unreleased

Added

  • A tagBuilder of type DynamicTagBuilder is available in Templates, SpecialPages, and Parts.
    def simpleTag = tagBuilder.test()
    assert simpleTag == '<test />'
    
    def tagWithBody = tagBuilder.title 'Hello, World!'
    assert tagWithBody == '<title>Hello, World!</title>'
    
    def tagWithAttributes = tagBuilder.meta name: 'og:title', content: 'Hello, World!'
    assert tagWithAttributes == '<meta name="og:title" content="Hello, World!" />'
    
    def tagWithAttributesAndBody = tagBuilder.p([id: 'my-paragraph'], 'Hello, World!')
    assert tagWithAttributesAndBody == '<p id="my-paragraph">Hello, World!</p>'
    
    This is likely most useful for building simple, one-line html/xml tags. 93687d.
  • Breaking: the text object in Templates is now an instance of EmbeddableText instead of String. Thus, one must use text.render() to obtain the rendered text. 34d9cd5.
  • Parts have a text object of type EmbeddableText. If we are rendering a part called from anything other than a Template (which has an associated text), this will be null. 34d9cd5.

Fixed