Jump to content

Template:Blog post/doc

From Wikiversity

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.

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

Parmaters:

date
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: 2024-11-02T14:18+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 "2:18 pm Saturday, 2 November 2024"; use this parameter to change this to anything to want.
p
Set the punctuation to be used at the end of the displayed date. Defaults to a full stop (period).
draft
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.

<inputbox>
type=create
width=80
preload=Template:Blog post/preload
editintro=
buttonlabel=Add blog post
searchbuttonlabel=
break=no
prefix=Special:Mypage/Blog/
placeholder=Enter title here
</inputbox>

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="2024-11-02T14:18:59+00:00">14:18 2 November 2024</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