Forum use and formatting tips

Not all forums support everything, but tables and TOCs work here! Sorry math folks, no LaTeX for you. Some useful links:

Text Formatting

The forum uses the same markdown as Obsidian. You can use the “B” or “I” in the editor bar or type out the markdown yourself:

Writing:

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

Results in:

bold word or bold word
italicized word or italicized word
combo of bold and italic
strike-through word


Links

There are a few different ways of adding links in the forum. The easiest is probably from the editor bar; the link icon. The hotkey Cmd/Ctrl + K brings up the same “Insert Hyperlink” window/modal. To write a markdown link yourself, just as in Obsidian, enclose the link text in brackets, [my link], and then the URL in parenthesis (https://my.great.site.com)

Writing:

Check out [Obsidian Help](https://help.obsidian.md).

Results in:

Check out Obsidian Help.

  • A URL on a line with nothing else produces a link preview:
  • On a line of its own, you can surround the URL in angle brackets < > like this <https://help.obsidian.md> if you don’t want the link preview to display:

https://help.obsidian.md


Code Formatting

  • Inline code formatting

To include code or something formatted as code within a sentence, surround it with backticks ` and `

Writing:

You can override your `.obsidian` folder per device in _Settings > About > Advanced_ -> Override config folder.

Results in:

You can override your .obsidian folder per device in Settings > About > Advanced → Override config folder.

  • Multi-line code block formatting

Surrounding code with three backticks will allow the code to span multiple lines.

Writing:

```
body:is(.theme-light, .theme-dark) {
    --text-normal: rgb(153,50,204);
}
```

Results in:

body:is(.theme-light, .theme-dark) {
    --text-normal: rgb(153,50,204);
}

If you have a code block, search query, dataview query, etc., within the section you want to show others, use four backticks ```` at the beginning and end. This keeps the whole section shown as you intend it to be.

Writing:

````
## Editor font color

- [x] Have a look at different shades of purple 

```css
/* change default font color */
body:is(.theme-light, .theme-dark) {
    --text-normal: rgb(153,50,204);
}
```
````

Results in:

## Editor font color

- [x] Have a look at different shades of purple 

```css
/* change default font color */
body:is(.theme-light, .theme-dark) {
    --text-normal: rgb(153,50,204);
}
```
7 Likes

When I first read this, I thought you meant an entire section, like a paragraph, so maybe this could be clearer. Maybe "To include code segments within a sentence, use backticks… " or something similar. I’m also heavily relying on using <code>... </code> (with and without back slashes) from time to time, especially when needing to exemplify stuff using backticks, but that is maybe more for slightly more experienced users.

In the links section, it’s said how to avoid the link preview to display. But should it be focused on how an URL on a line of its own actually is previewed as a block?

Furthermore in the code formatting, I’m thinking we could just state please use four backticks from the start, as it will remove so many problems if people get used to doing that within the forum. Most which include markdown, will very often also include queries of some sort, and in any case it doesn’t hurt to use four backticks. So I’m kind of leaning towards simplifying that part, and focus on using four backticks, and rather say in a bi sentence, why four and not just three.

I’ve never seen any references to the need for a blank line in relation to the code block fences, and most of the time I don’t do that in my posts, and never experienced any issues with that. Especially between my four + three backtick combinations at start/end when display a query directly, I’ve never included blank lines between those lines.

Is it worth to mention using ```css or ```javascript? Not sure, as they’re not as colorful as within Obsidian…

I also think the entire example around the four backticks could possibly be simplified a little. Not sure if we need all three variants, of both a screen shot, the markup and the result. Maybe something like the following is enough:

````
## Some header

- [ ] A random task

```css
/* change default font color */
body:is(.theme-light, .theme-dark) {
    --text-normal: rgb(153,50,204);
}
```
````

Which in a forum post will look like:

## Some header

- [ ] A random task

```css
/* change default font color */
body:is(.theme-light, .theme-dark) {
    --text-normal: rgb(153,50,204);
}
```

Other than that, I do like the initiative, and think I’ll link to this every now and then. Sadly not enough people take time researching how to format their post before they post.

3 Likes

holroy,

Thanks for the input! When writing this up, I was thinking of new-to-intermediate users of the forum, and didn’t want to get too specific or programming focused. I thought about a syntax highlighting tip for code blocks within the original post but, wasn’t sure what this forum supports. Added a link at the top.

I made a few changes that made it shorter and (hopefully) clearer.

1 Like