Difference between revisions of "Template:News item header"

From DoomWiki.org

(Rollback, not sure about idea.)
m (Try adding class updated on the same timestamp to shush webmaster tools' incorrect hentry implementation)
Line 3: Line 3:
 
|
 
|
 
{| style="width: 100%; color: inherit; background-color: #cedff2" class="plainlinks"
 
{| style="width: 100%; color: inherit; background-color: #cedff2" class="plainlinks"
| style="text-align: left; font-size:11pt; font-weight:bold; padding:5px; margin-left:0px; width:100%;"| <span class="entry-title">{{{title}}}</span>{{#if:{{{timestamp|}}}|&nbsp;- <time class="published" datetime="{{#iferror:{{#time:Y-m-d|{{{timestamp}}}}}}}">{{#time:d F Y|{{{timestamp}}}}}</time>}}
+
| style="text-align: left; font-size:11pt; font-weight:bold; padding:5px; margin-left:0px; width:100%;"| <span class="entry-title">{{{title}}}</span>{{#if:{{{timestamp|}}}|&nbsp;- <time class="published updated" datetime="{{#iferror:{{#time:Y-m-d|{{{timestamp}}}}}}}">{{#time:d F Y|{{{timestamp}}}}}</time>}}
 
|}
 
|}
 
|-
 
|-

Revision as of 14:05, 2 September 2015

By {{{author}}} for DoomWiki.org

Usage

Create a news item container. This container acts as an hAtom microformat feed entry, and is understood by search engines as a news item when properly filled out.

Parameters:

  • title: Title of the news article. This should be in newspaper headline format.
  • author: Your DoomWiki.org user account name. If you have created a User page, it will be automatically linked. This is used to create a vcard.
  • timestamp: Date and/or time of the article's authorship, in any acceptable ISO date format. The input timestamp will be normalized to Day Month Year format regardless of the input format. Invalid timestamps will be suppressed from appearing in the hAtom, and an error message may appear on page.

Author your article content inline using regular MediaWiki markup after the {{News item header}} transclusion, and follow it with {{News item end}} to properly close the entry.