Skip to content
Permalink
Browse files

Cheatsheet

  • Loading branch information...
Depado committed Sep 3, 2019
1 parent d9c02b0 commit be9a5035281cd1d941be2b46899f6d07647a77a3
Showing with 269 additions and 1 deletion.
  1. +245 −0 pages/cheatsheet.md
  2. +24 −1 pages/smallblog-update.md
@@ -0,0 +1,245 @@
title: "Smallblog Cheatsheet"
description: |
A post that should display all the different capabilities of Smallblog and
provide quick visual checks that everything works. Can also be used as a
cheatlist.
slug: cheatsheet
banner: ""
draft: true
date: 2019-09-03 10:00:00
tags: [markdown,render]

# Cheatsheet

This post displays Smallblog's capabilities and can be used as a cheatsheet.
For every example, the raw markdown is given first.

# Code Blocks

## Specify Language

```go
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
```

```go
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
```

## Without Language

```
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
```

```
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
```

## Inline Code

This `text` should be displayed as `code`.

Also, let's `try with a lot of chars as well`.

This `text` should be displayed as `code`.

Also, let's `try with a lot of chars as well`.

# Admonitions

## With Title

!!! note "Title"
This is a `note` with a title.

!!! note "Title"
This is a `note` with a title.

## Without Title

!!! warning
This is a `warning` admonition without a title.

!!! warning
This is a `warning` admonition without a title.

## Extra Class

!!! danger wow "wow"
This a `danger` admonition with the `wow` CSS class.

!!! danger wow "wow"
This a `danger` admonition with the `wow` CSS class.

# Tables

## With Heading

| Column 1 | Column 2 |
|------------|-----------|
| First Row | First Row |
| Third Row | Third Row |

| Column 1 | Column 2 |
|------------|-----------|
| First Row | First Row |
| Third Row | Third Row |

## Without Heading

| | |
|------------|------------|
| First Row | First Row |
| Second Row | Second Row |
| Third Row | Third Row |

| | |
|------------|------------|
| First Row | First Row |
| Second Row | Second Row |
| Third Row | Third Row |

## Markdown Inside

| Column 1 | Column 2 |
|----------------|----------------|
| **First Row** | _First Row_ |
| `Second Row` | ~~Second Row~~ |

| Column 1 | Column 2 |
|----------------|----------------|
| **First Row** | _First Row_ |
| `Second Row` | ~~Second Row~~ |

# Paragraphs

Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud _exercitation_ ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in ~~reprehenderit~~ in voluptate velit esse
cillum dolore eu fugiat nulla [pariatur](/).

Excepteur sint occaecat cupidatat `non` proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.

# Pictures

## Simple Picture

![test](/assets/avatar.jpg)

![test](/assets/avatar.jpg)

## Picture with hover title

![test](/assets/avatar.jpg "Doge")

![test](/assets/avatar.jpg "Doge")

## Picture with Caption

![test](/assets/avatar.jpg) *Picture Caption or Description*

![test](/assets/avatar.jpg) *Picture Caption or Description*

## Side-by-side Pictures

!!! warning "Unimplemented"
This feature is currently not implemented

# Footnote

This is a footnote.[^1]
[^1]: The footnote text.

This is a footnote.[^1]
[^1]: The footnote text.

# Lists

## Unordered

- Simple bullet lists, starting with `+`, `-` or `*`
- Add sublists by indenting
- Either with a tab or multiple spaces
- This will create a sublist

- Simple bullet lists, starting with `+`, `-` or `*`
- Add sublists by indenting
- Either with a tab or multiple spaces
- This will create a sublist

## Ordered

1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa

1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa

## Definition List

Golang
: AKA the Go Programming Language.

Markdown
: Custom format to write stuff and translate it to HTML

Golang
: AKA the Go Programming Language.

Markdown
: Custom format to write stuff and translate it to HTML

# Quotes

## Anonymous Quote

> This is a quote.
> It can span on multiple lines.
>
> Like that I guess.
> This is a quote.
> It can span on multiple lines.
>
> Like that I guess.
## Citation Quote

> This quote might be famous, so make sure you credit whoever said or wrote
> that. I mean, it's pretty important.
>
> <cite>Me</cite>
> This quote might be famous, so make sure you credit whoever said or wrote
> that. I mean, it's pretty important.
>
> <cite>Me</cite>
@@ -108,6 +108,24 @@ The type of the admonition is always required, otherwise it won't be parsed. The
title is optional and you can add extra CSS classes in between the type and the
title.

## Caption Pictures

You can now add a caption to the pictures you insert in your posts.
This feature can be achieved by adding the caption in an `em` element
(basically, surrounding the caption with `*`) right next or below the picture
insertion.

```markdown
![alt](/path/to/image.jpg)
*Caption or Description*
```

```markdown
![alt](/path/to/image.jpg) *Caption or Description*
```

![test](/assets/avatar.jpg) *This is the caption*

# Technical Changes

In this section we'll see how those features were implemented and what changed
@@ -247,4 +265,9 @@ myrenderer := bfp.NewRenderer(
bf.NewHTMLRenderer(bf.HTMLRendererParameters{Flags: flags}),
),
)
```
```

This library doesn't import the previously mentionned lib, as to only have one
`RenderNode` method and avoid getting too deep in the call stack. (I'm guessing
it's more efficient that way instead of going through 5 `RenderNode` function
every time)

0 comments on commit be9a503

Please sign in to comment.
You can’t perform that action at this time.