What is Markdown?

Markdown is a lightweight markup language with plain-text-formatting syntax

– Wikipedia

:toc:


Elements

Title

Use sharp # at begining.

Emphasis

  • Italics : * or _
  • Bold : ** or __
  • Strikethrough : ~~
  • Mono : `

Quotes

Quote like this

Table

TitleSymbolCenter
CenterRightLeft
Row 3Hej

Code highlighting

Code block here

HTML

<html>
<title>This is title</title>
<body>
    Content here
</body>
</html>

Python

print("Hello world")

Highlight

https://gohugo.io/content-management/syntax-highlighting/#example-highlight-shortcode

199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
// 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":
    return transform.NewTitleConverter(transform.ChicagoStyle)
  default:
    return transform.NewTitleConverter(transform.APStyle)
  }
}

Gist

All file in the Gist

View gist spf13/7896402 on GitHub

Specific file in the Gist

View deploy.sh in gist datagrok/3807742 on GitHub

Support languages:

[Nov 29, 2020] bash/shell, css, clike, javascript, apacheconf, actionscript, applescript, c, csharp, cpp, coffeescript, ruby, csp, css-extras, diff, django, docker, elixir, elm, markup-templating, erlang, fsharp, flow, git, go, graphql, less, handlebars, haskell, http, java, json, kotlin, latex, markdown, makefile, objectivec, ocaml, perl, php, php-extras, r, sql, processing, scss, python, jsx, typescript, toml, reason, textile, rust, sass, stylus, scheme, pug, swift, yaml, haml, twig, tsx, vim, visual-basic, wasm.

https://github.com/panr/hugo-theme-terminal#code-highlighting

Lists

Unordered List

  • Apple
  • Banana
  • Candy

Ordered List

  1. Item 1
  2. Item 2
  3. Item 3

Checked List

TODO List

  • First article
  • Version Control
  • Deploy on Github
  • Add the about page

Embedded media

Images

alt text

Gray Cat from pexels.com

Gray Cat from pexels.com

Youtube

autoplay

Cover

IMAGE ALT TEXT HERE

Viemo

The Clock of the Long Now

Instagram

{{< instagram BWNjjyYFxVx >}}

{{< instagram BWNjjyYFxVx hidecaption >}}

https://github.com/gohugoio/hugo/issues/7879

Twitter

Old tweet code

< tweet 1332375757755215874 >

New embed code (the tweet shortcode was renamed to x in Hugo 0.141.0):

Miscellaneous

Footnote

hackmd.io 1

Render HTML

<sup>, <sub>

https://gohugo.io/getting-started/configuration-markup#goldmark

HTML Escaped characters

Copyright: ©

Registered: ®

Trademark: ™

Less Than: <

Greater Than: >

Ampresand: >

Emoji

😛

https://gohugo.io/functions/emojify/

https://www.webfx.com/tools/emoji-cheat-sheet/

Reference

https://hugo-terminal.now.sh/posts/markdown-syntax

https://gohugo.io/content-management/shortcodes/

https://manningbooks.medium.com/41b1c222257b

https://gohugo.io/content-management/formats/#learn-markdown


  1. A kind of collaborative software with markdown ↩︎