|
|
|
---
|
|
|
|
title: "{{ replace .Name "-" " " | title }}"
|
|
|
|
date: {{ .Date }}
|
|
|
|
draft: true
|
|
|
|
tags: []
|
|
|
|
---
|
|
|
|
Headers
|
|
|
|
|
|
|
|
# Header 1
|
|
|
|
## Header 2
|
|
|
|
### Header 3
|
|
|
|
#### Header 4 ####
|
|
|
|
##### Header 5 #####
|
|
|
|
###### Header 6 ######
|
|
|
|
|
|
|
|
*Emphasize* _emphasize_
|
|
|
|
**Strong** __Strong__
|
|
|
|
A [link](http://example.com "Title").
|
|
|
|
Some text with [a link][1] and another [link][2].
|
|
|
|
|
|
|
|
[1]: http://example.com/ "Title"
|
|
|
|
[2]: http://example.org/ "Title"
|
|
|
|
|
|
|
|
Logo: ![Alt](/wp.png "Title")
|
|
|
|
Smaller logo: ![Alt][1]
|
|
|
|
[1]: /wp-smaller.png "Title"
|
|
|
|
|
|
|
|
Linked logo: [![alt text](/wp-smaller.png)] (http://wordpress.com/ "Title")
|
|
|
|
|
|
|
|
Lists
|
|
|
|
|
|
|
|
1. Item
|
|
|
|
2. Item
|
|
|
|
* Mixed
|
|
|
|
* Mixed
|
|
|
|
- or dash
|
|
|
|
3. Item
|
|
|
|
|
|
|
|
Blockquotes
|
|
|
|
|
|
|
|
> Quoted text.
|
|
|
|
> > Quoted quote.
|
|
|
|
|
|
|
|
> * Quoted
|
|
|
|
> * List
|
|
|
|
|
|
|
|
|
|
|
|
Quoted text.
|
|
|
|
|
|
|
|
Quoted quote.
|
|
|
|
|
|
|
|
Quoted
|
|
|
|
List
|
|
|
|
|
|
|
|
Preformatted
|
|
|
|
|
|
|
|
Begin each line with
|
|
|
|
two spaces or more to
|
|
|
|
make text look
|
|
|
|
e x a c t l y
|
|
|
|
like you type i
|
|
|
|
t.
|
|
|
|
|
|
|
|
|
|
|
|
Begin each line with
|
|
|
|
two spaces or more to
|
|
|
|
make text look
|
|
|
|
e x a c t l y
|
|
|
|
like you type i
|
|
|
|
t.
|
|
|
|
|
|
|
|
Code
|
|
|
|
|
|
|
|
`This is code`
|
|
|
|
|
|
|
|
This is code
|
|
|
|
Code block
|
|
|
|
|
|
|
|
~~~~
|
|
|
|
This is a
|
|
|
|
piece of code
|
|
|
|
in a block
|
|
|
|
~~~~
|
|
|
|
|
|
|
|
```
|
|
|
|
This too
|
|
|
|
```
|
|
|
|
|
|
|
|
Syntax highlighting
|
|
|
|
|
|
|
|
```css
|
|
|
|
#button {
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Example code
|
|
|
|
|
|
|
|
```go
|
|
|
|
{{<highlight go "linenos=table,hl_lines=8 15-17,linenostart=199">}}
|
|
|
|
// GetTitleFunc returns a func that can be used to transform a string to
|
|
|
|
// title case.
|
|
|
|
//
|
|
|
|
// The supported styles are
|
|
|
|
//
|
|
|
|
// - "Go" (strings.Title)
|
|
|
|
// - "AP" (see https://www.apstylebook.com/)
|
|
|
|
// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html)
|
|
|
|
//
|
|
|
|
// If an unknown or empty style is provided, AP style is what you get.
|
|
|
|
func GetTitleFunc(style string) func(s string) string {
|
|
|
|
switch strings.ToLower(style) {
|
|
|
|
case "go":
|
|
|
|
return strings.Title
|
|
|
|
case "chicago":
|
|
|
|
tc := transform.NewTitleConverter(transform.ChicagoStyle)
|
|
|
|
return tc.Title
|
|
|
|
default:
|
|
|
|
tc := transform.NewTitleConverter(transform.APStyle)
|
|
|
|
return tc.Title
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{{</highlight>}}
|
|
|
|
```
|