(Redirected from S:STYLE)
Shortcuts: |
---|
Scratch Wiki Style Guide | |||
---|---|---|---|
This is not a cheatsheet for formatting. For that, see Scratch Wiki:Cheatsheet. This is a guide for how best to use markup when there are multiple possibilities that all work the same way. Generally, if one method is picked over others, that method is the most readable. However, occasionally it might be picked because it saves the most space. These guidelines do not have to be followed. They are purely for readability and/or page size savings. In fact, there will be some cases where one of the guidelines must be broken - which is perfectly fine. In fact, for some of these guidelines, there are explicit exceptions, specified by "except" in the guideline description. In any other case, however, these guidelines should be followed. If a page breaks one of these guidelines deliberately, place {{good style|<rule code>}} to prevent bots from adding {{bad style}} automatically. | |||
Description | Don't | Do | Description of style rule |
Bold and/or italic text | text''' bold '''text text'' italic ''text text''''' wow '''''text |
text '''bold''' text text ''italic'' text text '''''wow''''' text |
Never have spaces in between the five apostrophes and the bolded and italicized text. (no-spaces-inside-apos )
|
Link to another page | [[Link_title]] [[Link_title|link text]] |
[[Link title]] [[Link title|link text]] [[users:A_Username|A_Username]] |
Never use underscores in internal links, except in cases where the underscore is a part of the title of the thing being linked to. (Note: Users should not normally be linked to, per S:NOSP.) (no-link-underscores )
|
Link to another page | https://en…/wiki/Page [https://en…/wiki/Page text] |
[[Page]] [[Page|link]] |
Never use external links to internal pages. (no-ext-wikilinks )
|
Link to another page | [[Page|page]] [[Page|pages]] |
[[page]] [[page]]s |
If the link text and link title are the same, just use a link with no link text. Additionally, if the link text starts with the link title, use a link to the link title with no link text, and put the part behind after the link. (no-double-links )
|
Link to another page | ... [[Page]] ... ... [[scratch]] ... ... [[page Title]] ... [[pages|page]] |
... [[page]] ... ... [[Scratch]] ... ... [[Page Title]] ... [[Pages|page]] |
|
Link to internal heading | [[#A_B.3F]] [[#A_B.3F|text]] |
[[#A B?]] [[#A B?|text]] |
Never use underscores or .xx escapes in heading links. (no-section-underscores )
|
Add a page to a category | [[Cat…:Cat_Name]] |
[[Cat…:Cat Name]] |
Never use underscores in category links. (no-cat-underscores )
|
Add a page to a category | [[Category:Category]] …page content… |
…page content… [[Category:Category]] |
Category links must always go at the bottom of the page (not including interwiki links). (cat-at-end )
|
Add a page to a category | [[Cat…:A]] [[Cat…:B]] |
[[Cat…:A]][[Cat…:B]] OR [[Category:A]] [[Category:B]] |
The only whitespace allowed between category links is a single newline. (multi-cat-whitespace )
|
Link to a category page | [[Category:…]] |
[[:Category:…]] |
When linking to a category page, remember to add a colon in front of the title, or the page will be added to the category, rather than link to it. (category-link-colon )
|
Signing posts on a talk page | <scratchsig>user</scratchsig> |
~~~~ |
Always use ~~~~ , which produces your signature and a timestamp. (four-tildas )
|
Use a template | {{Template name}} {{template Name}} |
{{template name}} {{Template Name}} |
Never capitalize the name of the template, except when any other letter in the name is also capitalized (e.g. {{NotUseful}} or {{Wiki Standards}} should be used instead of {{notUseful}} or {{wiki Standards}} ) (no-template-caps )
|
Use multiple templates | {{April Fools}}{{stub|date=August 2018}}{{about|A|B|Page Name}}{{other version|2.0|1.4}}[[File:A.png|thumb|A thing.]][[File:B.png|thumb|B thing.]] |
{{April Fools}} {{stub|date=August 2018}} {{about|A|B|Page Name}} {{other version|2.0|1.4}} [[File:A.png|thumb|A thing.]] [[File:B.png|thumb|B thing.]] |
Use only one breaking template (i.e. a template that occupies an entire line anyway) per line. (one-inclusion-per-line )
|
Multiline a template | {{template name| param1=value1| param2=value2 }} |
{{template name |param1=value1 |param2=value2 }} |
Put the pipe (|) character at the start of each line, not at the end. (pipe-at-line-start )
|
Use {{bad style}} | {{bad style |no-template-caps |non-existent! }} |
{{bad style |no-template-caps }} |
Don't use {{bad style}} with an invalid style guide code! (error )
|
Using {{note}}/{{warning}}/{{caution}} | {{note}}text {{warning}}text {{caution}}text |
{{note|text}} {{warning|text}} {{caution|text}} |
Always pass the text as a parameter instead of using it outside the template - passing it as a parameter prevents wrapping past the template. (nwc-param-text )
|
Using {{main}} | {{main|Page_title}} |
{{main|Page title}} |
Never use underscores in page titles. (no-main-underscores )
|
Redirect to another page | #REDIRECT [[Page]][[Cat…:C]] |
#REDIRECT [[Page]] [[Category:C]] |
When the redirect needs a category (such as Category:Shortcuts), put the category link on the next line. (redirect-cat-lf )
|
Redirect to another page | #redirect [[Page]] |
#REDIRECT [[Page]] |
The #REDIRECT text should always be in all caps. (redirect-caps )
|
Section headings | …more content… ==Heading== …more content… |
…more content… == Heading == …more content… |
Add an extra blank line before the heading, and optionally add a space before and after the heading title. (whitespace-headings )
|
Nonindexed headings | ; Heading |
;Heading |
Never have a space between the semicolon and the title. (no-nih-space )
|
Bulleted list | Start *One *Two :*Two point one *Three Done |
Start * One * Two ** Two point one * Three Done |
Add an extra blank line before and after the list; add a space after the asterisk(s); never use a colon before the asterisk to indent - just use another asterisk. (whitespace-ul )
|
Numbered list | Start #One #Two :#Two point one #Three Done |
Start # One # Two ## Two point one # Three Done |
Add an extra blank line before and after the list; add a space after the number sign(s) (#); never use a colon before the number sign to indent - just use another number sign. (whitespace-ol )
|
Indenting | : Text ::) |
:Text : :) |
Never add a space between the colon and the text, except when the first character of the text would otherwise be treated as wiki markup, e.g. use : *text* instead of :*text* , as the latter would be converted into a bulleted list. (no-indent-space )
|
References | A<ref>Ref</ref>, B A, <ref>Ref</ref>B |
A,<ref>Ref</ref> B |
Put the reference after the punctuation, before the space. (ref-punctuation )
|
Styling text | a<small> s </small>a a<big> b </big>a a<span…> sp </span>a a<s> st </s>a |
a <small>s</small> a a <big>b</big> a a <span…>sp</span> a a <s>st</s> a |
Never have spaces in between the tags and the text. (no-spaces-inside-tags )
|
Any text | text |
text |
Never have any whitespace at the end of a line - spaces at the end of a line are almost impossible to detect, and trailing whitespace is never necessary for any purpose (other than the demonstration to the left). (no-trailing-spaces )
|
Preformatted text | text Start with space text |
Never use this at all - it is almost impossible to find when editing. (no-space-pre )
| |
Absolutely preformatted text | <pre> text </pre> |
<pre>text</pre> |
Never add a line break after the opening tag or before the closing tag. (no-pre-space )
|
Line breaks | line 1 line 2 |
line 1 line 2 |
Use two newlines for a paragraph break - a single newline will simply be treated as a space. (two-newline-break )
|
External links | [https://scratch.mit.edu/discuss/topic/294197/ forum topic] [https://scratch.mit.edu/discuss/post/3016764/ forum post] [https://scratcharchive.asun.co/forums/viewtopic.php?id=49826 forum topic] [https://scratcharchive.asun.co/forums/viewtopic.php?pid=591416#p591416 forum post] [{{Forum Archive|49826}} forum topic] [{{Forum Archive|p=591416}} forum post] |
[[topic:294197|forum topic]] [[post:3016764|forum post]] [[ar-topic:49826|forum topic]] [[ar-post:591416|forum post]] |
Use the interwiki (not inter-language!) prefixes topic , post , ar-topic , ar-post to link to forum topics, posts, archived forum topics, and posts respectively. (internal-forum-links )
|
External links | [https://scratch.mit.edu/studios/12345 Studio] [https://scratch.mit.edu/projects/12345 Project] [https://scratch.mit.edu/users/scratcher Scratcher] [https://scratch.mit.edu/conference Conference] |
[[studios:12345|Studio]] [[projects:12345|Project]] [[users:scratcher|Scratcher]] [[scratch:conference|Conference]] |
Use the interwiki (not inter-language!) prefixes studio , project , profile , scratch to link to studios, projects, users, and anything else on Scratch respectively. (internal-scratch-links )
|
External links | [https://scratch.mit.edu/discuss/youtube/dQw4w9WgXcQ YouTube video] [https://www.youtube.com/watch?v=dQw4w9WgXcQ YouTube video] [https://youtu.be/dQw4w9WgXcQ YouTube video] |
[[yt:dQw4w9WgXcQ|YouTube video]] |
Use the interwiki (not inter-language!) prefix yt to link to YouTube videos. (internal-youtube-links )
|
Using {{dead link}} in a reference | <ref>Ref</ref>{{dead link}} |
<ref>Ref{{dead link}}</ref> |
Never use {{dead link}} outside a reference. (deadlink-in-ref )
|