|
|
---
|
|
|
title: "{{ replace .Name "-" " " | title }}"
|
|
|
date: {{ .Date }}
|
|
|
draft: true
|
|
|
tags: []
|
|
|
---
|
|
|
|
|
|
-------------------------
|
|
|
# Default post template
|
|
|
|
|
|
## Writing tips
|
|
|
1. Find a good topic and commit to it
|
|
|
eg how to get started blogging
|
|
|
|
|
|
2. Make your goals and audience specific
|
|
|
Who is my Audience: eg People who want to start blogging, especially about technical topics, but haven’t done it yet.
|
|
|
What is my Goal: eg. Give people a concrete set of steps and pointers so they can get started.
|
|
|
|
|
|
3. Have a beginning, middle, and end
|
|
|
|
|
|
4. Get feedback and iterate
|
|
|
|
|
|
5. Add finishing touches: packaging, publication, and promotion
|
|
|
|
|
|
From [freeCodeCamp: How to write a great technical blog post][1]
|
|
|
|
|
|
[1]: https://www.freecodecamp.org/news/how-to-write-a-great-technical-blog-post-414c414b67f6/
|
|
|
|
|
|
|
|
|
## Syntax highlighting example
|
|
|
|
|
|
```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
|
|
|
}
|
|
|
}
|
|
|
```
|