fix(postcard): print the site name literally in the built-in layouts' footer
- the footer partial gains a text argument, printed as a paragraph through html/template and verbatim in the text part; body stays Markdown for callers that pass Markdown on purpose - the default and system layouts pass the copyright line as text, so *Acme*, Acme <Studio> and [x](url) appear as typed, as in the header (WR-01) - README partial table, layouts and Branding paragraphs; docs partials table and built-in layouts paragraph - TestMailSafetySmoke/literal_footer
This commit is contained in:
@@ -53,7 +53,7 @@ A bare name is one of the built-in partials; a plugin's partial is called by its
|
||||
| `table` | `body` | A Markdown table. |
|
||||
| `subcopy` | `body` | Small print under a rule; the body is Markdown. |
|
||||
| `header` | `logo` (an image URL), `body` (a name), `url` (optional link) | A table row for a layout's header: the logo, with the name as its alternative text, or the name when there is no logo. |
|
||||
| `footer` | `body` | A table row for a layout's footer; the body is Markdown. |
|
||||
| `footer` | `text` or `body` | A table row for a layout's footer; `text` is printed as it is (escaped), `body` is Markdown. |
|
||||
|
||||
In a body, write the call on a line of its own with blank lines around it. Bodies are Markdown and raw HTML in them is still dropped; postcard inserts a partial's HTML after the Markdown conversion, through a random token that a variable's value cannot contain. Inside a partial's HTML section, `{{ markdown .body }}` renders a value as Markdown.
|
||||
|
||||
@@ -69,7 +69,7 @@ Three layouts are available to every plugin's templates without declaring an ali
|
||||
|
||||
A plugin's own alias wins over `system` and `minimal`; `default` cannot be redefined.
|
||||
|
||||
Every layout gets these values besides `{{ .Content }}`: `{{ .Subject }}`, the CSS slots `{{ .brandCss }}` and `{{ .css }}`, `{{ .logoUrl }}` (see [Branding](#branding)), `{{ .siteName }}`, the site name, and `{{ .year }}`, the current year. The default and system layouts use the `header` and `footer` partials with them; the footer reads `© <year> <site name>`, or `© <year>` when there is no name, and the header row is left out when there is neither a logo nor a name.
|
||||
Every layout gets these values besides `{{ .Content }}`: `{{ .Subject }}`, the CSS slots `{{ .brandCss }}` and `{{ .css }}`, `{{ .logoUrl }}` (see [Branding](#branding)), `{{ .siteName }}`, the site name, and `{{ .year }}`, the current year. The default and system layouts use the `header` and `footer` partials with them; the footer reads `© <year> <site name>`, or `© <year>` when there is no name, passed as the footer's `text`, so the site name is printed as typed, never as Markdown, and the header row is left out when there is neither a logo nor a name.
|
||||
|
||||
## Branding
|
||||
|
||||
|
||||
Reference in New Issue
Block a user