Markdown Syntax

There is a newer version of this page. You can find it here.

Format

Italic / bold

*italic*
**bold**
***bold and italic***

Preformatted Text

~~~
IF xTrue THEN
    // Especially useful for code ;)
END_IF
~~~

Unordered List

* Item 1
    * Item 1.1
    * Item 1.2
* Item 2

Check List

* [ ] Unchecked item
* [x] Checked item
    * [ ] Subitem

Headers

# Header 1
## Sub-Header
### Sub-Sub-Header
# Header 2

Horizontal rule

Here comes a horizontal rule:

---
This text comes after the rule.

Regions of different color

A very common design technique which works pretty well for mobile and desktop views, is the separation of regions by a different background and / or foreground color. This is supported by the macro 'section'. Supported are hex color code and color names. Additionally to the color, you can also change the default text-alignment within this region.

[[section bgcolor=#FF0000 color=#00FF00]]

[[section bgcolor=red color=green]]

[[section align=left]]

[[section align=center]]

[[section align=right]]

Especially in combination with those sections, it makes sense to change the layout a bit and stretch it over the whole width. This can be achieved with the "startpage" macro:

[[startpage]]

Image slideshow

To show multiple images in a slideshow, you can simply use this macro. You can define an image URL, captions and durations to control the display a bit. Then all image slides on your wiki will be faded in and out. This also means, that you can have only one slideshow per page.

  • "src" can be an URL or the filename of an attachment
  • "time" is the duration, the image is shown in seconds
  • "number is a text, shown at the top of the image, indicating how many will follow
  • "caption" is a description of the image, shown at the bottom
  • "width" is the width of the image, in percent (80%) or pixel (150px)
[[slide src=image.png time=3 number="1/3" caption="image caption" width=100%]]

A full example:

[[slide src=https://www.w3schools.com/howto/img_nature_wide.jpg time=3 number="1/3" caption="nature"]][[slide src=https://www.w3schools.com/howto/img_snow_wide.jpg time=5 number="2/3" caption="snow"]][[slide src=https://www.w3schools.com/howto/img_mountains_wide.jpg time=10 number="3/3" caption="mountains"]]

Note: avoid newlines between the slides, as those will be shown in markdown.

Links

Implicit

Most links are detected within the text:

https://www.google.com
you@somewhere.com

Explicit

To be explicit, just add brackets around it:

<https://www.google.com>
<you@somewhere.com>

To define your own link text:

Click [here](https://www.google.com)

Relative links to headings on the same page can be realized with named links and a hash:

Jump to the [prerequisites](#prerequisite-packages)
...

# Prerequisite Packages
...

The name of the heading anchor is the name of the heading in lower case and with dashes instead of spaces.

The macro 'url' only creates the URL, not a full link. This way you can more easily extend the URL.

[[url target=profile]]                          # Outputs the URL as text
[link to profile]([[url target=profile]])       # Create a link to the user profile of the current user
[create new blog post]([[url target=blog]]/new) # Create a link to create a new blog post

Artifacts

You can link other tools, pages, tickets, ...

Simple

[MyWikiPage]       # Wiki - name of wiki page
[#123]             # Tracker - ticket number
[bugs:#1]          # Tracker - explicit tool selection
[r10721]           # SVN - revision number
[3b9d48]           # Git & Mercurial - first 6 characters of revision hash
[2012/02/my-post]  # Blog - post slug, including YYYY/MM/ prefix
[a6d38f98]         # Discussion Thread - thread id
[a6d38f98#42f8]    # Discussion Post - thread_id#post_id

External

[projectname:wiki:Home]
[projectname:code:3b9d48]

User Mention

@Username

Images

Standard

[[img src=attached-image.jpg]]

Resize image

[[img src=attached-image.jpg width=50%]]

Standard Icons

Standard icons are the ones which are also used on the CODESYS Forge Website. They can have a different foreground and background color. And they can also have a circle or rectangle shape. You define them like this:

[[icon name=fa-gavel]]
[[icon name=fa-gavel shape=circle size=20 outersize=60 color=white bgcolor=blue]]

By default, the icons have a background, to avoid it just set the size and outersize to the same value and bgcolor to "inherit":

[[icon name=fa-gavel shape=rectangle size=30 outersize=30 color=black bgcolor=inherit]]

Videos

[[embed url=https://www.youtube.com/watch?v=UvH572rz1Ng]]

Tables

First Header  | Second Header
  ------------- | -------------
  Content Cell  | Content Cell
  Content Cell  | Content Cell

Includes

You can easily include other wiki pages:

[[include ref=SamplePage]]

Also, you can embed a file directly from a repository! Just skip the ref parameter and pass repository, path and optional revision:

[[include repo=code path=README.md]]
[[include repo=myproject:code path=/ew/forms.py rev=fa61e7]]
[[include repo=prj:myproject:code path=/ew/forms.py]]

More macros

Download button

[[download url=https://forge.codesys.com/...]]
[[download url=https://forge.codesys.com/... label=installer]]

The layout of the download button can be influenced with the following attributes:

  • float: left/right/none
    By default the button is floating to the right, so it is displayed beside the other text of the wiki page.
  • align: left/right/center
    This attribute aligns the button itself. So it makes most sense when float is set to none.

Example:

[[download url=https://forge.codesys.com/... label=installer float=none align=center]]

CI/CD Badges

[[drone]]
[[drone repo=code]]

Neighborhood Notifications

[[neighborhood_feeds tool_name=wiki max_number=10 sort=pubdate]]

Neighborhood Blog Posts

[[neighborhood_blog_posts max_number=10 sort=timestamp]]

Project Blog Posts

[[project_blog_posts max_number=10 sort=timestamp mount_point=news]]

Project Member List

[[members]]

Project Screenshots

[[project_screenshots]]