Template: Blog post/doc

(Add RSS feed link.)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
This template is used on blog posts that are shown on the [[news]] page and elsewhere.
To create a new post, enter its title in the box below:
<inputbox>
type=create
page=
default=
preload=Template:Blog post/preload
editintro=
buttonlabel=Create a new post
hidden=
labeltext=
break=no
namespaces=
prefix=
placeholder=
</inputbox>
A news feed is available for the most recent blog posts: https://wikimedia.org.au/news.rss
<!--
The above shortcut uses the following query structure:
{{#cargo_query: tables=blog_posts
| fields = _pageName, CONCAT(date,' 12:00:00')=start, authors=author
| format = feed
| limit = 10
| order by = date desc
}}
-->
== TemplateData ==
== TemplateData ==
<templatedata>
<templatedata>
Line 7: Line 37:
"required": true,
"required": true,
"label": "Date",
"label": "Date",
"description": "The publication date of this post."
"description": "The publication date of this post in YYYY-MM-DD format."
},
"date displayed": {},
"author": {
"label": "Author",
"description": "Author's name.",
"type": "string"
},
"p": {},
"draft": {
"type": "boolean"
},
},
"keywords": {
"keywords": {
"label": "Keywords",
"label": "Keywords",
"description": "Comma-separated list of keywords.",
"description": "Comma-separated list of keywords (each keyword should be a wiki page).",
"type": "string",
"type": "string",
"suggested": true
"suggested": true
Line 33: Line 53:
"label": "Description",
"label": "Description",
"type": "content",
"type": "content",
"suggested": true
"suggested": true,
"description": "Short sentence describing the post, shown on the news page and in social media previews etc."
},
"mode": {
"label": "Mode",
"description": "Either 'draft', 'featured', or 'hidden'.",
"type": "string"
},
"hide_banner": {
"label": "Hide banner?",
"description": "Do not show the image as a banner. Can be useful for portrait-orientation images that should be shown on the news list page but not on the article itself.",
"type": "boolean"
},
"image_origin": {
"label": "Banner image origin",
"description": "Focal point for the banner image, used to move the image up or down as required. See https://www.mediawiki.org/wiki/Extension:WikidataPageBanner#'origin'_parameter for more details.",
"example": "\"0,1\" for the top centre.",
"type": "string"
},
"authors": {
"label": "Authors",
"description": "Semicolon-separated list of author names. Each will be linked to their page on this wiki.",
"type": "string"
}
}
},
},
"description": "Main metadata template for blog posts.",
"description": "Template used to create the header on news posts.",
"format": "block",
"format": "block",
"paramOrder": [
"paramOrder": [
"date",
"date",
"author",
"description",
"description",
"authors",
"keywords",
"keywords",
"mode",
"image",
"image",
"date displayed",
"hide_banner",
"p",
"image_origin"
"draft"
]
]
}
}
Line 53: Line 95:
== See also ==
== See also ==
* {{tl|blog post/preload}}
* {{tl|blog post/preload}}
* {{tl|blog posts by author}}
* [[Module:Blog post]]

Latest revision as of 07:11, 30 September 2023

This template is used on blog posts that are shown on the news page and elsewhere.

To create a new post, enter its title in the box below:

A news feed is available for the most recent blog posts: https://wikimedia.org.au/news.rss

TemplateData

Template used to create the header on news posts.

[Edit template data]

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Datedate

The publication date of this post in YYYY-MM-DD format.

Daterequired
Descriptiondescription

Short sentence describing the post, shown on the news page and in social media previews etc.

Contentsuggested
Authorsauthors

Semicolon-separated list of author names. Each will be linked to their page on this wiki.

Stringoptional
Keywordskeywords

Comma-separated list of keywords (each keyword should be a wiki page).

Stringsuggested
Modemode

Either 'draft', 'featured', or 'hidden'.

Stringoptional
Image filenameimage

The filename (without 'File:') of an image to use for the page banner and to share on social media.

Fileoptional
Hide banner?hide_banner

Do not show the image as a banner. Can be useful for portrait-orientation images that should be shown on the news list page but not on the article itself.

Booleanoptional
Banner image originimage_origin

Focal point for the banner image, used to move the image up or down as required. See https://www.mediawiki.org/wiki/Extension:WikidataPageBanner#'origin'_parameter for more details.

Example
"0,1" for the top centre.
Stringoptional

See also

Discuss this page