Difference between revisions of "Help:Funtoo Editing Guidelines"

From Funtoo
Jump to: navigation, search
(Tables)
Line 34: Line 34:
  
 
{{tip|The following sections document how to use wikitext and Funtoo templates on the Funtoo wiki.}}
 
{{tip|The following sections document how to use wikitext and Funtoo templates on the Funtoo wiki.}}
 
=== Tables ===
 
 
Instead of using traditional MediaWiki table wikitext, use the following format:
 
 
<pre>
 
{{TableStart}}
 
<tr class="info"><th>Header 1</th><th>Header 2</th></tr>
 
<tr><td>Value 1</td><td>Value 2</td></tr>
 
<tr><td>Value 3</td><td>Value 4</td></tr>
 
{{TableEnd}}
 
</pre>
 
 
This will render as follows:
 
 
{{TableStart}}
 
<tr class="info"><th>Header 1</th><th>Header 2</th></tr>
 
<tr><td>Value 1</td><td>Value 2</td></tr>
 
<tr><td>Value 3</td><td>Value 4</td></tr>
 
{{TableEnd}}
 
 
Some helper macros are now available which make it easier to define two and three-column tables. Use {{c|2Col}} for normal two-column row, {{c|2ColHead}} for 2-column header, and {{c|3Col}} for 3-column row and {{c|3ColHead}} for 3-column header:
 
 
<pre>
 
{{TableStart}}
 
{{2ColHead|Sub-Profile|Description}}
 
{{2Col|{{c|arch}}|One arch profile is enabled, at build time, and is not changed. This defines CPU architecture-specific settings.}}
 
{{2Col|{{c|subarch}}|One subarch profile is typically enabled at build time, and defines the CPU optimizations in use.}}
 
{{2Col|{{c|build}}|One build profile is enabled, at build time, and is generally not changed. It defines the type of build, such as {{c|current}} or {{c|stable}}, and associated settings.}}
 
{{2Col|{{c|flavor}}|One flavor is enabled per system, and can be changed by the user. This defines the general use of the system, such as {{c|minimal}}, {{c|core}}, {{c|workstation}} or {{c|desktop}}}}
 
{{2Col|{{c|mix-ins}}|Zero or more mix-ins can be enabled that enable settings specific to a particular subset of features, such as {{c|gnome}}, {{c|kde}}, {{c|media}}, {{c|mate}}, {{c|X}}, {{c|hardened}}.}}
 
{{TableEnd}}
 
</pre>
 
 
Which renders as follows:
 
 
{{TableStart}}
 
{{2ColHead|Sub-Profile|Description}}
 
{{2Col|{{c|arch}}|One arch profile is enabled, at build time, and is not changed. This defines CPU architecture-specific settings.}}
 
{{2Col|{{c|subarch}}|One subarch profile is typically enabled at build time, and defines the CPU optimizations in use.}}
 
{{2Col|{{c|build}}|One build profile is enabled, at build time, and is generally not changed. It defines the type of build, such as {{c|current}} or {{c|stable}}, and associated settings.}}
 
{{2Col|{{c|flavor}}|One flavor is enabled per system, and can be changed by the user. This defines the general use of the system, such as {{c|minimal}}, {{c|core}}, {{c|workstation}} or {{c|desktop}}}}
 
{{2Col|{{c|mix-ins}}|Zero or more mix-ins can be enabled that enable settings specific to a particular subset of features, such as {{c|gnome}}, {{c|kde}}, {{c|media}}, {{c|mate}}, {{c|X}}, {{c|hardened}}.}}
 
{{TableEnd}}
 
 
 
 
{{tip|This table syntax has an added benefit of creating a responsive table that renders properly on mobile devices.}}
 
 
It is possible to use the following CSS classes with <code>tr</code> (rows) and <code>td/th</code> elements to color them as desired:
 
 
{{TableStart}}
 
<tr class="active"><td>Class Name</td></tr>
 
<tr class="success"><td>success</td></tr>
 
<tr class="info"><td>info</td></tr>
 
<tr class="warning"><td>warning</td></tr>
 
<tr class="active"><td>active</td></tr>
 
<tr class="danger"><td>danger</td></tr>
 
{{TableEnd}}
 
  
 
=== Informational Messages ===
 
=== Informational Messages ===

Revision as of 03:37, February 24, 2019

Description:
This page documents the editing guidelines for the Funtoo Wiki.

Thanks for your interest in contributing to the the Funtoo wiki!

Types of Edits

Before we get started, let's review what changes are okay to make, and what changes are not okay:

Type of ChangeOkay?
Grammar/spelling fixesYes
New wiki contentYes
New package informationYes
Adding to existing articleMaybe -- see below
Adding missing/incomplete informationYes
Making correctionsYes
Adding work-arounds to problems experiencedNo - open bug first on bug tracker.
   Important

Note that if you experience some problem with Funtoo Linux, during installation or otherwise, the proper course of action is to not add a work-around to our documentation, but to open a bug on our bug tracker. This is important because the problem you experienced may be a legitimate bug and the solution may be to fix the bug rather than add a work-around to our documentation. We may end up fixing a bug, making a documentation fix, or possibly both.

Basics

Here is a list of basic wiki information that you will need to know to get started:

  • First, to perform edits on the wiki, you must Create a Funtoo account and log in.
  • You can create a new page by navigating to http://www.funtoo.org/New_Page_Name. Underscores are the equivalent of spaces. Then select "Create" under the "Actions" menu.
  • Whether creating a new page or editing an existing page by clicking "Edit", you will be presented with Web-based text editor that allows you to modify the wikitext of the page. The wikitext is rendered to produce the document you see when you view the page normally.
  • Another fun thing you can do is click on your name under the "Account" menu once you have logged in. This will bring you to your "User" page. Then click "Create with Form" unde the "Actions" menu and enter your geographic and other information. This will allow you to be displayed on our Usermap and will also allow your full name to be displayed on Ebuild pages for which you are an author. It's generally a good idea to do this.
   Tip

The following sections document how to use wikitext and Funtoo templates on the Funtoo wiki.

Informational Messages

Notes, warnings, tips, and important templates can be used for informational messages that need to be offset from the regular text flow:

{{note|this is a note}}
   Note

this is a note

{{important|this is important}}
   Important

this is important

{{warning|this is a warning}}
   Warning

this is a warning

{{tip|this is a tip}}
   Tip

this is a tip

Note that these templates used to be called fancynote, fancytip, etc. The "fancy" names have been deprecated but will still be supported for the forseeable future.

Kernelop

To display kernel configuration options, we encourage you to use the kernelop template. To use the kernelop template, create an entry similar to the following example:

{{kernelop|title=foo,bar|desc=
kernel options pasted from "make menuconfig"
}} 
   Note

Kernelop is colored blue to slightly resemble the blueish background from make menuconfig.

Adding this entry will give you the following output: Under foo-->bar:

kernel options

Here's a more concrete example: Under File systems:

<M> Second extended fs support          
[ ]   Ext2 extended attributes          
[ ]   Ext2 execute in place support     
<M> Ext3 journalling file system support

Examples of usage:

Marking Pages as Needing Updates

If you find outdated wiki content, but you don't have the time or ability to update it, add one of the following templates to the wikitext of the page. This will add the page to the Needs Updates Category so we can identify pages that need updating:

{{PageNeedsUpdates}}
{{SectionNeedsUpdates}}


Examples of usage:

Inline Code

To emphasize commands, and other technical jargon when they appear inline in a paragraph, use the {{c}} template. When referencing files, use the {{f}} template.

The {{f|/etc/fstab}} file is an important one. Another important file is {{f|/boot/grub/grub.cfg}}. The {{c|emerge}} command is really nifty.

This example produces the following output:

The /etc/fstab file is an important one. Another important file is /boot/grub/grub.cfg. The emerge command is really nifty.

   Important

The <tt> tag has been deprecated for the purpose of tagging inline code, to conform with HTML5, and the previous use of the <code> tag is discouraged. It is more maintainable to use the {{c}} template.

Translations

We are starting to use the official MediaWiki Translate extension for translating page contents. I recommend focusing primarily on the Install Guide for translation, and only moving on to other things once the Install Guide translation is 100% complete.

Section-by-Section Install Guide Translation

To translate the Install Guide, start with the section-by-section format and choose "Translate this page", and work through it a section at a time.

Also note that you can go to [1] to translate special user interface text we use like "Chapter", "Install Guide", "Tip", "Important", etc.

Navigation Buttons

The section-by-section Install Guide has a blue navigation section which is used to navigate to the previous or next section. Here's how it works for translated pages. If you are on a translated section, and you want to go to the "next" section, and a translated section for the next section exists, then the link will point to the next translated page. But, if the translated version of the next page doesn't exist, then you will get linked to the English version of the section. Once you are in an English version of the section, you have been "de-railed" into the English document and the navigation will not "jump back" into your translated sections. But this allows users who are using your incomplete translated documentation to at least start reading the translated version, and click through to the end of the documentation without having any missing pages.

Once all sections exist in the translated language, then the "next" and "prev" links will stay in your translated sections, and the user will only go back to English if they select the English translation from the languages area.

All-in-One (One Page) Install Guide

Once the section-by-section Install Guide is translated, it is possible to create a copy of The contents of the all-in-one-page Installation Guide -- click here to view it and click "Edit". Create your copy at "Install/languagecode" and paste the contents. Update minor things like the title but the calls to translated_subpage can remain the same.

Next, good pages to translate are the ZFS, BTRFS and other pages in the Category:Official Documentation category. If you need more pages to translate, you can send me an email (either direct, or even better, go to User:Drobbins and then in the left-hand "Tools" section you will see an option to "Email this User" which you can use to send me a notification inside MediaWiki. I will then mark new pages for translation.

Upload Images

To upload images, head to Special:Upload and upload a file. Make sure that all images you upload have the same dimensions. When you upload, make note of the Destination Filename field -- this is the name that the upload will use when you reference it in your slide. It is recommended that you choose a simple descriptive name ending in ".jpg" or ".png" for the Destination Filename.