inlaycms 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -272,6 +272,10 @@ The JSON-LD check applies to sites that add JSON-LD through `ctx.head`; Inlay do
272
272
 
273
273
  What a site's fields can hold, beyond plain text and the basics of `f.richText`.
274
274
 
275
+ ### Inline code
276
+
277
+ Rich text and inline text hold inline code, on by default: a command, a file name or a placeholder, shown in a monospace font. In Markdown it is text between backticks (`` Run `npm test` first ``); a span holding a backtick is fenced with more of them (``` ``a`b`` ```). It renders as `<code>`. Code can go inside a link (``[`npm test`](/docs/testing)``) and in table cells, but it can't be bold or italic: Markdown that puts code inside bold or italic text is refused with the line it is on. Code blocks aren't supported. To leave code out of a field, list its `features` without `'code'`.
278
+
275
279
  ### Tables
276
280
 
277
281
  Rich text holds tables, on by default. In Markdown (what assistants send and get back, and what shipped content is written in) a table is a GitHub-style table:
@@ -283,13 +287,13 @@ Rich text holds tables, on by default. In Markdown (what assistants send and get
283
287
  | *Lite* | free |
284
288
  ```
285
289
 
286
- The first row is always the header row. A cell holds one line of text with bold, italic and links; images and line breaks can't go in a cell, and a table can't go inside a list or a quote. Write a `|` inside a cell as `\|`. Alignment markers (`:---:`) are accepted and dropped, short rows are padded with empty cells, and cells past the header's width are dropped. To leave tables out of a field, list its `features` without `'table'`: `f.richText({ label: 'Body', features: ['bold', 'italic', 'link'] })`.
290
+ The first row is always the header row. A cell holds one line of text with bold, italic, code and links; images and line breaks can't go in a cell, and a table can't go inside a list or a quote. Write a `|` inside a cell as `\|`. Alignment markers (`:---:`) are accepted and dropped, short rows are padded with empty cells, and cells past the header's width are dropped. To leave tables out of a field, list its `features` without `'table'`: `f.richText({ label: 'Body', features: ['bold', 'italic', 'link'] })`.
287
291
 
288
292
  A table renders as plain HTML with no attributes, for your site's CSS to style: `<table>`, a `<thead>` holding the header row's `<th>` cells, and a `<tbody>` of `<td>` cells when there are rows below the header.
289
293
 
290
294
  ### Inline text
291
295
 
292
- `f.inlineText({ label, maxLength })` is one line of formatted text, for a headline or a tagline that may need a word in bold or a link: bold, italic and links, and nothing else. It is stored as rich text holding a single paragraph, and the admin edits it on one line. `maxLength` counts the characters of the text, not of its formatting.
296
+ `f.inlineText({ label, maxLength })` is one line of formatted text, for a headline or a tagline that may need a word in bold or a link: bold, italic, code and links, and nothing else. It is stored as rich text holding a single paragraph, and the admin edits it on one line. `maxLength` counts the characters of the text, not of its formatting.
293
297
 
294
298
  Assistants and shipped content write it as one line of Markdown, such as `'**Big** news, see [the plans](inlay:key/pages/pricing)'`. A blank line (a second paragraph), a heading, a list, a line break or an image is refused.
295
299
 
@@ -600,7 +604,7 @@ Each default comes from the global when it's filled in, then from the code, then
600
604
  - **Title.** A page's `f.seo()` title is used exactly as written. Otherwise the page's title goes through the title template, except on the home page (`/`, or a language's root such as `/es`), which keeps its plain title. The 404 page and pages from code routes get the template too. `og:title` and `twitter:title` are the final title.
601
605
  - **Description.** The page's `f.seo()` description, then the default.
602
606
  - **Share image.** The page's `f.seo()` image, then the global's default image, then the code's `/public` image. Images from the media library are shared as their 1280px JPEG. A `/public` image is an absolute URL versioned like `ctx.asset`'s; if the file isn't there the URL has no version, and the page still renders.
603
- - **`ogType`.** `defineTemplate({ ogType: 'article' })` makes the template's pages `og:type` `article`, with `article:modified_time` (the last change). `article:published_time` comes in a later release. The default is `website`.
607
+ - **`ogType`.** `defineTemplate({ ogType: 'article' })` makes the template's pages `og:type` `article`, with `article:published_time` (`publishedAt`, left out while it is `null`) and `article:modified_time` (the last change). The default is `website`.
604
608
  - **Twitter cards.** `twitter:card` is `summary_large_image` when the page has a share image and `summary` when it doesn't. `twitter:title`, `twitter:description` and `twitter:image` repeat the Open Graph values.
605
609
 
606
610
  ### Tags from templates