Objetos /
article
Un artículo de un blog.
Dónde está
Global en templates/article.json; también blog.articles y settings de tipo article.
Propiedades
| Propiedad | Tipo | Qué es |
|---|---|---|
article.id | texto | Identificador. |
article.title | texto | Título. |
article.handle | texto | Handle. |
article.url | texto | /blogs/<blog>/<handle>. |
article.author | texto | Autor. |
article.content | HTML | Contenido. |
article.excerpt | HTML | Resumen. |
article.excerpt_or_content | HTML | El resumen o, si no hay, el contenido. |
article.image | image o nil | Imagen destacada. |
article.tags | array de textos | Etiquetas. |
article.published_at | fecha ISO 8601 | Publicación. |
article.updated_at | fecha ISO 8601 | Última edición. |
article.comments_enabled? | booleano | Siempre false: no hay comentarios. |
Ejemplo
<article>
<h1>{{ article.title }}</h1>
<p>{{ article.author }} · {{ article.published_at | date: '%d/%m/%Y' }}</p>
{{ article.content }}
</article>