klknn log / posts / tags / works / feed / src

Org-mode examples

this page shows how to use org-mode in hugo. see /posts/hello for markdown usage.

gist

<!-- image -->
<figure {{ if isset .Params "class" }}class="{{ index .Params "class" }}"{{ end }}>
{{ if isset .Params "link"}}<a href="{{ index .Params "link"}}">{{ end }}
<img src="{{ index .Params "src" }}" {{ if or (isset .Params "alt") (isset .Params "caption") }}alt="{{ if isset .Params "alt"}}{{ index .Params "alt"}}{{else}}{{ index .Params "caption" }}{{ end }}"{{ end }} />
{{ if isset .Params "link"}}</a>{{ end }}
{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
<figcaption>{{ if isset .Params "title" }}
<h4>{{ index .Params "title" }}</h4>{{ end }}
{{ if or (isset .Params "caption") (isset .Params "attr")}}<p>
{{ index .Params "caption" }}
{{ if isset .Params "attrlink"}}<a href="{{ index .Params "attrlink"}}"> {{ end }}
{{ index .Params "attr" }}
{{ if isset .Params "attrlink"}}</a> {{ end }}
</p> {{ end }}
</figcaption>
{{ end }}
</figure>
<!-- image -->
view raw img.html hosted with ❤ by GitHub

footnote

hello 1 2

test 2

image

image

/emacs-company-dcd.png
Caption for image 1.

code block

def f(x):
	return x * x

math

(1)f(x)=x2

table

aaaaaaaabbc
123
456
caption for table 1.

Eq. (1) x2

a

a

a

a

a

a

a

a

a

a

Table tab:1.


1

foo


Back to top

Next: Markdown examples

Copyright © klknn All Rights Reserved.