This lesson is being piloted (Beta version)

Integrated Wiki

Overview

Teaching: 10 min
Exercises: 0 min
Questions
  • Where can I keep some simple documentation pages?

Objectives
  • Learn an easy way to host some documentation and/or notes.

  • Learn how to use Markdown and where to use it.

Sometimes you want to keep some notes about your project and share them with other developers and users. While you could keep them somewhere within the repository, you might decide against doing so because:

The introduced services all include a Wiki functionality to do just that.

All of them support:

What are other projects using the Wiki for:

Markdown primer

Markdown is a lightweight markup-language that looks intuitively nice when viewed as plain-text and renders nicely as HTML with things like bullet- and numbered lists, several levels of headings, sub-headings, sub-sub- headings (etc.), links, included images, code blocks, etc.

These services have expanded the original Markdown specification by additional elements like:

While they often follow the same syntax rules but sometimes differ slightly – especially when it comes to placing links to site features like pull requests.

Therefore each site has a guide to their own Markdown flavor:

The sites not only render Markdown within the Wiki but also in comments, issues, pull requests, code review, release notes, etc. as well as files with the *.md and .markdown file extension.

Markdown Examples

format words in **bold** or *italics*

use `inline code` markup

format words in bold or italics

use inline code markup

*   Use asterisks
*   to create
*   bullet lists.
  • Use asterisks
  • to create
  • bullet lists.
1.  Use numbers
1.  to create
1.  numbered lists.
  1. Use numbers
  2. to create
  3. numbered lists.
*  You can use indents
	*  To create sublists 
	*  of the same type
*  Or sublists
	1. Of different
	1. types
  • You can use indents
    • To create sublists
    • of the same type
  • Or sublists
    1. Of different
    2. types
# A Level-1 Heading

A Level-1 Heading

## A Level-2 Heading (etc.)

A Level-2 Heading (etc.)

Line breaks
don't matter.

But blank lines
create new paragraphs.

Line breaks don’t matter.

But blank lines create new paragraphs.

[Create links](http://software-carpentry.org) with `[...](...)`.
Or use [named links][data_carpentry].

[data_carpentry]: http://datacarpentry.org

Create links with [...](...). Or use named links.

Insert images with `![alt-text](URL)`:
![Git Logo](https://git-scm.com/images/logo.png) 

Insert images with ![alt-text](URL): Git Logo

A python code-block:
```python
def square(x):
    return x * x
```
Many other languages are supported.
Just change `python` into something else.

A python code-block:

def square(x):
    return x * x

Many other languages are supported. Just change python into something else.

Most of these examples are taken from: Software Carpentry: Plotting and Programming in Python 2016.

Key Points

  • Wikis are an easy way to share simple documentation.

  • Developers can edit the documentation within the browser.

  • Permissions can be set to allow any user to edit pages.

  • This allows crowd-sourcing efforts.

  • As it is stored in a Git repository, changes can always be reverted.

  • Markdown is a lightweight and rather intuitive markup-language that is widely used.