Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Style Guide

Vadim Makeev edited this page Apr 10, 2014 · 10 revisions

Dev.Opera uses “kramdown” markdown engine with some additional features:

Entry title

Entry title should be quoted by single quotes in following cases:

  1. If title contains :, for example title: 'Flexbox: Introduction'
  2. If title starts from backtick, fox example: title: '`getUserMedia` FTW'

If there’s already single quote in title It's Amazing! replace it with apostrophe 'It’s Amazing!' Alt Shift ] or quote it by double quotes: "It's Amazing!". Apostrophe is preferable of course.

URL

Given title:

The W3C device orientation API: detecting orientation and acceleration 

Bad URL:

the-w3c-device-orientation-api-detecting-orientation-and-acceleration 

Good URL:

w3c-device-orientation 

Headers

Every header on a page will get id generated from its content:

# W3C device orientation API … <h1 id="w3c-device-orientation-api">W3C device orientation API</h1> 

It's good enough for simple headers like “Read more” or “Introduction”, but if your header contains more than 3-5 words and you're going to use it, it's better to specify custom id by adding {#id}:

# W3C device orientation API {#w3c-api} … <h1 id="w3c-api">W3C device orientation API</h1> 

Code

Lorem `<html>` ipsum
→ <html> ····<html>
<figure id="listing-1"> <div markdown="block"> <sample> </div> <figcaption markdown="span">Listing 1: Code `sample`</figcaption> </figure>

Quote

> First paragraph > > Second paragraph, same quote

Note

Not decided yet.

Picture

{% include	figure.html	path=page.id	caption='caption'	pictures='	src:picture.png;	size:quarter;	alt:text;	link:url|	' %} 
Clone this wiki locally