Template:Blog post

From Wikiversity
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

To be used at the top of blog posts. These are usually located at User:Username/Blog/Blog post title. For more information, see Help:Blog.

Usage[edit source]

{{blog post|date= |date displayed= |p=. |draft=yes }}


The date and time of the post. Defaults to the time of the most recent revision to the page. If a time is specified it will be assumed to be in UTC; the timezone can be set specifically (e.g. in ISO8601 format: 2021-10-22T13:47+12:00 where the +12:00 at the end is your current time offset from UTC).
date displayed
By default, the date that is displayed is of the form "1:47 pm Friday, 22 October 2021"; use this parameter to change this to anything to want.
Set the punctuation to be used at the end of the displayed date. Defaults to a full stop (period).
Any value will prevent the post from being categorised, and will display a message box alerting readers to the fact that the post is a draft.

InputBox[edit source]

To display a page-creation form, use the following InputBox code. It uses the preload text that's stored in Template:Blog post/preload.

preload=Template:Blog post/preload
buttonlabel=Add blog post
placeholder=Enter title here

This results in the following:

Blog home page[edit source]

A blog home page can be created to list all blog posts. For more information, see the {{blog}} template.

Microformat[edit source]

This template also adds a Microformat following the Datetime Design Pattern, by wrapping the displayed date in a <time /> element. For example:

<time datetime="2021-10-22T13:47:26+00:00">13:47 22 October 2021</time>

See also[edit source]

  • {{blog post comments}} for adding a comments section at the end of a blog post
  • {{blog}} for placing on your blog's homepage
  • Help:Blog for all information about how to have a blog in Wikiversity