Hugo Cheetsheet

Cheetsheet and style-check

Содержание:


{{ collapsible head="**Содержание**" }} {{ toc }} {{ /collapsible }}

Содержание

Заголовки и базовый текст

Header 2

Header 3

Header 4

Header 5
Header 6

(also markdown uses === and — for H1 and H2)

Test text test text test text test text test text test text.
This is new line after 2 spaces.

This is new line after empty line.
This is new line after /br/ tag


This is new line after [empty line + /br/] tag
  1. Bebra
  2. Riba

List:


<font color="green">green</font>

Color green example

Links

plane markdown link

www.youtube.com/watch?v=gPB2POKnEf4

www.youtube.com/watch?v=gPB2POKnEf4


{{ ref opriq }} — генерит адрес внутреннего md-файла (текстом)

http://ravrlab.ru/csblog/opriq/

{{ reflink opriq }}

OPRIQ — мой шорткод на внутренние md-файлы (генерит ссылку)


[Bubr Text]({{ ref opriq }})

Bubr Text — ссылка с user-названием


[{⇓ 1.zip}](files/)

{⇓ 1.zip} — моё форматирование для обозначения скачиваемых файлов


Blockquote, Table, Pre, Code x2

Blockquote

Table Lol Bubr
bubr bubr bubr bubr
riba riba riba riba
**preformated (via TAB symbol in MD)**

Inline code: sdtt

Code block:

1
2
3
4
5
(import math)
(defn f [x] (return True))
(defn f [x] (return True))
(defn f [x] (return True))
(defn f [x] (return True))

Media

Info:

Built-ins that I don’t currently use:


Image:

![Caption](../files/fotka.jpg "tooltip_pups")

Caption

Caption


Clickable image:

[![Caption](../files/fotka.jpg) *img*](../files/fotka.jpg *link*)

Caption

Caption


{{ pdf src="/srs.pdf" }}

PDF Embed


{{ video src="/vid.mp4" caption="Video Pupos"}}

Video Embed

Video Pupos

Callout

{{ callout emoji="💡"}} Text {{ /callout }}

💡

Text

[3]

MD-Html can set font color for callout

Collapsible

{{ collapsible head="**Header**" }} Text {{ /collapsible }}

Image in list

Pups:

  • ololo
  • inline image:
    • bubr
    • riba
      • ribozavr
        Via md

        Via md

        pupos
    • ribosoma
  • ololo

Nested collapsible

Nested collapsible

123

Nested collapsible

456

Columns

{{ columns }} Text1 <---> Text2 {{ /columns }}

Columns (with MD html for visibility):

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3

KaTeX

math: true should be added to frontmatter!

Inline eq: $3^{e^3}$ ololo

Out-line examples

$$x = {-b \hat{y} \pm \sqrt{b^2-4ac} \over 2a}$$

$$\begin{equation} f(x) = \int_0^x t^2 dt = \left[ \frac{t^3}{3} \right]_0^x = \frac{x^3}{3} \end{equation} $$

$$ \frac{1+\sin x}{1-\cos x} = \frac{2\sin^2\frac{x}{2}}{2\cos^2\frac{x}{2}} = \tan^2\frac{x}{2} $$

$$ f(z) = \frac{z}{z^2 + 1}, \quad z \in \mathbb{C} $$

Go-lang in Hugo

1
2
3
4
5
6
7
8
{{ $var := 12 }}
{{ if eq $var 6 }}
  {{ print "var is 6" }}
{{ else if eq $var 42 }}
  {{ print "var is 42" }}
{{ else }}
  {{ print "var is something else" }}
{{ end }}

1
2
3
{{ $v1 := 6 }}
{{ $v2 := 7 }}
<p>The product of {{ $v1 }} and {{ $v2 }} is {{ mul $v1 $v2 }}.</p>

1
2
{{ mul 6 (add 2 5) }}  42
{{ 5 | add 2 | mul 6 }}  42