User:Gregorlove.com/sandbox

From IndieWeb

gRegor Morrill's sandbox for wiki updates.


How to set up a personal template

To make a small template that allows you to easily add your name, photo, and a link to your wiki user page:

  • 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.
  • Click the red link and you'll be prompted to create the template page
  • 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]]
  • After saving the template, preview it on your wiki user page. Once it is working correctly, you can remove it from your user page
  • You can now use your template on any wiki pages: {{yourname}}, replacing with your chosen name.

This personal template uses the sparkline template; see that page for more details and examples of its usage.

Optionally add documentation to the template

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

Examples