2.2 KiB
2.2 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
Added
-
Parts have access to all other parts now via
parts
, an object of typeEmbeddablePartsMap
. For example:// myPart.gsp <% out << parts['otherPart.gsp'].render() %>
-
A
tagBuilder
object of typeDynamicTagBuilder
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.
-
Parts have a
text
object of typeEmbeddableText
. If one is rendering a Part called from anything other than a Template (which has an associated text), this will benull
. 34d9cd5.
Changed
- Breaking: the
text
object in Templates is now an instance ofEmbeddableText
instead ofString
. Thus, one must usetext.render()
to obtain the rendered text. 34d9cd5.
Deprecated
- The
frontMatter
object in Templates is now deprecated. Usetext.frontMatter
instead. eafc8cd.