Tutorial-set-up-your-personal-wiki-template

From IndieWeb

This tutorial will help you set up a small template that you can use when updating the IndieWeb wiki to easily add your name, photo, and a link to your user page. These templates are commonly used when adding yourself to IndieWeb Example sections or taking notes in etherpads.

Prerequisites

We recommend that you do the first three steps of wikifying if you haven't already.

How To

Create the template

  1. On your wiki user page, temporarily add: {{yourname}}
    • Replace "yourname" with your chosen chat-name or other short form of your name
    • This is not your domain. You don’t use your domain in chat so please no "www." or ".com" etc. in your template either.
    • This should result in a red link, which indicates the template page has not been created yet. If the link is not red, that means someone already has chosen that template name and you should choose another.
  2. Click the red link and you'll be prompted to create the template page
  3. Copy, paste, and edit with your information:
    <span class="h-card" style="white-space:nowrap">{{sparkline|1=http://example.com/your-profile-image.jpg}} [[User:Example.com|Your Display Name]]</span>
    • In the sparkline section, replace with the URL to your profile photo. (note that you do not edit the word sparkline)
    • After the sparkline, replace the wiki link to your user page and enter your name as you'd like it displayed
    • Note your wiki user page is based on the domain you signed in with and the first letter is capitalized, so it will be [[User:Example.com]] instead of [[User:example.com]]
  4. After saving the template, preview it on your wiki user page. Once it is working correctly, you can remove it from your user page
  5. You can now use your template on any wiki pages: {{yourname}}, replacing with your chosen name.

Update the template

If you need to update the name, photo, or link, you can find the template at:

https://indieweb.org/Template:yourname

Replace "yourname" with the name you chose when you created the template

Add documentation to the template

This section is optional.

When viewing the personal template page directly, it will show your name, photo, and link exactly as it will appear when you include it on other pages. If you would like to provide some additional information on the page, you can use a combination of MediaWiki's includeonly and noinclude tags.

First edit your template and wrap the contents in includeonly:

<includeonly><span class="h-card" style="white-space:nowrap">{{sparkline|1=http://example.com/your-profile-image.jpg}} [[User:Example.com|Your Display Name]]</span></includeonly>

This will make your personal template only appear when its included in wiki pages when you use {{yourname}}

Then edit your template and add a noinclude section that describes the what the template is for:

<noinclude>This template can be used to include a sparkline for {{yourname}} anywhere within the wiki. Just copy/paste: {{yourname}} into the page where it should appear.

For more details see also [[wikify#Wikify_yourself|Wikify yourself]].</noinclude>

For examples of how this will look, see Template:t or Template:gRegor

Include the template in your wiki signature

This section is optional.

MediaWiki allows you to add your signature when editing, which can be useful in brainstorming sections.

To use your personal template in signatures, open the Special:Preferences page and scroll to the "Signature" section. In the "New Signature" field, add {{subst:yourname}}. Replace "yourname" with your chosen name. Check the box for "Treat signature as wikitext (without an automatic link)" and click "Save."

You will now be able to sign your comments on the wiki with your template, using three tildes: ~~~

To sign with your template + current datetime, use four tildes: ~~~~

Examples

Here are a few examples of how the templates will appear:

See Also