├── images
├── tn.png
└── screenshot.png
├── static
├── favicon.ico
├── icons
│ ├── 16.png
│ ├── 32.png
│ ├── 48.png
│ ├── 192.png
│ └── 512.png
├── img
│ └── avatar.png
├── apple-touch-icon.png
├── css
│ └── themes
│ │ ├── dark-blue.css
│ │ ├── dark-green.css
│ │ ├── dark-red.css
│ │ └── dark-violet.css
└── js
│ └── menu.js
├── layouts
├── partials
│ ├── header_logo.html
│ ├── header.html
│ ├── svg
│ │ ├── facebook.svg
│ │ ├── gitlab.svg
│ │ ├── instagram.svg
│ │ ├── stackoverflow.svg
│ │ ├── email.svg
│ │ ├── linkedin.svg
│ │ ├── medium.svg
│ │ ├── telegram.svg
│ │ ├── twitter.svg
│ │ ├── pocket.svg
│ │ ├── pinterest.svg
│ │ ├── vk.svg
│ │ ├── mastodon.svg
│ │ ├── github.svg
│ │ └── reddit.svg
│ ├── footer_menu.html
│ ├── mathjax.html
│ ├── footer.html
│ ├── entry
│ │ ├── toc.html
│ │ ├── meta.html
│ │ ├── tags.html
│ │ ├── meta
│ │ │ ├── tags.html
│ │ │ ├── categories.html
│ │ │ └── date.html
│ │ ├── featured.html
│ │ └── share.html
│ ├── comments.html
│ ├── footer_social.html
│ ├── related.html
│ ├── authorbox.html
│ ├── pagination.html
│ ├── breadcrumb.html
│ └── header_menu.html
├── 404.html
├── _default
│ ├── summary.html
│ ├── list.html
│ ├── single.html
│ └── baseof.html
├── index.manifest.json
└── index.html
├── archetypes
└── default.md
├── exampleSite
├── content
│ ├── post
│ │ ├── translation
│ │ │ ├── featured.png
│ │ │ └── index.md
│ │ ├── featured-images
│ │ │ ├── featured.png
│ │ │ └── index.md
│ │ ├── mathjax.md
│ │ ├── syntax-highlighting.md
│ │ ├── hugoisforlovers.md
│ │ ├── basic-elements.md
│ │ ├── goisforlovers.md
│ │ └── creating-a-new-theme.md
│ └── about.md
└── config.toml
├── .gitignore
├── .editorconfig
├── theme.toml
├── assets
└── css
│ ├── print.css
│ ├── reboot.css
│ └── main.css
├── LICENSE
├── i18n
├── en.yaml
├── fi.yaml
├── it.yaml
├── pt.yaml
├── pt-br.yaml
├── fr.yaml
└── de.yaml
├── data
└── social.toml
├── package.json
├── .github
└── workflows
│ └── ci-test.yml
├── CONTRIBUTING.md
├── .stylelintrc
└── README.md
/images/tn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/images/tn.png
--------------------------------------------------------------------------------
/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/static/favicon.ico
--------------------------------------------------------------------------------
/static/icons/16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/static/icons/16.png
--------------------------------------------------------------------------------
/static/icons/32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/static/icons/32.png
--------------------------------------------------------------------------------
/static/icons/48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/static/icons/48.png
--------------------------------------------------------------------------------
/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/images/screenshot.png
--------------------------------------------------------------------------------
/static/icons/192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/static/icons/192.png
--------------------------------------------------------------------------------
/static/icons/512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/static/icons/512.png
--------------------------------------------------------------------------------
/static/img/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/static/img/avatar.png
--------------------------------------------------------------------------------
/layouts/partials/header_logo.html:
--------------------------------------------------------------------------------
1 | {{ .Site.Title }}
--------------------------------------------------------------------------------
/static/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/static/apple-touch-icon.png
--------------------------------------------------------------------------------
/archetypes/default.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "{{ replace .Name "-" " " | title }}"
3 | date: "{{ .Date }}"
4 | ---
5 |
--------------------------------------------------------------------------------
/exampleSite/content/post/translation/featured.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vimux/Binario/HEAD/exampleSite/content/post/translation/featured.png
--------------------------------------------------------------------------------
/layouts/partials/header.html:
--------------------------------------------------------------------------------
1 |
{{ T "empty_text_start" | safeHTML }} ({{ delimit (apply $mainSections "printf" "content/%s" ".") ", " | safeHTML }}), {{ T "empty_text_end" }}.
{{ T "empty_tip" | safeHTML }}
25 |mainSections folders"
37 |
38 | - id: empty_text_end
39 | translation: "they'll appear here"
40 |
41 | - id: empty_tip
42 | translation: "Tip: You could change mainSections folders in site config file."
43 |
44 | # 404
45 | - id: page404_title
46 | translation: "404 Page not found"
47 |
48 | - id: page404_lead
49 | translation: "Sorry, the page you were looking for doesn't exist."
50 |
51 | - id: page404_link
52 | translation: "Go back to main page"
53 |
--------------------------------------------------------------------------------
/i18n/fi.yaml:
--------------------------------------------------------------------------------
1 | # Entry
2 | - id: entry_toc
3 | translation: "Sisältö"
4 |
5 | # Entry meta
6 | - id: meta_lastmod
7 | translation: "Päivitetty"
8 |
9 | - id: meta_categories
10 | translation: "Aiheet"
11 |
12 | - id: meta_tags
13 | translation: "Tunnisteet"
14 |
15 | # Share
16 | - id: share-caption
17 | translation: "Jaa"
18 |
19 | - id: save-caption
20 | translation: "Talleta"
21 |
22 | # Related
23 | - id: related_title
24 | translation: "Liittyvät"
25 |
26 | # Footer
27 | - id: footer_credits
28 | translation: "Sivut on luotu Hugo:lla käyttäen \
29 | Binario teemaa."
30 |
31 | # "No posts" empty state
32 | - id: empty_title
33 | translation: "Et ole vielä tehnyt julkaisuja!"
34 |
35 | - id: empty_text_start
36 | translation: "Lisättyäsi postauksia mainSections kansioihin"
37 |
38 | - id: empty_text_end
39 | translation: "näkyvät ne täällä"
40 |
41 | - id: empty_tip
42 | translation: "Tip: Voit muuttaa mainSections kansiot sivuston konfiguroinnissa."
43 |
44 | # 404
45 | - id: page404_title
46 | translation: "404 Sivua ei löydy"
47 |
48 | - id: page404_lead
49 | translation: "Valitettavasti etsimäsi sivu ei ole olemassa."
50 |
51 | - id: page404_link
52 | translation: "Siirry takaisin pääsivulle"
53 |
--------------------------------------------------------------------------------
/exampleSite/content/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: About Hugo
3 | description: Hugo, the world’s fastest framework for building websites
4 | date: 2019-02-28
5 | author: Hugo Authors
6 | menu: main
7 | ---
8 |
9 | Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.
10 |
11 | Hugo makes use of a variety of open source projects including:
12 |
13 | * https://github.com/russross/blackfriday
14 | * https://github.com/alecthomas/chroma
15 | * https://github.com/muesli/smartcrop
16 | * https://github.com/spf13/cobra
17 | * https://github.com/spf13/viper
18 |
19 | Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages.
20 |
21 | Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases.
22 |
23 | Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider.
24 |
25 | Learn more and contribute on [GitHub](https://github.com/gohugoio).
26 |
--------------------------------------------------------------------------------
/layouts/partials/entry/featured.html:
--------------------------------------------------------------------------------
1 | {{- with .page.Resources.ByType "image" }}
2 | {{- $link := $.link -}}
3 | {{- $IsSingle := $.IsSingle -}}
4 | {{- $match := $.page.Params.featured -}}
5 | {{- $featuredMap := "" -}}
6 |
7 | {{- $IsMap := reflect.IsMap $match -}}
8 | {{- if $IsMap }}
9 | {{- $featuredMap = $match -}}
10 | {{- $match = $match.url -}}
11 | {{- end }}
12 |
13 | {{- $featured := .GetMatch ($match | default "{featured.*,thumbnail.*}") -}}
14 | {{ if and $featured (not (and $IsSingle ($.page.Param "featured.previewOnly"))) }}
15 | mainSections"
37 |
38 | - id: empty_text_end
39 | translation: "appariranno qui"
40 |
41 | - id: empty_tip
42 | translation: "Suggerimento: puoi cambiare le cartelle mainSections dal file di configurazione del sito."
43 |
44 | # 404
45 | - id: page404_title
46 | translation: "404 Pagina non trovata"
47 |
48 | - id: page404_lead
49 | translation: "Siamo spiacenti, la pagina che stavi cercando non esiste."
50 |
51 | - id: page404_link
52 | translation: "Torna alla pagina principale"
53 |
--------------------------------------------------------------------------------
/i18n/pt.yaml:
--------------------------------------------------------------------------------
1 | # Entry
2 | - id: entry_toc
3 | translation: "Conteúdo da página"
4 |
5 | # Entry meta
6 | - id: meta_lastmod
7 | translation: "Última modificação"
8 |
9 | - id: meta_categories
10 | translation: "Categorias"
11 |
12 | - id: meta_tags
13 | translation: "Tags"
14 |
15 | # Share
16 | - id: share-caption
17 | translation: "Campartilhar"
18 |
19 | - id: save-caption
20 | translation: "Salvar"
21 |
22 | # Related
23 | - id: related_title
24 | translation: "Relacionado"
25 |
26 | # Footer
27 | - id: footer_credits
28 | translation: "Powered by Hugo and \
29 | Binario theme."
30 |
31 | # "No posts" empty state
32 | - id: empty_title
33 | translation: "Você ainda não tem postagens!"
34 |
35 | - id: empty_text_start
36 | translation: "Conforme as postagens são adicionadas no diretório mainSections"
37 |
38 | - id: empty_text_end
39 | translation: "Eles vão aparecendo aqui"
40 |
41 | - id: empty_tip
42 | translation: "Dica: Você pode alterar o diretório mainSections no site config file."
43 |
44 | # 404
45 | - id: page404_title
46 | translation: "404 Página não encontrada"
47 |
48 | - id: page404_lead
49 | translation: "Desculpe, a página que você estava procurando não existe."
50 |
51 | - id: page404_link
52 | translation: "Voltar para a página principal"
53 |
--------------------------------------------------------------------------------
/i18n/pt-br.yaml:
--------------------------------------------------------------------------------
1 | # Entry
2 | - id: entry_toc
3 | translation: "Conteúdo da página"
4 |
5 | # Entry meta
6 | - id: meta_lastmod
7 | translation: "Última modificação"
8 |
9 | - id: meta_categories
10 | translation: "Categorias"
11 |
12 | - id: meta_tags
13 | translation: "Tags"
14 |
15 | # Share
16 | - id: share-caption
17 | translation: "Campartilhar no"
18 |
19 | - id: save-caption
20 | translation: "Salvar no"
21 |
22 | # Related
23 | - id: related_title
24 | translation: "Relacionado"
25 |
26 | # Footer
27 | - id: footer_credits
28 | translation: "Powered by Hugo and \
29 | Binario theme."
30 |
31 | # "No posts" empty state
32 | - id: empty_title
33 | translation: "Você ainda não tem postagens!"
34 |
35 | - id: empty_text_start
36 | translation: "Conforme as postagens são adicionadas no diretório mainSections"
37 |
38 | - id: empty_text_end
39 | translation: "Eles vão aparecendo aqui"
40 |
41 | - id: empty_tip
42 | translation: "Dica: Você pode alterar o diretório mainSections no site config file."
43 |
44 | # 404
45 | - id: page404_title
46 | translation: "404 Página não encontrada"
47 |
48 | - id: page404_lead
49 | translation: "Desculpe, a página que você estava procurando não existe."
50 |
51 | - id: page404_link
52 | translation: "Voltar para a página principal"
53 |
--------------------------------------------------------------------------------
/i18n/fr.yaml:
--------------------------------------------------------------------------------
1 | # Entry
2 | - id: entry_toc
3 | translation: "Table des matières"
4 |
5 | # Entry meta
6 | - id: meta_lastmod
7 | translation: "Mis à jour le"
8 |
9 | - id: meta_categories
10 | translation: "Catégories"
11 |
12 | - id: meta_tags
13 | translation: "Mots-clefs"
14 |
15 | # Share
16 | - id: share-caption
17 | translation: "Partager sur"
18 |
19 | - id: save-caption
20 | translation: "Sauvegarder Sous"
21 |
22 | # Related
23 | - id: related_title
24 | translation: "Voir aussi"
25 |
26 | # Footer
27 | - id: footer_credits
28 | translation: "Propulsé par Hugo et le theme \
29 | Binario."
30 |
31 | # "No posts" empty state
32 | - id: empty_title
33 | translation: "Aucune publication pour le moment"
34 |
35 | - id: empty_text_start
36 | translation: "Lorsque vous ajouterez des publication dans vos dossiers mainSections"
37 |
38 | - id: empty_text_end
39 | translation: "elles arriveront ici"
40 |
41 | - id: empty_tip
42 | translation: "Astuce: Vous pouvez changer les dossiers mainSections dans le fichier de configuration du site."
43 |
44 | # 404
45 | - id: page404_title
46 | translation: "404 Page introuvable"
47 |
48 | - id: page404_lead
49 | translation: "Désolé, la page que vous cherchez n'existe pas"
50 |
51 | - id: page404_link
52 | translation: "Retourner à l'acceuil"
53 |
--------------------------------------------------------------------------------
/i18n/de.yaml:
--------------------------------------------------------------------------------
1 | # Entry
2 | - id: entry_toc
3 | translation: "Inhaltsverzeichnis"
4 |
5 | # Entry meta
6 | - id: meta_lastmod
7 | translation: "Aktualisiert"
8 |
9 | - id: meta_categories
10 | translation: "Kategorien"
11 |
12 | - id: meta_tags
13 | translation: "Tags"
14 |
15 | # Share
16 | - id: share-caption
17 | translation: "Share on"
18 |
19 | - id: save-caption
20 | translation: "Speichere nach"
21 |
22 | # Related
23 | - id: related_title
24 | translation: "Ähnlich"
25 |
26 | # Footer
27 | - id: footer_credits
28 | translation: "Powered by Hugo und \
29 | Binario theme."
30 |
31 | # "No posts" empty state
32 | - id: empty_title
33 | translation: "Aktuell noch keine Posts vorhanden!"
34 |
35 | - id: empty_text_start
36 | translation: "Sowie Posts in Deinen als mainSections definierten Verzeichnissen hinzugefügt werden"
37 |
38 | - id: empty_text_end
39 | translation: "erscheinen sie hier."
40 |
41 | - id: empty_tip
42 | translation: "Tip: Du kannst die als mainSections betrachteten Verzeichnisse in der Konfigurationsdatei Deiner Seite ändern."
43 |
44 | # 404
45 | - id: page404_title
46 | translation: "404 Seite nicht gefunden"
47 |
48 | - id: page404_lead
49 | translation: "Entschuldigung, die Seite die Du besuchen wolltest existiert nicht."
50 |
51 | - id: page404_link
52 | translation: "Zurück zur Hauptseite"
53 |
--------------------------------------------------------------------------------
/data/social.toml:
--------------------------------------------------------------------------------
1 | [[icons]]
2 | id = "email"
3 | url = "mailto:%s"
4 | icon = "svg/email.svg"
5 | weight = 10
6 |
7 | [[icons]]
8 | id = "facebook"
9 | url = "https://www.facebook.com/%s"
10 | icon = "svg/facebook.svg"
11 | weight = 20
12 |
13 | [[icons]]
14 | id = "twitter"
15 | url = "https://twitter.com/%s"
16 | icon = "svg/twitter.svg"
17 | weight = 30
18 |
19 | [[icons]]
20 | id = "telegram"
21 | url = "https://t.me/%s"
22 | icon = "svg/telegram.svg"
23 | weight = 40
24 |
25 | [[icons]]
26 | id = "instagram"
27 | url = "https://www.instagram.com/%s"
28 | icon = "svg/instagram.svg"
29 | weight = 50
30 |
31 | [[icons]]
32 | id = "pinterest"
33 | url = "https://www.pinterest.com/%s"
34 | icon = "svg/pinterest.svg"
35 | weight = 60
36 |
37 | [[icons]]
38 | id = "vk"
39 | url = "https://vk.com/%s"
40 | icon = "svg/vk.svg"
41 | weight = 70
42 |
43 | [[icons]]
44 | id = "linkedin"
45 | url = "https://linkedin.com/in/%s"
46 | icon = "svg/linkedin.svg"
47 | weight = 80
48 |
49 | [[icons]]
50 | id = "github"
51 | url = "https://github.com/%s"
52 | icon = "svg/github.svg"
53 | weight = 90
54 |
55 | [[icons]]
56 | id = "gitlab"
57 | url = "https://gitlab.com/%s"
58 | icon = "svg/gitlab.svg"
59 | weight = 100
60 |
61 | [[icons]]
62 | id = "stackoverflow"
63 | url = "https://stackoverflow.com/users/%s"
64 | icon = "svg/stackoverflow.svg"
65 | weight = 110
66 |
67 | [[icons]]
68 | id = "mastodon"
69 | url = "%s"
70 | icon = "svg/mastodon.svg"
71 | weight = 120
72 |
73 | [[icons]]
74 | id = "medium"
75 | url = "https://medium.com/@%s"
76 | icon = "svg/medium.svg"
77 | weight = 130
78 |
--------------------------------------------------------------------------------
/exampleSite/content/post/syntax-highlighting.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Hugo Syntax Highlighting
3 | description: Syntax Highlighting example test article that shows how to creating and highlighting code blocks in Hugo-generated site
4 | date: 2018-04-15
5 | categories:
6 | - "Development"
7 | tags:
8 | - "Chroma"
9 | - "Hugo"
10 | - "Syntax Highlighting"
11 | - "HTML"
12 | - "Markdown"
13 | ---
14 |
15 | You can have code snippets highlighted so that they are easier to read on your site using Chroma, Hugo's default syntax highlighter. It is built in Go lang and is really, really fast – and for the most important parts compatible with Pygments. Chroma takes source code and other structured text and converts it into syntax highlighted HTML, ANSI-coloured text, etc.
16 |
17 |
18 | The example below shows a simple HTML code snippet highlighted with the Hugo [highlight](https://gohugo.io/content-management/shortcodes/#highlight) built-in shortcode:
19 |
20 | {{< highlight html >}}
21 |
22 |
23 |
24 |
25 | Test
29 | 30 | 31 | {{< /highlight >}} 32 | 33 | The following code snippet was used to achieve that result: 34 | 35 | ``` 36 | {{* highlight html */>}} 37 | 38 | 39 | 40 | 41 |Test
45 | 46 | 47 | {{* /highlight */>}} 48 | ``` 49 | 50 | For more information, see "[Hugo Syntax Highlighting](https://gohugo.io/content-management/syntax-highlighting)" from official Hugo docs. 51 | -------------------------------------------------------------------------------- /exampleSite/content/post/translation/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Translation Support 3 | description: With Hugo i18n possibilities, you can easily have a website in your language. This article explains how to translate and change language in Hugo's generated site. 4 | date: 2019-09-22 5 | tags: 6 | - "Translation" 7 | - "i18n" 8 | - "Hugo" 9 | featured: 10 | alt: Translation support 11 | previewOnly: true 12 | --- 13 | 14 | With Hugo i18n possibilities, you can easily have a website in your language. This Hugo theme is ready to be translated into other languages. You can create a special file that contains translated text to show the visitor instead of English. 15 | 16 | 17 | ## Translating the Theme 18 | 19 | 1. Create a folder named `/i18n/` in your Hugo site's root 20 | 1. Create a file `96 |99 | 100 | According to Mozilla's website,My goal wasn't to make a ton of money. It was to build good computers. I only started the company when I realized I could be an engineer forever.
97 | 98 |
Firefox 1.0 was released in 2004 and became a big success.101 | 102 | ## Tables 103 | 104 | Tables aren't part of the core Markdown spec, but Hugo supports them. 105 | 106 | | ID | Make | Model | Year | 107 | | --- | --------- | ------- | ---- | 108 | | 1 | Honda | Accord | 2009 | 109 | | 2 | Toyota | Camry | 2012 | 110 | | 3 | Hyundai | Elantra | 2010 | 111 | 112 | Colons can be used to align columns. 113 | 114 | | Tables | Are | Cool | 115 | |:----------- |:-------------:| ------------:| 116 | | align: left | align: center | align: right | 117 | | align: left | align: center | align: right | 118 | | align: left | align: center | align: right | 119 | 120 | You can also use inline Markdown. 121 | 122 | | Inline | Markdown | In | Table | 123 | | ---------- | --------- | ----------------- | ---------- | 124 | | *italics* | **bold** | ~~strikethrough~~ | `code` | 125 | 126 | ## Code 127 | 128 | ```html 129 | 130 | 131 | 132 | 133 |
Test
137 | 138 | 139 | ``` 140 | 141 | ## Highlighted Code 142 | 143 | {{< highlight html >}} 144 | 145 | 146 | 147 | 148 |Test
152 | 153 | 154 | {{< /highlight >}} 155 | 156 | ## Other stuff — abbr, sub, sup, kbd, etc. 157 | 158 | GIF is a bitmap image format. 159 | 160 | H2O 161 | 162 | C6H12O6 163 | 164 | Xn + Yn = Zn 165 | 166 | Press X to win. Or press CTRL+ALT+F to show FPS counter. 167 | 168 | As a unit of information in information theory, the bit has alternatively been called a shannon, named after Claude Shannon, the founder of field of information theory. 169 | -------------------------------------------------------------------------------- /assets/css/reboot.css: -------------------------------------------------------------------------------- 1 | /* CSS Reset (based on Bootstrap Reboot v4.3.1 | MIT) */ 2 | *, 3 | *::before, 4 | *::after { 5 | box-sizing: border-box; 6 | } 7 | 8 | body { 9 | margin: 0; 10 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 11 | font-size: 1rem; 12 | font-weight: 400; 13 | line-height: 1.4; 14 | color: #ddd; 15 | background-color: #1b1b1b; 16 | -webkit-text-size-adjust: 100%; 17 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 18 | } 19 | 20 | [tabindex="-1"]:focus:not(:focus-visible) { 21 | outline: 0 !important; 22 | } 23 | 24 | hr { 25 | margin: 1.25rem 0; 26 | color: inherit; 27 | background-color: currentColor; 28 | border: 0; 29 | border-top: 1px solid #444; 30 | } 31 | 32 | h1, 33 | h2, 34 | h3, 35 | h4, 36 | h5, 37 | h6 { 38 | margin-top: 0; 39 | margin-bottom: 0.5rem; 40 | font-weight: 600; 41 | } 42 | 43 | h1 { 44 | font-size: 2rem; 45 | } 46 | 47 | h2 { 48 | font-size: 1.75rem; 49 | } 50 | 51 | h3 { 52 | font-size: 1.5rem; 53 | } 54 | 55 | h4 { 56 | font-size: 1.375rem; 57 | } 58 | 59 | h5 { 60 | font-size: 1.25rem; 61 | } 62 | 63 | h6 { 64 | font-size: 1.125rem; 65 | } 66 | 67 | p { 68 | margin-top: 0; 69 | margin-bottom: 1rem; 70 | } 71 | 72 | abbr[title] { 73 | text-decoration: none; 74 | cursor: help; 75 | border-bottom: 1px dotted #c3c3c3; 76 | } 77 | 78 | address { 79 | margin-bottom: 1rem; 80 | font-style: normal; 81 | line-height: inherit; 82 | } 83 | 84 | ol, 85 | ul { 86 | padding-left: 2rem; 87 | } 88 | 89 | ol, 90 | ul, 91 | dl { 92 | margin-top: 0; 93 | margin-bottom: 1rem; 94 | } 95 | 96 | ol ol, 97 | ul ul, 98 | ol ul, 99 | ul ol { 100 | margin-bottom: 0; 101 | } 102 | 103 | dt { 104 | font-weight: 700; 105 | } 106 | 107 | dd { 108 | margin-bottom: .5rem; 109 | margin-left: 0; 110 | } 111 | 112 | blockquote { 113 | margin: 0 0 1rem 1rem; 114 | } 115 | 116 | b, 117 | strong { 118 | font-weight: bolder; 119 | } 120 | 121 | small { 122 | font-size: 0.875em; 123 | } 124 | 125 | sub, 126 | sup { 127 | position: relative; 128 | font-size: 0.75em; 129 | line-height: 0; 130 | vertical-align: baseline; 131 | } 132 | 133 | sub { 134 | bottom: -.25em; 135 | } 136 | 137 | sup { 138 | top: -.5em; 139 | } 140 | 141 | a { 142 | color: #f8ae00; 143 | text-decoration: none; 144 | } 145 | 146 | a:hover { 147 | color: #fff; 148 | text-decoration: underline; 149 | } 150 | 151 | a:not([href]), 152 | a:not([href]):hover { 153 | color: inherit; 154 | text-decoration: none; 155 | } 156 | 157 | pre, 158 | code, 159 | kbd, 160 | samp { 161 | font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 162 | font-size: 1em; 163 | } 164 | 165 | pre { 166 | display: block; 167 | margin-top: 0; 168 | margin-bottom: 1rem; 169 | overflow: auto; 170 | } 171 | 172 | pre code { 173 | font-size: inherit; 174 | color: inherit; 175 | word-break: normal; 176 | } 177 | 178 | code { 179 | color: #e44; 180 | word-wrap: break-word; 181 | } 182 | 183 | a > code { 184 | color: inherit; 185 | } 186 | 187 | kbd { 188 | padding: 0.125rem 0.1875rem; 189 | color: #111; 190 | background-color: #888; 191 | } 192 | 193 | kbd kbd { 194 | padding: 0; 195 | font-size: 1em; 196 | } 197 | 198 | figure { 199 | margin: 0 0 1rem; 200 | } 201 | 202 | img { 203 | vertical-align: middle; 204 | } 205 | 206 | svg { 207 | overflow: hidden; 208 | vertical-align: middle; 209 | } 210 | 211 | table { 212 | border-collapse: collapse; 213 | } 214 | 215 | caption { 216 | padding-top: 0.75rem; 217 | padding-bottom: 0.75rem; 218 | color: #6c757d; 219 | text-align: left; 220 | caption-side: bottom; 221 | } 222 | 223 | label { 224 | display: inline-block; 225 | margin-bottom: 0.5rem; 226 | } 227 | 228 | button { 229 | border-radius: 0; 230 | } 231 | 232 | button:focus { 233 | outline: 1px dotted; 234 | outline: 5px auto -webkit-focus-ring-color; 235 | } 236 | 237 | input, 238 | button, 239 | select, 240 | optgroup, 241 | textarea { 242 | margin: 0; 243 | font-family: inherit; 244 | font-size: inherit; 245 | line-height: inherit; 246 | } 247 | 248 | button, 249 | input { 250 | overflow: visible; 251 | } 252 | 253 | button, 254 | select { 255 | text-transform: none; 256 | } 257 | 258 | select { 259 | word-wrap: normal; 260 | } 261 | 262 | [list]::-webkit-calendar-picker-indicator { 263 | display: none; 264 | } 265 | 266 | button, 267 | [type="button"], 268 | [type="reset"], 269 | [type="submit"] { 270 | -webkit-appearance: button; 271 | } 272 | 273 | button:not(:disabled), 274 | [type="button"]:not(:disabled), 275 | [type="reset"]:not(:disabled), 276 | [type="submit"]:not(:disabled) { 277 | cursor: pointer; 278 | } 279 | 280 | ::-moz-focus-inner { 281 | padding: 0; 282 | border-style: none; 283 | } 284 | 285 | input[type="date"], 286 | input[type="time"], 287 | input[type="datetime-local"], 288 | input[type="month"] { 289 | -webkit-appearance: textfield; 290 | } 291 | 292 | textarea { 293 | overflow: auto; 294 | resize: vertical; 295 | } 296 | 297 | fieldset { 298 | min-width: 0; 299 | padding: 0; 300 | margin: 0; 301 | border: 0; 302 | } 303 | 304 | legend { 305 | float: left; 306 | width: 100%; 307 | padding: 0; 308 | margin-bottom: 0.5rem; 309 | font-size: 1.5rem; 310 | line-height: inherit; 311 | color: inherit; 312 | white-space: normal; 313 | } 314 | 315 | mark { 316 | background-color: #f8ae00; 317 | } 318 | 319 | progress { 320 | vertical-align: baseline; 321 | } 322 | 323 | ::-webkit-datetime-edit { 324 | overflow: visible; 325 | line-height: 0; 326 | } 327 | 328 | [type="search"] { 329 | outline-offset: -2px; 330 | -webkit-appearance: textfield; 331 | } 332 | 333 | ::-webkit-search-decoration { 334 | -webkit-appearance: none; 335 | } 336 | 337 | ::-webkit-color-swatch-wrapper { 338 | padding: 0; 339 | } 340 | 341 | ::-webkit-file-upload-button { 342 | font: inherit; 343 | -webkit-appearance: button; 344 | } 345 | 346 | output { 347 | display: inline-block; 348 | } 349 | 350 | summary { 351 | display: list-item; 352 | cursor: pointer; 353 | } 354 | 355 | template { 356 | display: none; 357 | } 358 | 359 | main { 360 | display: block; 361 | } 362 | 363 | [hidden] { 364 | display: none !important; 365 | } 366 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Binario 2 | 3 | **Binario** welcomes contributions and corrections. Before contributing, please make sure you have read the guidelines 4 | below. If you're a newcomer to open source and you haven't contributed to other projects or used 5 | [Git](https://git-scm.com/) before, you should make yourself familiar before proceeding. 6 | 7 | ## Issues 8 | 9 | The [issue tracker](https://github.com/vimux/binario/issues) is the preferred channel for bug reports and features 10 | requests, but please respect the following restrictions: 11 | 12 | ### General requirements 13 | 14 | * Issue must be written in English. 15 | * Please **do not** combine a few problems or feature requests in one issue. Create separate issues if needed. 16 | * Please **do not** create an issue that contains only title. Write a clear title and useful description. 17 | * Please **do not** use the issue tracker for personal support requests. 18 | * Please **do not** post comments consisting solely of "+1" or emoji. The project maintainer reserve the right to delete 19 | such comments. Use 20 | [GitHub's reactions feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead. 21 | * Search first before filing a new issue. Please check existing open or recently closed issues to make sure somebody 22 | else hasn't already reported the issue. 23 | 24 | ### Reporting bugs 25 | 26 | When creating a new bug issue make sure to include the following information: 27 | 28 | * Your environment e.g. OS version, Hugo version, theme is up to date? Anything unusual about your environment or 29 | deployment. 30 | * Specify the exact steps to reproduce the bug in as many details as possible with code examples. Include links to files 31 | or demo projects, or copy/pasteable snippets, which you use in those examples. 32 | * Any message or error you get from Hugo, if you do. 33 | * A screenshot of any visual bug. 34 | 35 | Please, take in consideration the next template to report your bug: 36 | 37 | > **Hugo version**\ 38 | > _Run `hugo version` and paste output here._ 39 | > 40 | > **Theme is up to date?**\ 41 | > _No | Yes_ 42 | > 43 | > **Expected behavior**\ 44 | > _A short and expressive description of what behavior you're expecting._ 45 | > 46 | > **Current behavior**\ 47 | > _A short sentence explaining what's actually happening, possibly containing screenshots._ 48 | > 49 | > **Steps to reproduce / Code to reproduce**\ 50 | > _A step by step description of how to trigger this bug. / Provide link to a demo project which reproduces this bug._ 51 | > 52 | > **Additional info**\ 53 | > _Anything unusual about your environment or deployment process? Anything else do we need to know? Optional._ 54 | 55 | **Note:** If you find a **Closed** issue that seems like it is the same bug that you're experiencing, open a new issue 56 | and include a link to the original issue in the body of your new one. 57 | 58 | ### Proposing features 59 | 60 | * Explain the proposed feature, what it should do, why it is useful, and alternatives considered if possible. Please 61 | note that the project maintainer may close this issue or ask you to create a Pull Request if this is not something that 62 | the project maintainer sees as a sufficiently high priority. 63 | 64 | Following these guidelines helps maintainer and the community understand your suggestion and find related suggestions. 65 | 66 | ## Pull Requests (PR) 67 | 68 | **Please ask first** before embarking on any significant pull request (e.g. implementing features or refactoring code), 69 | otherwise, you risk spending a lot of time working on something that the project maintainer might not want to merge into 70 | the project. 71 | 72 | Please respect our Pull Request Acceptance Criteria. For larger changes, you will likely receive multiple rounds of 73 | comments and it may take some time to complete. 74 | 75 | ### Pull Request Acceptance Criteria 76 | 77 | * Keep the change in a single PR as small as possible 78 | * 1 PR = 1 FIX or FEATURE (do not combine things, send separate PR if needed) 79 | * PR with irrelevant changes won't be merged. If you do want to fix formatting or style, do that in a separate PR 80 | * Use a clear and descriptive branch name (e.g. **NOT** "patch-1" or "update") 81 | * Don't create a Pull Request from master branch 82 | * Provide a reasonable PR title and description 83 | * PR must be written in English 84 | * If the PR changes the UI it should include before-and-after screenshots or a link to a video 85 | * Keep PR up to date with upstream/master 86 | * Pay attention to any automated CI failures reported in the Pull Request 87 | * PR solves a common use case that several users will need in their real-life projects, not only your specific problems 88 | * Before you start something new or refactor something old, make sure you've read through the codebase and understand 89 | each part's purpose so that you don't break something 90 | * Always try to avoid breaking changes. But if they are needed, then mark each breaking commit with a 91 | "BREAKING CHANGE:" prefix in the commit title and a detailed explanation in the commit description of what happened and 92 | what the user needs to do 93 | * Deprecated params must be maintained for a 6-month transition period 94 | * If something mandates an unclear solution, leave a comment behind for the contributors that come after you 95 | * If you've added or modify SVG, ensure that each SVG file: 96 | * Be less than 2048 bytes 97 | * Be minified to a single line with no formatting 98 | * Not contain any JS or CSS section inside it 99 | * Not contain any additional transformations (matrix, translate, scale) or negative viewBox position values 100 | * Сompatible with [MIT License](LICENSE) 101 | * Maintain clean commit history and use meaningful commit messages. Pull Requests with messy commit history (with 102 | commit messages like "update", "another update", etc) are difficult to review and won't be merged, even if the changes 103 | are good enough 104 | * Be prepared to answer questions and make code changes. The project maintainer expect you to be reasonably responsive 105 | to those feedback, otherwise the PR will be closed after 2-4 weeks of inactivity 106 | 107 | ### Pull Request Contribution Prerequisites 108 | 109 | * You have Node & npm installed 110 | * You have Hugo installed at v0.48.0+ 111 | * You are familiar with Git 112 | 113 | ### Pull Request Process 114 | 115 | 1. Fork the repository 116 | 1. Clone down the repository to your local system 117 | 1. Run `npm i` in the repository root 118 | 1. Create a new *dedicated branch* with descriptive name from `master` 119 | 1. Make your change and commit to the new branch from the previous step 120 | 1. Write a clear commit message 121 | 1. If you've added code that need documentation, update the README.md 122 | 1. Make sure your code lints (`npm test`) 123 | 1. Push to your fork 124 | 1. Submit a Pull Request (PR) to the upstream 125 | 126 | --- 127 | 128 | **⚠️ IMPORTANT: No guarantees can be made that your pull request will be accepted.** 129 | 130 | ## License 131 | 132 | By contributing to Binario, you agree that your contributions will be licensed under [MIT License](LICENSE). 133 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "stylelint-order" 4 | ], 5 | "rules": { 6 | "at-rule-empty-line-before": [ 7 | "always", 8 | { 9 | "except": [ 10 | "blockless-after-same-name-blockless", 11 | "first-nested" 12 | ], 13 | "ignore": [ 14 | "after-comment" 15 | ] 16 | } 17 | ], 18 | "at-rule-name-case": "lower", 19 | "at-rule-name-space-after": "always-single-line", 20 | "at-rule-semicolon-newline-after": "always", 21 | "block-closing-brace-newline-after": "always", 22 | "block-closing-brace-empty-line-before": "never", 23 | "block-no-empty": true, 24 | "block-opening-brace-newline-after": "always-multi-line", 25 | "color-hex-case": "lower", 26 | "color-hex-length": "short", 27 | "color-no-invalid-hex": true, 28 | "comment-no-empty": true, 29 | "declaration-bang-space-after": "never", 30 | "declaration-bang-space-before": "always", 31 | "declaration-block-no-duplicate-properties": [ 32 | true, 33 | { 34 | "ignore": [ 35 | "consecutive-duplicates-with-different-values" 36 | ] 37 | } 38 | ], 39 | "declaration-block-no-shorthand-property-overrides": true, 40 | "declaration-block-semicolon-newline-after": "always-multi-line", 41 | "declaration-block-semicolon-space-after": "always-single-line", 42 | "declaration-block-semicolon-space-before": "never", 43 | "declaration-block-single-line-max-declarations": 1, 44 | "declaration-block-trailing-semicolon": "always", 45 | "declaration-colon-newline-after": "always-multi-line", 46 | "declaration-colon-space-after": "always-single-line", 47 | "declaration-colon-space-before": "never", 48 | "font-family-no-duplicate-names": true, 49 | "function-calc-no-unspaced-operator": true, 50 | "function-comma-newline-after": "always-multi-line", 51 | "function-comma-space-after": "always-single-line", 52 | "function-comma-space-before": "never", 53 | "function-linear-gradient-no-nonstandard-direction": true, 54 | "function-max-empty-lines": 0, 55 | "function-name-case": "lower", 56 | "function-parentheses-newline-inside": "always-multi-line", 57 | "function-parentheses-space-inside": "never-single-line", 58 | "function-whitespace-after": "always", 59 | "indentation": "tab", 60 | "keyframe-declaration-no-important": true, 61 | "length-zero-no-unit": true, 62 | "max-empty-lines": 1, 63 | "media-feature-colon-space-after": "always", 64 | "media-feature-colon-space-before": "never", 65 | "media-feature-name-case": "lower", 66 | "media-feature-name-no-unknown": true, 67 | "media-feature-parentheses-space-inside": "never", 68 | "media-feature-range-operator-space-after": "always", 69 | "media-feature-range-operator-space-before": "always", 70 | "media-query-list-comma-newline-after": "always-multi-line", 71 | "media-query-list-comma-space-after": "always-single-line", 72 | "media-query-list-comma-space-before": "never", 73 | "no-empty-source": true, 74 | "no-eol-whitespace": true, 75 | "no-extra-semicolons": true, 76 | "no-invalid-double-slash-comments": true, 77 | "no-missing-end-of-source-newline": true, 78 | "number-no-trailing-zeros": true, 79 | "property-case": "lower", 80 | "property-no-unknown": true, 81 | "selector-attribute-brackets-space-inside": "never", 82 | "selector-attribute-operator-space-after": "never", 83 | "selector-attribute-operator-space-before": "never", 84 | "selector-combinator-space-after": "always", 85 | "selector-combinator-space-before": "always", 86 | "selector-descendant-combinator-no-non-space": true, 87 | "selector-list-comma-newline-after": "always", 88 | "selector-list-comma-space-before": "never", 89 | "selector-pseudo-class-case": "lower", 90 | "selector-pseudo-class-no-unknown": true, 91 | "selector-pseudo-class-parentheses-space-inside": "never", 92 | "selector-pseudo-element-case": "lower", 93 | "selector-pseudo-element-colon-notation": "double", 94 | "selector-pseudo-element-no-unknown": true, 95 | "selector-type-case": "lower", 96 | "selector-type-no-unknown": true, 97 | "shorthand-property-no-redundant-values": true, 98 | "string-no-newline": true, 99 | "unit-case": "lower", 100 | "unit-no-unknown": true, 101 | "value-list-comma-newline-after": "always-multi-line", 102 | "value-list-comma-space-after": "always-single-line", 103 | "value-list-comma-space-before": "never", 104 | "value-list-max-empty-lines": 0, 105 | "order/properties-order": [ 106 | "position", 107 | "top", 108 | "right", 109 | "bottom", 110 | "left", 111 | "z-index", 112 | "box-sizing", 113 | "display", 114 | "flex", 115 | "flex-align", 116 | "flex-basis", 117 | "flex-direction", 118 | "flex-wrap", 119 | "flex-flow", 120 | "flex-shrink", 121 | "flex-grow", 122 | "flex-wrap", 123 | "align-content", 124 | "align-items", 125 | "align-self", 126 | "justify-content", 127 | "order", 128 | "float", 129 | "width", 130 | "min-width", 131 | "max-width", 132 | "height", 133 | "min-height", 134 | "max-height", 135 | "padding", 136 | "padding-top", 137 | "padding-right", 138 | "padding-bottom", 139 | "padding-left", 140 | "margin", 141 | "margin-top", 142 | "margin-right", 143 | "margin-bottom", 144 | "margin-left", 145 | "overflow", 146 | "overflow-x", 147 | "overflow-y", 148 | "-webkit-overflow-scrolling", 149 | "-ms-overflow-x", 150 | "-ms-overflow-y", 151 | "-ms-overflow-style", 152 | "columns", 153 | "column-count", 154 | "column-fill", 155 | "column-gap", 156 | "column-rule", 157 | "column-rule-width", 158 | "column-rule-style", 159 | "column-rule-color", 160 | "column-span", 161 | "column-width", 162 | "orphans", 163 | "widows", 164 | "clip", 165 | "clear", 166 | "font", 167 | "font-family", 168 | "font-size", 169 | "font-style", 170 | "font-weight", 171 | "font-variant", 172 | "font-size-adjust", 173 | "font-stretch", 174 | "font-effect", 175 | "font-emphasize", 176 | "font-emphasize-position", 177 | "font-emphasize-style", 178 | "font-smooth", 179 | "src", 180 | "hyphens", 181 | "line-height", 182 | "color", 183 | "text-align", 184 | "text-align-last", 185 | "text-emphasis", 186 | "text-emphasis-color", 187 | "text-emphasis-style", 188 | "text-emphasis-position", 189 | "text-decoration", 190 | "text-indent", 191 | "text-justify", 192 | "text-outline", 193 | "-ms-text-overflow", 194 | "text-overflow", 195 | "text-overflow-ellipsis", 196 | "text-overflow-mode", 197 | "text-shadow", 198 | "text-transform", 199 | "text-wrap", 200 | "-webkit-text-size-adjust", 201 | "-ms-text-size-adjust", 202 | "letter-spacing", 203 | "-ms-word-break", 204 | "word-break", 205 | "word-spacing", 206 | "-ms-word-wrap", 207 | "word-wrap", 208 | "overflow-wrap", 209 | "tab-size", 210 | "white-space", 211 | "vertical-align", 212 | "direction", 213 | "unicode-bidi", 214 | "list-style", 215 | "list-style-position", 216 | "list-style-type", 217 | "list-style-image", 218 | "pointer-events", 219 | "-ms-touch-action", 220 | "touch-action", 221 | "cursor", 222 | "visibility", 223 | "zoom", 224 | "table-layout", 225 | "empty-cells", 226 | "caption-side", 227 | "border-spacing", 228 | "border-collapse", 229 | "content", 230 | "quotes", 231 | "counter-reset", 232 | "counter-increment", 233 | "resize", 234 | "user-select", 235 | "nav-index", 236 | "nav-up", 237 | "nav-right", 238 | "nav-down", 239 | "nav-left", 240 | "background", 241 | "background-color", 242 | "background-image", 243 | "filter", 244 | "background-repeat", 245 | "background-attachment", 246 | "background-position", 247 | "background-position-x", 248 | "background-position-y", 249 | "background-clip", 250 | "background-origin", 251 | "background-size", 252 | "border", 253 | "border-color", 254 | "border-style", 255 | "border-width", 256 | "border-top", 257 | "border-top-color", 258 | "border-top-style", 259 | "border-top-width", 260 | "border-right", 261 | "border-right-color", 262 | "border-right-style", 263 | "border-right-width", 264 | "border-bottom", 265 | "border-bottom-color", 266 | "border-bottom-style", 267 | "border-bottom-width", 268 | "border-left", 269 | "border-left-color", 270 | "border-left-style", 271 | "border-left-width", 272 | "border-radius", 273 | "border-top-left-radius", 274 | "border-top-right-radius", 275 | "border-bottom-right-radius", 276 | "border-bottom-left-radius", 277 | "border-image", 278 | "border-image-source", 279 | "border-image-slice", 280 | "border-image-width", 281 | "border-image-outset", 282 | "border-image-repeat", 283 | "outline", 284 | "outline-width", 285 | "outline-style", 286 | "outline-color", 287 | "outline-offset", 288 | "box-shadow", 289 | "opacity", 290 | "-ms-interpolation-mode", 291 | "page-break-after", 292 | "page-break-before", 293 | "page-break-inside", 294 | "transition", 295 | "transition-delay", 296 | "transition-timing-function", 297 | "transition-duration", 298 | "transition-property", 299 | "transform", 300 | "transform-origin", 301 | "perspective", 302 | "appearance", 303 | "animation", 304 | "animation-name", 305 | "animation-duration", 306 | "animation-play-state", 307 | "animation-timing-function", 308 | "animation-delay", 309 | "animation-iteration-count", 310 | "animation-direction", 311 | "animation-fill-mode", 312 | "quotes", 313 | "will-change", 314 | "fill", 315 | "fill-rule", 316 | "stroke" 317 | ] 318 | } 319 | } 320 | -------------------------------------------------------------------------------- /exampleSite/content/post/goisforlovers.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "(Hu)go Template Primer" 3 | date: 2014-04-02 4 | tags: 5 | - "go" 6 | - "golang" 7 | - "templates" 8 | - "themes" 9 | - "development" 10 | categories: 11 | - "Development" 12 | - "golang" 13 | menu: main 14 | --- 15 | 16 | Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for 17 | its template engine. It is an extremely lightweight engine that provides a very 18 | small amount of logic. In our experience that it is just the right amount of 19 | logic to be able to create a good static website. If you have used other 20 | template systems from different languages or frameworks you will find a lot of 21 | similarities in Go templates. 22 | 23 | 24 | 25 | This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate] 26 | provide more details. 27 | 28 | ## Introduction to Go Templates 29 | 30 | Go templates provide an extremely simple template language. It adheres to the 31 | belief that only the most basic of logic belongs in the template or view layer. 32 | One consequence of this simplicity is that Go templates parse very quickly. 33 | 34 | A unique characteristic of Go templates is they are content aware. Variables and 35 | content will be sanitized depending on the context of where they are used. More 36 | details can be found in the [Go docs][gohtmltemplate]. 37 | 38 | ## Basic Syntax 39 | 40 | Golang templates are HTML files with the addition of variables and 41 | functions. 42 | 43 | **Go variables and functions are accessible within {{ }}** 44 | 45 | Accessing a predefined variable "foo": 46 | 47 | {{ foo }} 48 | 49 | **Parameters are separated using spaces** 50 | 51 | Calling the add function with input of 1, 2: 52 | 53 | {{ add 1 2 }} 54 | 55 | **Methods and fields are accessed via dot notation** 56 | 57 | Accessing the Page Parameter "bar" 58 | 59 | {{ .Params.bar }} 60 | 61 | **Parentheses can be used to group items together** 62 | 63 | {{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }} 64 | 65 | 66 | ## Variables 67 | 68 | Each Go template has a struct (object) made available to it. In hugo each 69 | template is passed either a page or a node struct depending on which type of 70 | page you are rendering. More details are available on the 71 | [variables](/layout/variables) page. 72 | 73 | A variable is accessed by referencing the variable name. 74 | 75 |