Style

= Style Guide =

On this page, we summarize best practices for keeping the GoodRelations Wiki consistent.

URI Pattern
We use a hierarchical URI pattern:


 * Pages of generic relevance are in the "root" name space
 * Example: http://wiki.goodrelations-vocabulary.org/Logo
 * The following types of documents have their own subspaces
 * /Cookbook/ - all recipes
 * /Case_studies/ - all case studies
 * /Tools/ - all tools
 * /Events/ - all events
 * /Vocabularies/ - all ontologies (VSO etc.)
 * /GEP/ - GoodRelations Enhancement Proposals
 * /Documentation/ - the User's Guide

Examples:


 * http://wiki.goodrelations-vocabulary.org/Case_studies/Best_Buy
 * http://wiki.goodrelations-vocabulary.org/Tools/BMEcat2GR

Color Codes

 * Links
 * Foreground color: #df6010
 * Code listings
 * Background color: #fff9ef
 * Border color: #efa363
 * Header menu
 * Background color on select: #636161
 * Background color on hover: none
 * Border color: #bd7b1a
 * Navigation boxes and footer bar
 * Background color: #eeeeee
 * Border color: #dddddd (bottom or top)

Basic Structure
Page titles use H1, e.g. = The GoodRelations Cookbook = All subsections use H2. e.g. = The GoodRelations Cookbook = blabla

Section 1
blabla

Pages
Page URIs should be useful page titles, e.g.


 * http://wiki.goodrelations-vocabulary.org/Case_studies

Only the first character is capitalized, unless the page title is a proper name, e.g.


 * http://wiki.goodrelations-vocabulary.org/GoodRelations_Validator

If the full page title is pretty long, use a good acronym and disable the displaying of this as the page title, e.g. as in


 * http://wiki.goodrelations-vocabulary.org/BMEcat2GR

Categories
Category names should be in singular form, with proper English capitalization and underscores for spaces (no CamelWords). Examples:


 * http://wiki.goodrelations-vocabulary.org/Category:Tool
 * http://wiki.goodrelations-vocabulary.org/Category:Shop_Extension

Code: RDF/XML, Turtle, RDFa
The wiki supports syntax highlighting via the Geshi extension, plus a proprietary extension for syntax highlighting for SPARQL and Turtle. For RDF/XML, use &lt;xml&gt;

code

&lt;/xml&gt; For SPARQL and Turtle, use &lt;sparql&gt;

code

&lt;/sparql&gt;

Images
Images should be 720 pixels wide.

Multiple Columns
Use a div element instead of tables:

Two columns
Tools FAQs Tools FAQs

Three columns
Tools FAQs People Tools FAQs People

Disabling Page Title
Insert (has been disabled - titles only appear if colon is found in title name, e.g. Mediawiki:Sidebar) Better use __NOTITLE__

Forcing the Table of Contents to be Displayed at a Certain Position
or

Side-bar
Edit http://wiki.goodrelations-vocabulary.org/Mediawiki:Sidebar

Infoboxes

 * Infobox User: http://wiki.goodrelations-vocabulary.org/Template:Infobox_User
 * Infobox Case Study: http://wiki.goodrelations-vocabulary.org/Template:Infobox_Case_Study
 * Infobox Cookbook: http://wiki.goodrelations-vocabulary.org/Template:Infobox_Cookbook
 * Infobox Event: http://wiki.goodrelations-vocabulary.org/Template:Infobox_Event
 * Infobox Tool: http://wiki.goodrelations-vocabulary.org/Template:Infobox_Tool

Example 1 - Case Study Infobox:

Example 2 - User Infobox:

Navbox

 * Navbox Documentation: http://wiki.goodrelations-vocabulary.org/Template:Navbox_Documentation

Example - Documentation Navbox:

Feed
Last modified pages:

No Title
This light-weight extension allows to hide the page title: __NOTITLE__

CategorySuggest
... is an extraction of SelectCategoryTagCloud (without cloud feature). SelectCategoryTagCloud causes a weird behaviour of mediawiki in a sense that it trims all leading spaces in preformatted text. Thus we discarded it.

Read more

Example
According to scientists, the Sun is pretty big.&lt;ref&gt;E. Miller, The Sun, (New York: Academic Press, 2005), 23-5.&lt;/ref&gt; The Moon, however, is not so big.&lt;ref&gt;R. Smith, "Size of the Moon", Scientific American, 46 (April 1978): 44-6.&lt;/ref&gt;

Sample result
According to scientists, the Sun is pretty big. The Moon, however, is not so big.

Custom Sidebar
The replacement of the standard sidebar for a single page by a custom sidebar (e.g. with two boxes) is best accomplished via the sidebar tag: &lt;sidebar&gt;
 * Menu
 * link1|Text 1
 * link2|Text 2

&lt;/sidebar&gt; If you inserted the above snippet (omitting the sidebar-tag) into Tools/Sidebar the complete "Tools" hierarchy would inherit the custom sidebar, i.e. Tools/BMEcat2GR, etc.
 * Menu2
 * link1|Text 1
 * link2|Text 2

More information:


 * Demo page
 * http://www.mediawiki.org/wiki/Extension:CustomSidebar

Category Members on Sidebar
This extension allows to enrich the sidebar with a list of all members in a category. * CATEGORY:Tool|List of Tools

Slideshare
This widget allows you to add SlideShare presentations to your wiki page.

To insert this widget, use the following code:

Parameters

 * doc - is a parameter from embed code
 * start - optional parameter to define start slide number
 * width &amp; height - optional, 425x348 is a default
 * player - defaults to '2' and allows you to switch to other players
 * norelated - if set, widget will not display related content and sharing functionality at the end of the deck