Consumer Rights Wiki:Write your first article!: Difference between revisions
I will add this later, this is meant to be a list of all templates w/ exmaple |
|||
| Line 43: | Line 43: | ||
===Basic Info=== | ===Basic Info=== | ||
* You can make edits using the '''visual editor''' by clicking the "edit" button at the top of an article, or using the '''source editor''' by clicking "edit source" instead. | *You can make edits using the '''visual editor''' by clicking the "edit" button at the top of an article, or using the '''source editor''' by clicking "edit source" instead. | ||
** The '''visual editor''' is easier to use. It's '''recommended''' to start with this. It's more intuitive in multiple ways, but doesn't allow for complete control like the source editor. | **The '''visual editor''' is easier to use. It's '''recommended''' to start with this. It's more intuitive in multiple ways, but doesn't allow for complete control like the source editor. | ||
** The '''source editor''' is the advanced editor. You should ignore it for your first few edits, then check it out when you're comfortable with the visual editor. It allows for direct access to the markup language, and generally has more features and control. One downside is that you have to click '''Preview''' to see how it'll look. ''You might find yourself using this more often as you gain experience.'' | **The '''source editor''' is the advanced editor. You should ignore it for your first few edits, then check it out when you're comfortable with the visual editor. It allows for direct access to the markup language, and generally has more features and control. One downside is that you have to click '''Preview''' to see how it'll look. ''You might find yourself using this more often as you gain experience.'' | ||
** ''Source editor is forced on some namespaces (Talk: and Soyjak_Wiki: for example). This is okay. Proceed as normal, and do add a signature when you write on talk pages.'' | **''Source editor is forced on some namespaces (Talk: and Soyjak_Wiki: for example). This is okay. Proceed as normal, and do add a signature when you write on talk pages.'' | ||
* The wiki uses a markup language called [[mediawikiwiki:Help:Formatting|wikitext]] for formatting. For example, <code><nowiki>'''bold'''</nowiki></code> for '''bold''' text and <code><nowiki>[[link|text to display for the link]]</nowiki></code> for a [[Consumer_Rights_Wiki:Style_guide|link]]. The visual editor can handle most of this. | *The wiki uses a markup language called [[mediawikiwiki:Help:Formatting|wikitext]] for formatting. For example, <code><nowiki>'''bold'''</nowiki></code> for '''bold''' text and <code><nowiki>[[link|text to display for the link]]</nowiki></code> for a [[Consumer_Rights_Wiki:Style_guide|link]]. The visual editor can handle most of this. | ||
:Here are some examples: | :Here are some examples: | ||
:* '''Bold text''': <code><nowiki>'''bold text'''</nowiki></code> | :*'''Bold text''': <code><nowiki>'''bold text'''</nowiki></code> | ||
:* ''Italic text'': <code><nowiki>''italic text''</nowiki></code> | :*''Italic text'': <code><nowiki>''italic text''</nowiki></code> | ||
:* '''''Bold and italic text''''': <code><nowiki>'''''bold and italic'''''</nowiki></code> | :*'''''Bold and italic text''''': <code><nowiki>'''''bold and italic'''''</nowiki></code> | ||
:* <s>Strikethrough text</s>: <code><nowiki><s>Strikethrough</s></nowiki></code> | :*<s>Strikethrough text</s>: <code><nowiki><s>Strikethrough</s></nowiki></code> | ||
:* Internal link: <code><nowiki>[[Page name]]</nowiki></code> | :*Internal link: <code><nowiki>[[Page name]]</nowiki></code> | ||
:* Internal link with custom text: <code><nowiki>[[Page name|custom text]]</nowiki></code> | :*Internal link with custom text: <code><nowiki>[[Page name|custom text]]</nowiki></code> | ||
:* External link: <code><nowiki>[https://example.com Example]</nowiki></code> → [https://example.com Example] | :*External link: <code><nowiki>[https://example.com Example]</nowiki></code> → [https://example.com Example] | ||
:* Headings: <code><nowiki>== Heading 2 ==</nowiki></code>, <code><nowiki>=== Heading 3 ===</nowiki></code> | :*Headings: <code><nowiki>== Heading 2 ==</nowiki></code>, <code><nowiki>=== Heading 3 ===</nowiki></code> | ||
:* Lists: | :*Lists: | ||
:** Bullet: <code><nowiki>* Item</nowiki></code> | :**Bullet: <code><nowiki>* Item</nowiki></code> | ||
:** Numbered: <code><nowiki># Item</nowiki></code> | :**Numbered: <code><nowiki># Item</nowiki></code> | ||
:* Sign your comments on talk pages with: <code><nowiki>~~~~</nowiki></code> → automatically adds your name and timestamp. Make sure you always do so when using talk pages. | :*Sign your comments on talk pages with: <code><nowiki>~~~~</nowiki></code> → automatically adds your name and timestamp. Make sure you always do so when using talk pages. | ||
:* You can experiment in the [[Sandbox|sandbox]] if you want to try editing without affecting any real pages. | :*You can experiment in the [[Sandbox|sandbox]] if you want to try editing without affecting any real pages. | ||
===Advanced section=== | ===Advanced section=== | ||
You can ignore this section until you have some experience under your belt and are comfortable with the basics. | You can ignore this section until you have some experience under your belt and are comfortable with the basics. | ||
* If you want to add colored text, backgrounds, and borders, then the wiki also supports HTML and CSS styling, mainly through the source editor. To use this, first surround the text you want to style in html tags like <code><nowiki><span>this</span></nowiki></code> or <code><nowiki><div>this</div></nowiki></code>, and then in the first tag, add style="property1;property;2;property3; where each property has a semicolon after it, for example <code><nowiki><span style="font-size:10px;color:red;font-weight:bold;>test</span></nowiki></code> becomes <span style="font-size:10px;color:red;font-weight:bold;">test</span>. | *If you want to add colored text, backgrounds, and borders, then the wiki also supports HTML and CSS styling, mainly through the source editor. To use this, first surround the text you want to style in html tags like <code><nowiki><span>this</span></nowiki></code> or <code><nowiki><div>this</div></nowiki></code>, and then in the first tag, add style="property1;property;2;property3; where each property has a semicolon after it, for example <code><nowiki><span style="font-size:10px;color:red;font-weight:bold;>test</span></nowiki></code> becomes <span style="font-size:10px;color:red;font-weight:bold;">test</span>. | ||
Speaking of colored text and backgrounds, you can use '''templates''' to reuse common elements (like infoboxes, alerts, and formatting): | Speaking of colored text and backgrounds, you can use '''templates''' to reuse common elements (like infoboxes, alerts, and formatting): | ||
Templates work using a feature called '''transclusion'''. This just means one page can automatically include the contents of another. When the original page is updated, every page that includes it will show the updated version too. | [[Help:Templates|Templates]] work using a feature called '''transclusion'''. This just means one page can automatically include the contents of another. When the original page is updated, every page that includes it will show the updated version too. | ||
There are a few ways to use templates: | There are a few ways to use templates: | ||
* In the visual editor, click '''Insert > Template''' to bring up the template wizard. | *In the visual editor, click '''Insert > Template''' to bring up the template wizard. | ||
* Or, in source mode, type the code yourself: | *Or, in source mode, type the code yourself: | ||
** <code><nowiki>{{Template:Template name}}</nowiki></code> — when the page starts with <code>Template:</code> | **<code><nowiki>{{Template:Template name}}</nowiki></code> — when the page starts with <code>Template:</code> | ||
** <code><nowiki>{{:Page name}}</nowiki></code> — when it's a regular page (like a subpage or shortcut) | **<code><nowiki>{{:Page name}}</nowiki></code> — when it's a regular page (like a subpage or shortcut) | ||
For example: | For example: | ||
* <code><nowiki>{{Main Page/In The News}}</nowiki></code> brings in the "In The News" section from that subpage. | *<code><nowiki>{{Main Page/In The News}}</nowiki></code> brings in the "In The News" section from that subpage. | ||
* <code><nowiki>{{InfoboxCompany}}</nowiki></code> includes a company style infobox. | *<code><nowiki>{{InfoboxCompany}}</nowiki></code> includes a company style infobox. | ||
You can combine this with HTML and styling to make really useful and reusable page elements. If you're curious, go look at the source of one of the templates on the wiki! | You can combine this with HTML and styling to make really useful and reusable page elements. If you're curious, go look at the source of one of the templates on the wiki! | ||