# An Unofficial Discourse User Reference Guide

**URL:** <https://forum.thefinestcc.com/t/an-unofficial-discourse-user-reference-guide/755>\
**Category:** The Briefing Room\
**Tags:** help\
**Created:** [February 25, 2021, 5:56pm UTC](https://forum.thefinestcc.com/t/an-unofficial-discourse-user-reference-guide/755 "2021-02-25T17:56:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VFS](https://forum.thefinestcc.com/user_avatar/forum.thefinestcc.com/vfs/32/245_2.png) [@VFS](https://forum.thefinestcc.com/u/VFS)\
**Post date:** [February 25, 2021, 5:56pm UTC](https://forum.thefinestcc.com/t/an-unofficial-discourse-user-reference-guide/755/1 "2021-02-25T17:56:36Z")

</div>

This is a “quick” how-to guide for using [Discourse](https://www.discourse.org/) forum/community software. It contains the most common features available to users/content editors but may not have complete coverage of the features. If anyone sees anything to add or correct, feel free to comment. If you’d like to learn more about the Discourse Editor’s syntax, take a look at the [commonmark](http://commonmark.org/help/) (a flavor of markdown) docs for more info.

#### Table of Contents

- [Links](#heading--Links)
- [Images](#heading--Images)
- [Text Formatting](#heading--TextFormatting)
- [Text Headings](#heading--Headings)
- [Lists](#heading--Lists)
- [Code Formatting](#heading--CodeFormatting)
- [Tables](#heading--Tables)
- [Blockquotes](#heading--Blockquotes)
- [Table of Contents](#heading--TableofContents)
- [Using HTML](#heading--UsingHTML)

## Links
Most of the time you'd want to use the editor bar or hotkey crtl+k, but the basic format is 

`[link text](https://digikey.com)`  
which will give you an example link that looks like this: [link text](https://digikey.com)

> **Note - Easier Editing with Links**  
> Having long URLs intermingled in your editor can sometimes make it a pain, so you can also offset the links using the syntax in the example below. Note you must have a blank line above the reference, and the reference id can be any number, text, or punctuation.

```plaintext
This paragraph is much easier to read in the [editor][1] because you can 
[include][dklink] the links below the paragraph text or at the bottom of the page.
 
[1]: https://github.com/digikey/digikey-kicad-library
[dklink]: https://digikey.com

```

This paragraph is much easier to read in the [editor](https://github.com/digikey/digikey-kicad-library) because you can [include](https://digikey.com) the links below the paragraph text or at the bottom of the page.

## Images
Adding images is quite easy. If there's an image in your clipboard, paste it in, the forum will automatically upload the image and fill in the appropriate syntax to make the image appear. 

You can also upload images directly using the editor button.

#### Image Sizing

If you would like to resize a large image to a smaller image, use the following syntax.

```markdown
![Original|200x200](/uploads/default/original/2X/f/fa4db02364adfc69ad5e0e63ecbe4784b0d25b19.jpg)
![Percent|200x200, 50%](/uploads/default/original/2X/f/fa4db02364adfc69ad5e0e63ecbe4784b0d25b19.jpg)
![By Pixels|64x64](/uploads/default/original/2X/f/fa4db02364adfc69ad5e0e63ecbe4784b0d25b19.jpg)

```

## Text Formatting

For bold, italics, and strike-through, use the editor buttons or directly type the markdown:

```auto
**bold word** or __bold word__
*italicized word* or _italicized word_
_combo of **bold** and **italic** _
~~strike-through word~~

```

**bold word** or **bold word**  
_italicized word_ or _italicized word_  
_combo of **bold** and **italic** _  
~~strike-through word~~

Alternatively, there’s some BBCode sytnax that a person can use  
`[b]like this[/b]` like this  
`[i]or this[/i]` or this  
`[u]underline[/u]` underline

## Headings

```markdown
# H1
## H2
### H3
#### H4
##### H5
###### H6

a horizontal rule is 3+ asterisks
***

```

# H1

## H2

### H3

#### H4

##### H5

###### H6

horizontal rule

* * *

## Lists

You can use the editor buttons for ordered or unordered lists.

```plaintext
1. First ordered list item
2. second list item
   * sub-lists are offset by three spaces      
1. Specific numbers 
1. don't matter. They will auto increment
1. auto increment

* unordered lists 
* are also possible

```

1. First ordered list item
2. Explicit second list item
  - sub-lists are offset by three spaces

3. Specific numbers
4. don’t matter. They will auto increment
5. auto increment

- unordered lists
- are also possible

## Code Formatting

### Inline code formatting

Surround a section of code with backticks (`) inline code formatting.  
**Typing:**  
`var x = 10;`  
**Results in:**  
`var x = 10;`  
This can also be done as `var x = 10;` inline.

Present entire line as code by prefixing four (4) spaces (an extra newline before this)  
**Typing** :

&nbsp;&nbsp;&nbsp;&nbsp; var this = “is a line”;  
**Results in :**

```
var this = "is a line";

```

### Multi-Line Blocks of Code

Surrounding code with three backticks ``` will allow for code to span multiple lines  
**Typing:**  
```  
function foo(bar){  
&nbsp;&nbsp;&nbsp;&nbsp; return bar+1;  
}  
```  
**Results in:**

```auto
function foo(bar){
    return bar+1;
}

```

**Syntax Highlighting**  
The code block will automatically try to choose a style for code, but you can explicitly call out the desired formatting.  
```javascript  
function foo(bar){  
&nbsp;&nbsp;&nbsp;&nbsp; return bar+1;  
}  
```  
**Results in:**

```javascript
function foo(bar){
    return bar+1;
}

```

## Tables

Tables are second class citizens in Discourse, some of the formatting features and niceties work and some don’t.

> **Protip -** The easiest way to get a table into discourse is to start a table in an spreadsheet, then copy & paste that table into the editor window. Discourse natively handles the format change and makes creating a table much easier. Excel and Google Sheets work great using this method.

A markdown table in Discourse needs at least the first two lines to exist:

```plaintext
|Color|Weight|Height|
|-|-|-|
|red|12|160|
|green|4|100|

```

| Color | Weight | Height |
| --- | --- | --- |
| red | 12 | 160 |
| green | 4 | 100 |

You can also use **HTML for tables**.

```html
<table>
  <tr>
    <th>Color</th>
    <th>Weight</th>
    <th>Height</th>
  </tr>
  <tr>
    <td>red</td>
    <td>12</td>
    <td>160</td>
  </tr>
  <tr>
    <td>green</td>
    <td>4</td>
    <td>100</td>
  </tr>
</table>

```

| Color | Weight | Height |
| --- | --- | --- |
| red | 12 | 160 |
| green | 4 | 100 |

## Blockquotes

Blockquotes can be found in the editor bar button  
Putting a greater than sign \> in front of so a line will create blockquotes  
**Typing:**  
\> this is some blockquoted text  
\> this is another line of blockquoted text

this is not blockquoted  
\> this is another one  
**Results in:**

> this is some blockquoted text  
> this is another line of blockquoted text

this is not blockquoted

> this is another one

## Table of Contents

This is not a native feature of Discourse, you can manually create a TOC by using HTML headings with the appropriate ID rather than the `##` heading sytnax. Make sure your id is prefixed with `heading--`, this is necessary because of the Discourse’s javascript app based architecture. Here is a quick example:

```html
- [link to first heading](#heading--first-header)
- [link to second heading](#heading--second-header)
- [link to third heading](#heading--third-header)
- [link to fourth heading](#heading--fourth-header)
<h3 id="heading--first-header">First One</h3>
some text
<h3 id="heading--second-header">Second One</h3>
more text
<h3 id="heading--third-header">Third One</h3>
even more text
<h3 id="heading--fourth-header">Fourth One</h3>
ok no more text

```

- [link to first heading](#heading--first-header)
- [link to second heading](#second-header)
- [link to third heading](#heading--third-header)
- [link to fourth heading](#heading--fourth-header)

### First One
some text
### Second One
more text
### Third One
even more text
### Fourth One
ok no more text
## Using HTML

### Other

If you’d ever like to see how someone else created their post you can use the following URL format to view the raw markdown `https://forum.example.com/raw/{topicid}/{postid}` take a look at [the current post](https://forum.digikey.com/raw/1125/1) as an example.

### Aligning items

If you’re trying to align images or wrap text, there isn’t a really great tools for either of these things. It’s possible with custom plugins, but it’s not yet supported in native Discourse.

---

<div class="post-metadata">

**Author:** ![MainFrame](https://forum.thefinestcc.com/user_avatar/forum.thefinestcc.com/mainframe/32/1470_2.png) [@MainFrame](https://forum.thefinestcc.com/u/MainFrame)\
**Post date:** [February 25, 2021, 8:20pm UTC](https://forum.thefinestcc.com/t/an-unofficial-discourse-user-reference-guide/755/2 "2021-02-25T20:20:02Z")

</div>

![20210225_141927](https://forum.thefinestcc.com/uploads/default/original/2X/4/439703066ac386a5f6520ec470a2f61991a977be.jpeg)

---

<div class="post-metadata">

**Author:** ![VFS](https://forum.thefinestcc.com/user_avatar/forum.thefinestcc.com/vfs/32/245_2.png) [@VFS](https://forum.thefinestcc.com/u/VFS)\
**Post date:** [February 25, 2021, 8:22pm UTC](https://forum.thefinestcc.com/t/an-unofficial-discourse-user-reference-guide/755/3 "2021-02-25T20:22:16Z")

</div>

Cute. But the post spells things out pretty well. 😛
