├── layouts ├── 404.html ├── partials │ ├── custom │ │ ├── content-after.html │ │ ├── content-before.html │ │ └── head.html │ ├── comments.html │ ├── date.html │ ├── font.html │ ├── tag.html │ ├── toc.html │ ├── header.html │ ├── nav-header.html │ ├── footer.html │ └── head.html ├── index.html ├── shortcodes │ ├── mermaid.html │ ├── details.html │ ├── quote.html │ └── remote-github.html └── _default │ ├── baseof.html │ ├── single.html │ └── list.html ├── exampleSite ├── .hugo_build.lock ├── content │ ├── posts │ │ ├── _index.md │ │ ├── hugoisforlovers.md │ │ ├── shortcodes.md │ │ ├── migrate-from-jekyll.md │ │ ├── welcome-to-hugo-toigian.md │ │ ├── diagrams.md │ │ └── creating-a-new-theme.md │ ├── about.md │ └── _index.md ├── .gitignore └── config.toml ├── assets ├── css │ ├── custom.css │ ├── postcss.config.js │ ├── toigian.css │ ├── dark.css │ ├── light.css │ ├── tailwind.config.js │ ├── chroma │ │ ├── rose-pine.css │ │ └── rose-pine-dawn.css │ ├── rose-pine.min.css │ └── site.css └── js │ └── main.js ├── images ├── tn.png ├── dark-home.png ├── dark-list.png ├── dark-post.png ├── light-home.png ├── light-list.png ├── light-post.png └── screenshot.png ├── static └── favicon_io │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── apple-touch-icon.png │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── site.webmanifest │ └── about.txt ├── archetypes └── default.md ├── .prettierrc ├── theme.toml ├── package.json ├── .github └── workflows │ └── gh-page.yml ├── README.md ├── LICENSE ├── .gitignore └── yarn.lock /layouts/404.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exampleSite/.hugo_build.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/partials/custom/content-after.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/partials/custom/content-before.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/css/custom.css: -------------------------------------------------------------------------------- 1 | /* You can add custom styles here. */ 2 | -------------------------------------------------------------------------------- /exampleSite/content/posts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Posts" 3 | --- 4 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ .Content }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/images/tn.png -------------------------------------------------------------------------------- /layouts/partials/custom/head.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exampleSite/content/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "About" 3 | --- 4 | 5 | Something about yourself. 6 | -------------------------------------------------------------------------------- /images/dark-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/images/dark-home.png -------------------------------------------------------------------------------- /images/dark-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/images/dark-list.png -------------------------------------------------------------------------------- /images/dark-post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/images/dark-post.png -------------------------------------------------------------------------------- /images/light-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/images/light-home.png -------------------------------------------------------------------------------- /images/light-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/images/light-list.png -------------------------------------------------------------------------------- /images/light-post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/images/light-post.png -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/images/screenshot.png -------------------------------------------------------------------------------- /static/favicon_io/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/static/favicon_io/favicon.ico -------------------------------------------------------------------------------- /static/favicon_io/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/static/favicon_io/favicon-16x16.png -------------------------------------------------------------------------------- /static/favicon_io/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/static/favicon_io/favicon-32x32.png -------------------------------------------------------------------------------- /static/favicon_io/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/static/favicon_io/apple-touch-icon.png -------------------------------------------------------------------------------- /static/favicon_io/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/static/favicon_io/android-chrome-192x192.png -------------------------------------------------------------------------------- /static/favicon_io/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntk148v/hugo-toigian/HEAD/static/favicon_io/android-chrome-512x512.png -------------------------------------------------------------------------------- /layouts/partials/comments.html: -------------------------------------------------------------------------------- 1 | 2 | {{ template "_internal/disqus.html" . }} 3 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: '{{ replace .TranslationBaseName "-" " " | title }}' 3 | date: '{{ .Date }}' 4 | tags: [] 5 | comment: true 6 | --- 7 | -------------------------------------------------------------------------------- /layouts/shortcodes/mermaid.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 |
{{ safeHTML .Inner }}
3 | -------------------------------------------------------------------------------- /layouts/partials/date.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "overrides": [ 3 | { 4 | "files": ["*.html"], 5 | "options": { 6 | "parser": "go-template" 7 | } 8 | } 9 | ], 10 | "goTemplateBracketSpacing": true 11 | } 12 | -------------------------------------------------------------------------------- /exampleSite/content/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Welcome to Hugo Toigian" 3 | --- 4 | 5 |

Welcome to Hugo toigian

6 | 7 | {{< figure class="figure" src="favicon_io/android-chrome-192x192.png" >}} 8 | -------------------------------------------------------------------------------- /static/favicon_io/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /exampleSite/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated files by hugo 2 | /public/ 3 | /resources/_gen/ 4 | /assets/jsconfig.json 5 | hugo_stats.json 6 | 7 | # Executable may be added to repository 8 | hugo.exe 9 | hugo.darwin 10 | hugo.linux 11 | 12 | # Temporary lock file while building 13 | /.hugo_build.lock 14 | -------------------------------------------------------------------------------- /layouts/shortcodes/details.html: -------------------------------------------------------------------------------- 1 |
2 | {{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}} 3 | {{ $summary | .Page.RenderString }} 4 |
5 | {{ .Inner | .Page.RenderString }} 6 |
7 |
8 | -------------------------------------------------------------------------------- /assets/css/postcss.config.js: -------------------------------------------------------------------------------- 1 | const themeDir = __dirname + "/../../"; 2 | 3 | module.exports = { 4 | plugins: [ 5 | require("postcss-import")({ path: [themeDir] }), 6 | require("tailwindcss/nesting"), 7 | require("tailwindcss")(themeDir + "assets/css/tailwind.config.js"), 8 | require("autoprefixer")({ path: [themeDir] }), 9 | ], 10 | }; 11 | -------------------------------------------------------------------------------- /layouts/partials/font.html: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /layouts/partials/tag.html: -------------------------------------------------------------------------------- 1 | {{ range $taxonomy, $_ := .Site.Taxonomies }} 2 | {{ with $terms := $.GetTerms $taxonomy }} 3 |
4 | {{ range $n, $term := $terms }} 5 | {{ if $n }}{{ end }} 6 | {{ $term.Title }} 7 | {{ end }} 8 |
9 | {{ end }} 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /static/favicon_io/about.txt: -------------------------------------------------------------------------------- 1 | This favicon was generated using the following font: 2 | 3 | - Font Title: Imprima 4 | - Font Author: Copyright (c) 2012, Eduardo Tunni (http://www.tipo.net.ar), with Reserved Font Name "Imprima" 5 | - Font Source: http://fonts.gstatic.com/s/imprima/v16/VEMxRoN7sY3yuy-7-oWHyDzktPo.ttf 6 | - Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)) 7 | -------------------------------------------------------------------------------- /layouts/partials/toc.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{ if default true (default .Site.Params.toc .Params.toc) }} 4 | {{ if gt (.TableOfContents | countwords) 5 | 0 6 | }} 7 |
8 | Table of contents 9 |
{{ .TableOfContents }}
10 |
11 | {{ end }} 12 | {{ end }} 13 |
14 | -------------------------------------------------------------------------------- /layouts/shortcodes/quote.html: -------------------------------------------------------------------------------- 1 | {{ $level := .Get 0 }} {{ $style := "border-iris" }} 2 | {{ if eq $level "info" }} 3 | {{ $style = "border-foam" }} 4 | {{ else if eq $level "warn" }} 5 | {{ $style = "border-gold" }} 6 | {{ else if eq $level "critical" }} 7 | {{ $style = "border-love" }} 8 | {{ end }} 9 |
10 | {{ .Inner | .Page.RenderString }} 11 |
12 | -------------------------------------------------------------------------------- /assets/css/toigian.css: -------------------------------------------------------------------------------- 1 | /* Tailwind base - put variables under: tailwind.config.js */ 2 | @import "tailwindcss/base"; 3 | 4 | /* Tailwind component classes registered by plugins*/ 5 | @import "tailwindcss/components"; 6 | 7 | /* Tailwind's utility classes - generated based on config file */ 8 | @import "tailwindcss/utilities"; 9 | 10 | /* Site Specific */ 11 | @import "assets/css/site"; 12 | /* Custom defined styles */ 13 | @import "assets/css/custom"; 14 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{- partial "head.html" . -}} 4 | 5 | 6 | 7 | {{- partial "header.html" . -}} 8 |
9 |
10 | {{- partial "nav-header.html" . -}} 11 |
{{- block "main" . }}{{- end }}
12 |
13 |
14 | {{- partial "footer.html" . -}} 15 | 16 | 17 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 |
2 | 6 | 7 |
10 | {{- partial "nav-header.html" . -}} 11 |
12 |
13 | -------------------------------------------------------------------------------- /assets/css/dark.css: -------------------------------------------------------------------------------- 1 | @import "assets/css/chroma/rose-pine.css"; 2 | 3 | :root.dark { 4 | --base: var(--rp-main-base); 5 | --surface: var(--rp-main-surface); 6 | --overlay: var(--rp-main-overlay); 7 | --muted: var(--rp-main-muted); 8 | --subtle: var(--rp-main-subtle); 9 | --text: var(--rp-main-text); 10 | --highlight-low: var(--rp-main-hightlight-low); 11 | --highlight-med: var(--rp-main-hightlight-med); 12 | --highlight-high: var(--rp-main-hightlight-high); 13 | --love: var(--rp-main-love); 14 | --gold: var(--rp-main-gold); 15 | --rose: var(--rp-main-rose); 16 | --pine: var(--rp-main-pine); 17 | --foam: var(--rp-main-foam); 18 | --iris: var(--rp-main-iris); 19 | } 20 | -------------------------------------------------------------------------------- /assets/css/light.css: -------------------------------------------------------------------------------- 1 | @import "assets/css/chroma/rose-pine-dawn.css"; 2 | 3 | :root { 4 | --base: var(--rp-dawn-base); 5 | --surface: var(--rp-dawn-surface); 6 | --overlay: var(--rp-dawn-overlay); 7 | --muted: var(--rp-dawn-muted); 8 | --subtle: var(--rp-dawn-subtle); 9 | --text: var(--rp-dawn-text); 10 | --highlight-low: var(--rp-dawn-hightlight-low); 11 | --highlight-med: var(--rp-dawn-hightlight-med); 12 | --highlight-high: var(--rp-dawn-hightlight-high); 13 | --love: var(--rp-dawn-love); 14 | --gold: var(--rp-dawn-gold); 15 | --rose: var(--rp-dawn-rose); 16 | --pine: var(--rp-dawn-pine); 17 | --foam: var(--rp-dawn-foam); 18 | --iris: var(--rp-dawn-iris); 19 | } 20 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |

{{ .Title | emojify }}

3 | 4 | {{- partial "date" .Date -}}{{ if ne .Date .Lastmod }}⇢ {{- partial "date" .Lastmod -}}{{ end }} 5 | 6 | {{- partial "tag" . -}} 7 | {{- partial "toc.html" . -}} 8 | 9 | {{- partial "custom/content-before.html" . -}} 10 |
{{ .Content | emojify }}
11 | {{- partial "custom/content-after.html" . -}} 12 | 13 | {{ if and .Content (default true (default .Site.Params.comments 14 | .Params.comments)) 15 | }} 16 |
{{- partial "comments" . -}}
17 | {{ end }} 18 | {{ end }} 19 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | 3 |
{{ .Content | emojify }}
4 | {{ range .Pages.GroupByDate "2006" }} 5 |
6 |
7 | {{ .Key }} 8 |
9 |
10 | {{ range (where .Pages.ByLastmod.Reverse "Section" "!=" "") }} 11 |
12 | {{ .Title }} 13 |
14 | {{- partial "date" .Date -}} 15 |
16 |
17 | {{ end }} 18 |
19 |
20 | {{ end }} 21 | {{ end }} 22 | -------------------------------------------------------------------------------- /layouts/shortcodes/remote-github.html: -------------------------------------------------------------------------------- 1 | {{/* remote-github 2 | 3 | Description: 4 | 5 | Fetch and render remote Github content, using Github API: 6 | 7 | 8 | Usage: {{% remote-github "user/repo" "filepath" 9 | %}} 10 | 11 | Example: 12 | {{% remote-github "ntk148v/til" "linux/iptables.md" %}} 13 | */}} 14 | {{ $repo := .Get 0 }} 15 | {{ $path := .Get 1 }} 16 | {{ $url := print "https://api.github.com/repos/" $repo "/contents" $path }} 17 | {{ $resource := resources.GetRemote $url }} 18 | {{ $data := $resource | transform.Unmarshal | default (dict "error" "Unable to get remote resource") }} 19 | {{ if $data.error }} 20 | {{ $data.error }} 21 | {{ else }} 22 | {{ $data.content | base64Decode | markdownify }} 23 | {{ end }} 24 | -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | # theme.toml template for a Hugo theme 2 | # See https://github.com/gohugoio/hugoThemes#themetoml for an example 3 | 4 | name = "toigian" 5 | license = "Apache 2" 6 | licenselink = "https://github.com/ntk148v/hugo-toigian/blob/master/LICENSE" 7 | description = "A minimal Hugo theme with Tailwind CSS that covers all of the essentials. All you have to do is start typing!" 8 | # The home page of the theme, where the source can be found. 9 | homepage = "https://github.com/ntk148v/hugo-toigian" 10 | # If you have a running demo of the theme. 11 | demosite = "https://ntk148v.github.io/hugo-toigian" 12 | tags = ["minimalist", "blog", "simple", "clean"] 13 | features = ["responsive", "darkmode"] 14 | 15 | [author] 16 | name = "Kien Nguyen-Tuan" 17 | homepage = "https://github.com/ntk148v" 18 | 19 | [module] 20 | [module.hugoVersion] 21 | extended = true 22 | min = "0.93.0" 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hugo-toigian", 3 | "version": "0.0.1", 4 | "description": "A minimal Hugo theme", 5 | "main": "", 6 | "scripts": { 7 | "build": "node_modules/.bin/postcss --use autoprefixer -o assets/base.css assets/prebuild.css" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/ntk148v/hugo-toigian.git" 12 | }, 13 | "keywords": [], 14 | "author": "Kien Nguyen-Tuan ", 15 | "license": "Apache 2", 16 | "bugs": { 17 | "url": "https://github.com/ntk148v/hugo-toigian/issues" 18 | }, 19 | "homepage": "https://github.com/ntk148v/hugo-toigian#readme", 20 | "devDependencies": { 21 | "autoprefixer": "^10.4.21", 22 | "postcss": "^8.5.4", 23 | "postcss-cli": "^10.0.0", 24 | "postcss-import": "^15.1.0", 25 | "prettier-plugin-go-template": "^0.0.13", 26 | "tailwindcss": "^3.4.17" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /assets/js/main.js: -------------------------------------------------------------------------------- 1 | window.addEventListener("DOMContentLoaded", function () { 2 | const dark_mode_btn = document.getElementById("dark_mode_btn"); 3 | const light_mode_btn = document.getElementById("light_mode_btn"); 4 | 5 | if ( 6 | localStorage.theme === "dark" || 7 | (!("theme" in localStorage) && 8 | window.matchMedia("(prefers-color-scheme: dark)").matches) 9 | ) { 10 | document.documentElement.classList.add("dark"); 11 | light_mode_btn.classList.remove("hidden"); 12 | } else { 13 | document.documentElement.classList.remove("dark"); 14 | dark_mode_btn.classList.remove("hidden"); 15 | } 16 | 17 | dark_mode_btn.addEventListener("click", function () { 18 | localStorage.theme = "dark"; 19 | document.documentElement.classList.add("dark"); 20 | dark_mode_btn.classList.add("hidden"); 21 | light_mode_btn.classList.remove("hidden"); 22 | }); 23 | 24 | light_mode_btn.addEventListener("click", function () { 25 | localStorage.theme = "light"; 26 | document.documentElement.classList.remove("dark"); 27 | light_mode_btn.classList.add("hidden"); 28 | dark_mode_btn.classList.remove("hidden"); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /layouts/partials/nav-header.html: -------------------------------------------------------------------------------- 1 |
4 | 9 | 20 |
21 | 22 | {{ define "breadcrumbnav" }} 23 | {{ if .p1.Parent }} 24 | {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }} 25 | {{ else if not .p1.IsHome }} 26 | {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }} 27 | {{ end }} 28 | {{ $attr := "text-muted focus:underline focus:outline-none pr-1 whitespace-nowrap" }} 29 | {{ if eq .p1 .p2 }} 30 | {{ $attr = "focus:underline focus:outline-none font-bold pr-1 hidden md:block" }} 31 | {{ end }} 32 |
  • 33 | {{ $title := .p1.Title }} 34 | {{ if .p1.IsHome }}{{ $title = .p1.Site.Title }}{{ end }} 35 | {{ $title }} 36 |
  • 37 | {{ if ne .p1 .p2 }} 38 |
  • /
  • 39 | {{ end }} 40 | {{ end }} 41 | -------------------------------------------------------------------------------- /.github/workflows/gh-page.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | 9 | jobs: 10 | build-deploy: 11 | name: Build and Deploy 12 | runs-on: ubuntu-22.04 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v3 16 | with: 17 | submodules: true 18 | fetch-depth: 0 19 | 20 | - name: Setup Hugo 21 | uses: peaceiris/actions-hugo@v3 22 | with: 23 | hugo-version: "latest" 24 | extended: true 25 | 26 | - name: Setup Node.js 27 | uses: actions/setup-node@v3 28 | with: 29 | node-version: "18" 30 | cache: "npm" 31 | 32 | - name: Composite package.json 33 | working-directory: exampleSite 34 | run: hugo --themesDir=../.. mod npm pack 35 | 36 | - name: Clean public 37 | working-directory: exampleSite 38 | run: rm -rf ./public/* 39 | 40 | - name: Setup Dependency 41 | run: npm install 42 | 43 | - name: Build 44 | working-directory: exampleSite 45 | run: hugo --themesDir=../.. --minify --environment production -b https://ntk148v.github.io/hugo-toigian 46 | 47 | - name: Deploy 48 | uses: peaceiris/actions-gh-pages@v3 49 | if: ${{ github.ref == 'refs/heads/master' }} 50 | with: 51 | github_token: ${{ secrets.GITHUB_TOKEN }} 52 | publish_branch: gh-pages 53 | publish_dir: ./exampleSite/public 54 | -------------------------------------------------------------------------------- /exampleSite/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = 'http://example.org/' 2 | languageCode = 'en-us' 3 | title = 'Toigian' 4 | theme = "hugo-toigian" 5 | themesDir = "../.." 6 | enableGitInfo = true 7 | 8 | # (Optional) If you provide a Disqus shortname, comments will be enabled on 9 | # all pages. 10 | # disqusShortname = "my-site" 11 | 12 | [params] 13 | # (Optional, default true): Controls table of contents visibility on right side of pages. 14 | # Start and end levels can be controlled with markup.tableOfContents setting. 15 | toc = true 16 | # (Optional, default true) Enables comments template on pages 17 | # By default partials/docs/comments.html includes Disqus template 18 | # See https://gohugo.io/content-management/comments/#configure-disqus 19 | # Can be overwritten by same param in page frontmatter 20 | comments = true 21 | 22 | [params.author] 23 | name = "Kien Nguyen-Tuan" 24 | email = "kiennt2609@gmail.com" 25 | 26 | [markup] 27 | defaultMarkdownHandler = "goldmark" 28 | # By default, Goldmark trims unsafe outputs which might prevent some shortcodes from rendering. 29 | # It is recommended to set markup.goldmark.renderer.unsafe=true if you encounter problems. 30 | [markup.goldmark] 31 | [markup.goldmark.renderer] 32 | unsafe = true # Enable user to embed HTML snippets in Markdown content. 33 | [markup.highlight] 34 | codeFences = true 35 | guessSyntax = true 36 | lineNos = false 37 | noClasses = false 38 | tabWidth = 4 39 | [markup.tableOfContents] 40 | startLevel = 2 41 | endLevel = 4 42 | ordered = true 43 | 44 | # The left side navbar at the top 45 | [menu] 46 | [[menu.nav]] 47 | name = "About" 48 | url = "/about" 49 | weight = 2 50 | 51 | [[menu.nav]] 52 | name = "Posts" 53 | url = "/posts" 54 | weight = 3 55 | 56 | [build] 57 | writeStats = true 58 | 59 | [frontmatter] 60 | date = ['date', 'publishDate', 'lastmod'] 61 | expiryDate = ['expiryDate'] 62 | lastmod = [':git', 'lastmod', 'date', 'publishDate'] 63 | publishDate = ['publishDate', 'date'] 64 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 |
    2 | 72 |
    73 | -------------------------------------------------------------------------------- /assets/css/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | const themeDir = __dirname + "/../../"; 3 | const defaultTheme = require("tailwindcss/defaultTheme"); 4 | module.exports = { 5 | darkMode: "class", 6 | content: [ 7 | themeDir + "layouts/**/*.html", 8 | themeDir + "content/**/*.html", 9 | "layouts/**/*.html", 10 | "content/**/*.html", 11 | "exampleSite/layouts/**/*.html", 12 | "exampleSite/content/**/*.html", 13 | ], 14 | theme: { 15 | extend: { 16 | fontFamily: { 17 | sans: ['var(--font-sans)', ...defaultTheme.fontFamily.sans], 18 | mono: ['var(--font-mono)', ...defaultTheme.fontFamily.mono], 19 | }, 20 | spacing: { 21 | "page-top": "var(--page-top)", 22 | "page-gutter": "var(--page-gutter)", 23 | "header-height": "var(--header-height)", 24 | "footer-height": "var(--footer-height)", 25 | "sidebar-top": "var(--sidebar-top)", 26 | }, 27 | maxWidth: { 28 | content: "var(--content-width)", 29 | }, 30 | minHeight: { 31 | content: "var(--content-height)", 32 | }, 33 | fontSize: { 34 | xs: "0.75rem", // 12px 35 | sm: "0.875rem", // 14px 36 | md: "15px", // 15px 37 | base: "1rem", // 16px 38 | lg: "1.125rem", // 18px 39 | xl: "1.25rem", // 20px 40 | "2xl": "1.5rem", // 24px 41 | "3xl": "1.875rem",// 30px 42 | "4xl": "2.25rem", // 36px 43 | }, 44 | spacing: { 45 | ...defaultTheme.spacing, 46 | "page-top": "var(--page-top)", 47 | "page-gutter": "var(--page-gutter)", 48 | "header-height": "var(--header-height)", 49 | "footer-height": "var(--footer-height)", 50 | "sidebar-top": "var(--sidebar-top)", 51 | }, 52 | borderRadius: { 53 | none: "0", 54 | sm: "0.25rem", // 4px 55 | DEFAULT: "0.375rem",// 6px 56 | md: "0.5rem", // 8px 57 | lg: "0.75rem", // 12px 58 | xl: "1rem", // 16px 59 | }, 60 | boxShadow: { 61 | sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)", 62 | DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)", 63 | md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)", 64 | lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)", 65 | }, 66 | colors: { 67 | base: "var(--base)", 68 | surface: "var(--surface)", 69 | overlay: "var(--overlay)", 70 | muted: "var(--muted)", 71 | subtle: "var(--subtle)", 72 | text: "var(--text)", 73 | "highlight-low": "var(--hightlight-low)", 74 | "highlight-med": "var(--hightlight-med)", 75 | "highlight-high": "var(--hightlight-high)", 76 | love: "var(--love)", 77 | gold: "var(--gold)", 78 | rose: "var(--rose)", 79 | pine: "var(--pine)", 80 | foam: "var(--foam)", 81 | iris: "var(--iris)", 82 | }, 83 | borderColor: (theme) => ({ 84 | DEFAULT: theme("colors.overlay", "currentColor"), 85 | }), 86 | }, 87 | }, 88 | plugins: [], 89 | }; 90 | -------------------------------------------------------------------------------- /exampleSite/content/posts/hugoisforlovers.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Getting Started with Hugo" 3 | date: 2022-10-26T17:12:11+07:00 4 | comment: true 5 | tags: ["hugo"] 6 | --- 7 | 8 | # Step 1. Install Hugo 9 | 10 | Go to [Hugo releases](https://github.com/spf13/hugo/releases) and download the 11 | appropriate version for your OS and architecture. 12 | 13 | Save it somewhere specific as we will be using it in the next step. 14 | 15 | More complete instructions are available at [Install Hugo](https://gohugo.io/getting-started/installing/) 16 | 17 | ## Step 2. Build the Docs 18 | 19 | Hugo has its own example site which happens to also be the documentation site 20 | you are reading right now. 21 | 22 | Follow the following steps: 23 | 24 | ``` 25 | 1. Clone the [Hugo repository](http://github.com/spf13/hugo) 26 | 2. Go into the repo 27 | 3. Run hugo in server mode and build the docs 28 | 4. Open your browser to http://localhost:1313 29 | ``` 30 | 31 | Corresponding pseudo commands: 32 | 33 | ```shell 34 | git clone https://github.com/spf13/hugo 35 | cd hugo 36 | /path/to/where/you/installed/hugo server --source=./docs 37 | > 29 pages created 38 | > 0 tags index created 39 | > in 27 ms 40 | > Web Server is available at http://localhost:1313 41 | > Press ctrl+c to stop 42 | ``` 43 | 44 | Once you've gotten here, follow along the rest of this page on your local build. 45 | 46 | ## Step 3. Change the docs site 47 | 48 | Stop the Hugo process by hitting Ctrl+C. 49 | 50 | Now we are going to run hugo again, but this time with hugo in watch mode. 51 | 52 | ```shell 53 | /path/to/hugo/from/step/1/hugo server --source=./docs --watch 54 | > 29 pages created 55 | > 0 tags index created 56 | > in 27 ms 57 | > Web Server is available at http://localhost:1313 58 | > Watching for changes in /Users/spf13/Code/hugo/docs/content 59 | > Press ctrl+c to stop 60 | ``` 61 | 62 | Open your [favorite editor](http://vim.spf13.com) and change one of the source 63 | content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*. 64 | 65 | Content files are found in `docs/content/`. Unless otherwise specified, files 66 | are located at the same relative location as the url, in our case 67 | `docs/content/overview/quickstart.md`. 68 | 69 | Change and save this file.. Notice what happened in your terminal. 70 | 71 | ```shell 72 | > Change detected, rebuilding site 73 | 74 | > 29 pages created 75 | > 0 tags index created 76 | > in 26 ms 77 | ``` 78 | 79 | Refresh the browser and observe that the typo is now fixed. 80 | 81 | Notice how quick that was. Try to refresh the site before it's finished building. I double dare you. 82 | Having nearly instant feedback enables you to have your creativity flow without waiting for long builds. 83 | 84 | ## Step 4. Have fun 85 | 86 | The best way to learn something is to play with it. 87 | 88 | - Minimalist (`tối giản`) design. Highly inspired by [mellow.dev](https://mellow.dev/). 89 | - Use the classy minimalist [Rosé Pine](https://github.com/rose-pine/palette) color palette. 90 | - Customizable. 91 | - Support light/dark mode. 92 | - Useful shortcodes. 93 | - Comments support. 94 | - Syntax highlighting: use server-side solution (Chroma, hugo built-in), I've added [Rosé Pine styles to Chroma](https://github.com/alecthomas/chroma/pull/689), so everything is the same vibe. 95 | -------------------------------------------------------------------------------- /exampleSite/content/posts/shortcodes.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Hugo Shortcodes" 3 | date: 2022-10-21T17:12:11+07:00 4 | comment: true 5 | tags: ["hugo", "tech", "shortcode"] 6 | --- 7 | 8 | ## Details 9 | 10 | Details shortcode is a helper for `details` html5 element. It is going to replace `expand` shortcode. 11 | 12 | ### Example 13 | 14 | ```tpl 15 | {{}} 16 | ## Markdown content 17 | Lorem markdownum insigne... 18 | {{}} 19 | ``` 20 | 21 | ```tpl 22 | {{}} 23 | ## Markdown content 24 | Lorem markdownum insigne... 25 | {{}} 26 | ``` 27 | 28 | {{< details "Title" >}} 29 | ## Markdown content 30 | Lorem markdownum insigne... 31 | {{< /details >}} 32 | 33 | ## Quote 34 | 35 | Quote shortcode can be used with 3 colors: `info`, `warn` and `critical`. 36 | 37 | ```tpl 38 | {{}} 39 | **Markdown content** 40 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 41 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 42 | {{}} 43 | ``` 44 | 45 | ### Example 46 | 47 | {{< quote info >}} 48 | **Markdown content** 49 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 50 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 51 | {{< /quote >}} 52 | 53 | {{< quote warn >}} 54 | **Markdown content** 55 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 56 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 57 | {{< /quote >}} 58 | 59 | {{< quote critical >}} 60 | **Markdown content** 61 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 62 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 63 | {{< /quote >}} 64 | 65 | ## Mermaid 66 | 67 | [Mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown. 68 | 69 | ```tpl 70 | {{}} 71 | 72 | {{}} 73 | ``` 74 | 75 | ### Example 76 | 77 | {{< mermaid >}} 78 | sequenceDiagram 79 | participant Alice 80 | participant Bob 81 | Alice->>John: Hello John, how are you? 82 | loop Healthcheck 83 | John->>John: Fight against hypochondria 84 | end 85 | Note right of John: Rational thoughts
    prevail! 86 | John-->>Alice: Great! 87 | John->>Bob: How about you? 88 | Bob-->>John: Jolly good! 89 | {{< /mermaid >}} 90 | 91 | ## Remote Github 92 | 93 | Hugo is great in many ways. However as a static site generator it doesn’t offer much to embed external content in your pages. Remote-github shortcode helps you to render Github remote content using [Github API](https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#get-repository-content). 94 | 95 | This shortcode is inspired from [this issue](https://discourse.gohugo.io/t/include-content-of-a-url/27357). 96 | 97 | ```tpl 98 | {{%/* remote-github "user/repo" "filepath" */%}} 99 | ``` 100 | 101 | ### Example 102 | 103 | **The following content is render from my [til post](https://github.com/ntk148v/til/blob/master/linux/iptables.md).** 104 | 105 | {{% remote-github "ntk148v/til" "linux/iptables.md" %}} 106 | -------------------------------------------------------------------------------- /assets/css/chroma/rose-pine.css: -------------------------------------------------------------------------------- 1 | /* Background */ .bg { color: #e0def4; background-color: #191724; } 2 | /* PreWrapper */ .chroma { color: #e0def4; background-color: #191724; } 3 | /* Error */ .chroma .err { color: #eb6f92 } 4 | /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } 5 | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } 6 | /* LineHighlight */ .chroma .hl { background-color: #302e39 } 7 | /* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 8 | /* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 9 | /* Line */ .chroma .line { display: flex; } 10 | /* Keyword */ .chroma .k { color: #31748f } 11 | /* KeywordConstant */ .chroma .kc { color: #31748f } 12 | /* KeywordDeclaration */ .chroma .kd { color: #31748f } 13 | /* KeywordNamespace */ .chroma .kn { color: #c4a7e7 } 14 | /* KeywordPseudo */ .chroma .kp { color: #31748f } 15 | /* KeywordReserved */ .chroma .kr { color: #31748f } 16 | /* KeywordType */ .chroma .kt { color: #31748f } 17 | /* Name */ .chroma .n { color: #ebbcba } 18 | /* NameAttribute */ .chroma .na { color: #ebbcba } 19 | /* NameBuiltin */ .chroma .nb { color: #ebbcba } 20 | /* NameBuiltinPseudo */ .chroma .bp { color: #ebbcba } 21 | /* NameClass */ .chroma .nc { color: #9ccfd8 } 22 | /* NameConstant */ .chroma .no { color: #f6c177 } 23 | /* NameDecorator */ .chroma .nd { color: #908caa } 24 | /* NameEntity */ .chroma .ni { color: #ebbcba } 25 | /* NameException */ .chroma .ne { color: #31748f } 26 | /* NameFunction */ .chroma .nf { color: #ebbcba } 27 | /* NameFunctionMagic */ .chroma .fm { color: #ebbcba } 28 | /* NameLabel */ .chroma .nl { color: #ebbcba } 29 | /* NameNamespace */ .chroma .nn { color: #ebbcba } 30 | /* NameProperty */ .chroma .py { color: #ebbcba } 31 | /* NameTag */ .chroma .nt { color: #ebbcba } 32 | /* NameVariable */ .chroma .nv { color: #ebbcba } 33 | /* NameVariableClass */ .chroma .vc { color: #ebbcba } 34 | /* NameVariableGlobal */ .chroma .vg { color: #ebbcba } 35 | /* NameVariableInstance */ .chroma .vi { color: #ebbcba } 36 | /* NameVariableMagic */ .chroma .vm { color: #ebbcba } 37 | /* Literal */ .chroma .l { color: #f6c177 } 38 | /* LiteralDate */ .chroma .ld { color: #f6c177 } 39 | /* LiteralString */ .chroma .s { color: #f6c177 } 40 | /* LiteralStringAffix */ .chroma .sa { color: #f6c177 } 41 | /* LiteralStringBacktick */ .chroma .sb { color: #f6c177 } 42 | /* LiteralStringChar */ .chroma .sc { color: #f6c177 } 43 | /* LiteralStringDelimiter */ .chroma .dl { color: #f6c177 } 44 | /* LiteralStringDoc */ .chroma .sd { color: #f6c177 } 45 | /* LiteralStringDouble */ .chroma .s2 { color: #f6c177 } 46 | /* LiteralStringEscape */ .chroma .se { color: #31748f } 47 | /* LiteralStringHeredoc */ .chroma .sh { color: #f6c177 } 48 | /* LiteralStringInterpol */ .chroma .si { color: #f6c177 } 49 | /* LiteralStringOther */ .chroma .sx { color: #f6c177 } 50 | /* LiteralStringRegex */ .chroma .sr { color: #f6c177 } 51 | /* LiteralStringSingle */ .chroma .s1 { color: #f6c177 } 52 | /* LiteralStringSymbol */ .chroma .ss { color: #f6c177 } 53 | /* LiteralNumber */ .chroma .m { color: #f6c177 } 54 | /* LiteralNumberBin */ .chroma .mb { color: #f6c177 } 55 | /* LiteralNumberFloat */ .chroma .mf { color: #f6c177 } 56 | /* LiteralNumberHex */ .chroma .mh { color: #f6c177 } 57 | /* LiteralNumberInteger */ .chroma .mi { color: #f6c177 } 58 | /* LiteralNumberIntegerLong */ .chroma .il { color: #f6c177 } 59 | /* LiteralNumberOct */ .chroma .mo { color: #f6c177 } 60 | /* Operator */ .chroma .o { color: #908caa } 61 | /* OperatorWord */ .chroma .ow { color: #908caa } 62 | /* Punctuation */ .chroma .p { color: #908caa } 63 | /* Comment */ .chroma .c { color: #6e6a86 } 64 | /* CommentHashbang */ .chroma .ch { color: #6e6a86 } 65 | /* CommentMultiline */ .chroma .cm { color: #6e6a86 } 66 | /* CommentSingle */ .chroma .c1 { color: #6e6a86 } 67 | /* CommentSpecial */ .chroma .cs { color: #6e6a86 } 68 | /* CommentPreproc */ .chroma .cp { color: #6e6a86 } 69 | /* CommentPreprocFile */ .chroma .cpf { color: #6e6a86 } 70 | /* GenericDeleted */ .chroma .gd { color: #eb6f92 } 71 | /* GenericEmph */ .chroma .ge { font-style: italic } 72 | /* GenericInserted */ .chroma .gi { color: #9ccfd8 } 73 | /* GenericStrong */ .chroma .gs { font-weight: bold } 74 | /* GenericSubheading */ .chroma .gu { color: #c4a7e7 } 75 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | {{ block "title" . }} 10 | {{ .Site.Title }} 11 | {{ with .Params.Title }}| {{ . }}{{ end }} 12 | {{ end }} 13 | 14 | 15 | 16 | 17 | {{/* favicon */}} 18 | 23 | 29 | 35 | 36 | {{/* Rose pine */}} 37 | {{- $rosepine := resources.Get "css/rose-pine.min.css" -}} 38 | 46 | 54 | 55 | {{- partial "font.html" . -}} 56 | 57 | {{/* Site CSS */}} 58 | {{- $styles := resources.Get "css/toigian.css" | postCSS (dict "config" "./assets/css/postcss.config.js") -}} 59 | {{- $light_theme := resources.Get "css/light.css" | postCSS (dict "config" "./assets/css/postcss.config.js") -}} 60 | {{- $dark_theme := resources.Get "css/dark.css" | postCSS (dict "config" "./assets/css/postcss.config.js") -}} 61 | {{- if not hugo.IsServer }} 62 | {{- $styles = $styles | minify | fingerprint | resources.PostProcess -}} 63 | {{- $light_theme = $light_theme | minify | fingerprint | resources.PostProcess -}} 64 | {{- $dark_theme = $dark_theme | minify | fingerprint | resources.PostProcess -}} 65 | {{ end -}} 66 | 67 | 68 | 76 | 84 | 85 | {{/* Light and dark themes */}} 86 | 92 | 98 | 99 | 111 | 112 | {{/* Main */}} 113 | {{ $main_js := resources.Get "js/main.js" }} 114 | {{- if hugo.IsProduction -}} 115 | {{ $main_js = $main_js | js.Build (dict "minify" true) | resources.Fingerprint "sha512" -}} 116 | {{- else -}} 117 | {{ $main_js = $main_js | js.Build -}} 118 | {{- end -}} 119 | 120 | 121 | 122 | 128 | 129 | 132 | 133 | {{ partial "custom/head.html" . }} 134 | 135 | -------------------------------------------------------------------------------- /assets/css/chroma/rose-pine-dawn.css: -------------------------------------------------------------------------------- 1 | /* Background */ .dark .bg { color: #575279; background-color: #faf4ed; } 2 | /* PreWrapper */ .dark .chroma { color: #575279; background-color: #faf4ed; } 3 | /* Error */ .dark .chroma .err { color: #b4637a } 4 | /* LineTableTD */ .dark .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } 5 | /* LineTable */ .dark .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } 6 | /* LineHighlight */ .dark .chroma .hl { background-color: #e1dbd5 } 7 | /* LineNumbersTable */ .dark .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 8 | /* LineNumbers */ .dark .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } 9 | /* Line */ .dark .chroma .line { display: flex; } 10 | /* Keyword */ .dark .chroma .k { color: #286983 } 11 | /* KeywordConstant */ .dark .chroma .kc { color: #286983 } 12 | /* KeywordDeclaration */ .dark .chroma .kd { color: #286983 } 13 | /* KeywordNamespace */ .dark .chroma .kn { color: #907aa9 } 14 | /* KeywordPseudo */ .dark .chroma .kp { color: #286983 } 15 | /* KeywordReserved */ .dark .chroma .kr { color: #286983 } 16 | /* KeywordType */ .dark .chroma .kt { color: #286983 } 17 | /* Name */ .dark .chroma .n { color: #d7827e } 18 | /* NameAttribute */ .dark .chroma .na { color: #d7827e } 19 | /* NameBuiltin */ .dark .chroma .nb { color: #d7827e } 20 | /* NameBuiltinPseudo */ .dark .chroma .bp { color: #d7827e } 21 | /* NameClass */ .dark .chroma .nc { color: #56949f } 22 | /* NameConstant */ .dark .chroma .no { color: #ea9d34 } 23 | /* NameDecorator */ .dark .chroma .nd { color: #797593 } 24 | /* NameEntity */ .dark .chroma .ni { color: #d7827e } 25 | /* NameException */ .dark .chroma .ne { color: #286983 } 26 | /* NameFunction */ .dark .chroma .nf { color: #d7827e } 27 | /* NameFunctionMagic */ .dark .chroma .fm { color: #d7827e } 28 | /* NameLabel */ .dark .chroma .nl { color: #d7827e } 29 | /* NameNamespace */ .dark .chroma .nn { color: #d7827e } 30 | /* NameProperty */ .dark .chroma .py { color: #d7827e } 31 | /* NameTag */ .dark .chroma .nt { color: #d7827e } 32 | /* NameVariable */ .dark .chroma .nv { color: #d7827e } 33 | /* NameVariableClass */ .dark .chroma .vc { color: #d7827e } 34 | /* NameVariableGlobal */ .dark .chroma .vg { color: #d7827e } 35 | /* NameVariableInstance */ .dark .chroma .vi { color: #d7827e } 36 | /* NameVariableMagic */ .dark .chroma .vm { color: #d7827e } 37 | /* Literal */ .dark .chroma .l { color: #ea9d34 } 38 | /* LiteralDate */ .dark .chroma .ld { color: #ea9d34 } 39 | /* LiteralString */ .dark .chroma .s { color: #ea9d34 } 40 | /* LiteralStringAffix */ .dark .chroma .sa { color: #ea9d34 } 41 | /* LiteralStringBacktick */ .dark .chroma .sb { color: #ea9d34 } 42 | /* LiteralStringChar */ .dark .chroma .sc { color: #ea9d34 } 43 | /* LiteralStringDelimiter */ .dark .chroma .dl { color: #ea9d34 } 44 | /* LiteralStringDoc */ .dark .chroma .sd { color: #ea9d34 } 45 | /* LiteralStringDouble */ .dark .chroma .s2 { color: #ea9d34 } 46 | /* LiteralStringEscape */ .dark .chroma .se { color: #286983 } 47 | /* LiteralStringHeredoc */ .dark .chroma .sh { color: #ea9d34 } 48 | /* LiteralStringInterpol */ .dark .chroma .si { color: #ea9d34 } 49 | /* LiteralStringOther */ .dark .chroma .sx { color: #ea9d34 } 50 | /* LiteralStringRegex */ .dark .chroma .sr { color: #ea9d34 } 51 | /* LiteralStringSingle */ .dark .chroma .s1 { color: #ea9d34 } 52 | /* LiteralStringSymbol */ .dark .chroma .ss { color: #ea9d34 } 53 | /* LiteralNumber */ .dark .chroma .m { color: #ea9d34 } 54 | /* LiteralNumberBin */ .dark .chroma .mb { color: #ea9d34 } 55 | /* LiteralNumberFloat */ .dark .chroma .mf { color: #ea9d34 } 56 | /* LiteralNumberHex */ .dark .chroma .mh { color: #ea9d34 } 57 | /* LiteralNumberInteger */ .dark .chroma .mi { color: #ea9d34 } 58 | /* LiteralNumberIntegerLong */ .dark .chroma .il { color: #ea9d34 } 59 | /* LiteralNumberOct */ .dark .chroma .mo { color: #ea9d34 } 60 | /* Operator */ .dark .chroma .o { color: #797593 } 61 | /* OperatorWord */ .dark .chroma .ow { color: #797593 } 62 | /* Punctuation */ .dark .chroma .p { color: #797593 } 63 | /* Comment */ .dark .chroma .c { color: #9893a5 } 64 | /* CommentHashbang */ .dark .chroma .ch { color: #9893a5 } 65 | /* CommentMultiline */ .dark .chroma .cm { color: #9893a5 } 66 | /* CommentSingle */ .dark .chroma .c1 { color: #9893a5 } 67 | /* CommentSpecial */ .dark .chroma .cs { color: #9893a5 } 68 | /* CommentPreproc */ .dark .chroma .cp { color: #9893a5 } 69 | /* CommentPreprocFile */ .dark .chroma .cpf { color: #9893a5 } 70 | /* GenericDeleted */ .dark .chroma .gd { color: #b4637a } 71 | /* GenericEmph */ .dark .chroma .ge { font-style: italic } 72 | /* GenericInserted */ .dark .chroma .gi { color: #56949f } 73 | /* GenericStrong */ .dark .chroma .gs { font-weight: bold } 74 | /* GenericSubheading */ .dark .chroma .gu { color: #907aa9 } 75 | -------------------------------------------------------------------------------- /assets/css/rose-pine.min.css: -------------------------------------------------------------------------------- 1 | :root{--rp-main-base:#191724;--rp-main-base-rgb:rgb(25, 23, 36);--rp-main-base-hsl:hsl(249, 22%, 12%);--rp-main-surface:#1f1d2e;--rp-main-surface-rgb:rgb(31, 29, 46);--rp-main-surface-hsl:hsl(247, 23%, 15%);--rp-main-overlay:#26233a;--rp-main-overlay-rgb:rgb(38, 35, 58);--rp-main-overlay-hsl:hsl(248, 25%, 18%);--rp-main-muted:#6e6a86;--rp-main-muted-rgb:rgb(110, 106, 134);--rp-main-muted-hsl:hsl(249, 12%, 47%);--rp-main-subtle:#908caa;--rp-main-subtle-rgb:rgb(144, 140, 170);--rp-main-subtle-hsl:hsl(248, 15%, 61%);--rp-main-text:#e0def4;--rp-main-text-rgb:rgb(224, 222, 244);--rp-main-text-hsl:hsl(245, 50%, 91%);--rp-main-love:#eb6f92;--rp-main-love-rgb:rgb(235, 111, 146);--rp-main-love-hsl:hsl(343, 76%, 68%);--rp-main-gold:#f6c177;--rp-main-gold-rgb:rgb(246, 193, 119);--rp-main-gold-hsl:hsl(35, 88%, 72%);--rp-main-rose:#ebbcba;--rp-main-rose-rgb:rgb(235, 188, 186);--rp-main-rose-hsl:hsl(2, 55%, 83%);--rp-main-pine:#31748f;--rp-main-pine-rgb:rgb(49, 116, 143);--rp-main-pine-hsl:hsl(197, 49%, 38%);--rp-main-foam:#9ccfd8;--rp-main-foam-rgb:rgb(156, 207, 216);--rp-main-foam-hsl:hsl(189, 43%, 73%);--rp-main-iris:#c4a7e7;--rp-main-iris-rgb:rgb(196, 167, 231);--rp-main-iris-hsl:hsl(267, 57%, 78%);--rp-main-highlight-low:#21202e;--rp-main-highlight-low-rgb:rgb(33, 32, 46);--rp-main-highlight-low-hsl:hsl(244, 18%, 15%);--rp-main-highlight-low-alpha:#6e6a861a;--rp-main-highlight-low-alpha-rgb:rgba(110, 106, 134, 0.1);--rp-main-highlight-low-alpha-hsl:hsla(249, 12%, 47%, 0.1);--rp-main-highlight-med:#403d52;--rp-main-highlight-med-rgb:rgb(64, 61, 82);--rp-main-highlight-med-hsl:hsl(249, 15%, 28%);--rp-main-highlight-med-alpha:#6e6a8633;--rp-main-highlight-med-alpha-rgb:rgba(110, 106, 134, 0.2);--rp-main-highlight-med-alpha-hsl:hsla(249, 12%, 47%, 0.2);--rp-main-highlight-high:#524f67;--rp-main-highlight-high-rgb:rgb(82, 79, 103);--rp-main-highlight-high-hsl:hsl(248, 13%, 36%);--rp-main-highlight-high-alpha:#6e6a8666;--rp-main-highlight-high-alpha-rgb:rgba(110, 106, 134, 0.4);--rp-main-highlight-high-alpha-hsl:hsla(249, 12%, 47%, 0.4);--rp-moon-base:#232136;--rp-moon-base-rgb:rgb(35, 33, 54);--rp-moon-base-hsl:hsl(246, 24%, 17%);--rp-moon-surface:#2a273f;--rp-moon-surface-rgb:rgb(42, 39, 63);--rp-moon-surface-hsl:hsl(248, 24%, 20%);--rp-moon-overlay:#393552;--rp-moon-overlay-rgb:rgb(57, 53, 82);--rp-moon-overlay-hsl:hsl(248, 21%, 26%);--rp-moon-muted:#6e6a86;--rp-moon-muted-rgb:rgb(110, 106, 134);--rp-moon-muted-hsl:hsl(249, 12%, 47%);--rp-moon-subtle:#908caa;--rp-moon-subtle-rgb:rgb(144, 140, 170);--rp-moon-subtle-hsl:hsl(248, 15%, 61%);--rp-moon-text:#e0def4;--rp-moon-text-rgb:rgb(224, 222, 244);--rp-moon-text-hsl:hsl(245, 50%, 91%);--rp-moon-love:#eb6f92;--rp-moon-love-rgb:rgb(235, 111, 146);--rp-moon-love-hsl:hsl(343, 76%, 68%);--rp-moon-gold:#f6c177;--rp-moon-gold-rgb:rgb(246, 193, 119);--rp-moon-gold-hsl:hsl(35, 88%, 72%);--rp-moon-rose:#ea9a97;--rp-moon-rose-rgb:rgb(234, 154, 151);--rp-moon-rose-hsl:hsl(2, 66%, 75%);--rp-moon-pine:#3e8fb0;--rp-moon-pine-rgb:rgb(62, 143, 176);--rp-moon-pine-hsl:hsl(197, 48%, 47%);--rp-moon-foam:#9ccfd8;--rp-moon-foam-rgb:rgb(156, 207, 216);--rp-moon-foam-hsl:hsl(189, 43%, 73%);--rp-moon-iris:#c4a7e7;--rp-moon-iris-rgb:rgb(196, 167, 231);--rp-moon-iris-hsl:hsl(267, 57%, 78%);--rp-moon-highlight-low:#2a283e;--rp-moon-highlight-low-rgb:rgb(42, 40, 62);--rp-moon-highlight-low-hsl:hsl(245, 22%, 20%);--rp-moon-highlight-low-alpha:#817c9c14;--rp-moon-highlight-low-alpha-rgb:rgba(129, 124, 156, 0.08);--rp-moon-highlight-low-alpha-hsl:hsla(249, 14%, 55%, 0.08);--rp-moon-highlight-med:#44415a;--rp-moon-highlight-med-rgb:rgb(68, 65, 90);--rp-moon-highlight-med-hsl:hsl(247, 16%, 30%);--rp-moon-highlight-med-alpha:#817c9c26;--rp-moon-highlight-med-alpha-rgb:rgba(129, 124, 156, 0.15);--rp-moon-highlight-med-alpha-hsl:hsla(249, 14%, 55%, 0.15);--rp-moon-highlight-high:#56526e;--rp-moon-highlight-high-rgb:rgb(86, 82, 110);--rp-moon-highlight-high-hsl:hsl(249, 15%, 38%);--rp-moon-highlight-high-alpha:#817c9c4d;--rp-moon-highlight-high-alpha-rgb:rgba(129, 124, 156, 0.3);--rp-moon-highlight-high-alpha-hsl:hsla(249, 14%, 55%, 0.3);--rp-dawn-base:#faf4ed;--rp-dawn-base-rgb:rgb(250, 244, 237);--rp-dawn-base-hsl:hsl(32, 57%, 95%);--rp-dawn-surface:#fffaf3;--rp-dawn-surface-rgb:rgb(255, 250, 243);--rp-dawn-surface-hsl:hsl(35, 100%, 98%);--rp-dawn-overlay:#f2e9e1;--rp-dawn-overlay-rgb:rgb(242, 233, 222);--rp-dawn-overlay-hsl:hsl(33, 43%, 91%);--rp-dawn-muted:#9893a5;--rp-dawn-muted-rgb:rgb(152, 147, 165);--rp-dawn-muted-hsl:hsl(257, 9%, 61%);--rp-dawn-subtle:#797593;--rp-dawn-subtle-rgb:rgb(121, 117, 147);--rp-dawn-subtle-hsl:hsl(248, 12%, 52%);--rp-dawn-text:#575279;--rp-dawn-text-rgb:rgb(87, 82, 121);--rp-dawn-text-hsl:hsl(248, 19%, 40%);--rp-dawn-love:#b4637a;--rp-dawn-love-rgb:rgb(180, 99, 122);--rp-dawn-love-hsl:hsl(343, 35%, 55%);--rp-dawn-gold:#ea9d34;--rp-dawn-gold-rgb:rgb(234, 157, 52);--rp-dawn-gold-hsl:hsl(35, 81%, 56%);--rp-dawn-rose:#d7827e;--rp-dawn-rose-rgb:rgb(215, 130, 126);--rp-dawn-rose-hsl:hsl(3, 53%, 67%);--rp-dawn-pine:#286983;--rp-dawn-pine-rgb:rgb(40, 105, 131);--rp-dawn-pine-hsl:hsl(197, 53%, 34%);--rp-dawn-foam:#56949f;--rp-dawn-foam-rgb:rgb(86, 148, 159);--rp-dawn-foam-hsl:hsl(189, 30%, 48%);--rp-dawn-iris:#907aa9;--rp-dawn-iris-rgb:rgb(144, 122, 169);--rp-dawn-iris-hsl:hsl(268, 21%, 57%);--rp-dawn-highlight-low:#f4ede8;--rp-dawn-highlight-low-rgb:rgb(244, 237, 232);--rp-dawn-highlight-low-hsl:hsl(25, 35%, 93%);--rp-dawn-highlight-low-alpha:#6e6a860d;--rp-dawn-highlight-low-alpha-rgb:rgba(110, 106, 134, 0.05);--rp-dawn-highlight-low-alpha-hsl:hsla(249, 12%, 47%, 0.05);--rp-dawn-highlight-med:#dfdad9;--rp-dawn-highlight-med-rgb:rgb(223, 218, 217);--rp-dawn-highlight-med-hsl:hsl(10, 9%, 86%);--rp-dawn-highlight-med-alpha:#6e6a8614;--rp-dawn-highlight-med-alpha-rgb:rgba(110, 106, 134, 0.08);--rp-dawn-highlight-med-alpha-hsl:hsla(249, 12%, 47%, 0.08);--rp-dawn-highlight-high:#cecacd;--rp-dawn-highlight-high-rgb:rgb(206, 202, 205);--rp-dawn-highlight-high-hsl:hsl(315, 4%, 80%);--rp-dawn-highlight-high-alpha:#6e6a8626;--rp-dawn-highlight-high-alpha-rgb:rgba(110, 106, 134, 0.15);--rp-dawn-highlight-high-alpha-hsl:hsla(249, 12%, 47%, 0.15)} -------------------------------------------------------------------------------- /assets/css/site.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --font-sans: sans-serif; 3 | --font-mono: monospace, monospace; 4 | --font-serif: serif; 5 | --page-top: 64px; 6 | --page-gutter: 24px; 7 | --header-height: 48px; 8 | --footer-height: 96px; 9 | --sidebar-top: 72px; 10 | 11 | --content-width: 40rem; 12 | --content-height: calc(100vh - (var(--page-top) * 2) - var(--footer-height)); 13 | 14 | @media (min-width: 640px) { 15 | --page-top: 192px; 16 | --page-gutter: 48px; 17 | --footer-height: 48px; 18 | } 19 | } 20 | 21 | html { 22 | @apply scroll-smooth font-sans tabular-nums; 23 | 24 | @media (prefers-reduced-motion: reduce) { 25 | @apply scroll-auto; 26 | } 27 | } 28 | 29 | ::-webkit-scrollbar { 30 | width: 0; /* Remove scrollbar space */ 31 | background: transparent; /* Optional: just make scrollbar invisible */ 32 | } 33 | 34 | body { 35 | @apply bg-base text-text text-md antialiased selection:bg-subtle selection:text-surface break-normal; 36 | } 37 | 38 | & a { 39 | @apply break-all; 40 | } 41 | 42 | /* ################################# */ 43 | /* # Overall design # */ 44 | /* ################################# */ 45 | h1, 46 | h2, 47 | h3, 48 | h4, 49 | h5, 50 | h6 { 51 | @apply font-bold pt-6 pb-4 tracking-tight; 52 | } 53 | 54 | h1 { 55 | @apply text-4xl mb-8; 56 | } 57 | 58 | h2 { 59 | @apply text-3xl mt-12 mb-6; 60 | counter-increment: h2; 61 | counter-reset: h3; 62 | } 63 | 64 | h3 { 65 | @apply text-2xl mt-8 mb-4; 66 | counter-increment: h3; 67 | counter-reset: h4; 68 | } 69 | 70 | h4 { 71 | @apply text-xl mt-6 mb-4; 72 | counter-increment: h4; 73 | } 74 | 75 | h5 { 76 | @apply text-lg mt-4 mb-2; 77 | } 78 | 79 | h6 { 80 | @apply text-base font-semibold mt-4 mb-2; 81 | } 82 | 83 | /* nested counters */ 84 | h2::before { 85 | @apply text-muted mr-2 -ml-3; 86 | content: counter(h2) ". "; 87 | } 88 | 89 | h3::before { 90 | @apply text-muted mr-2 -ml-3; 91 | content: counter(h2) "." counter(h3) ". "; 92 | } 93 | 94 | h4::before { 95 | @apply text-muted mr-2 -ml-3; 96 | content: counter(h2) "." counter(h3) "." counter(h4) ". "; 97 | } 98 | 99 | h5::before { 100 | content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". "; 101 | } 102 | 103 | [id] { 104 | @apply scroll-mt-header-height; 105 | } 106 | 107 | p { 108 | @apply leading-relaxed py-2; 109 | } 110 | 111 | strong { 112 | @apply font-semibold; 113 | } 114 | 115 | ul, 116 | ol { 117 | @apply space-y-1 leading-relaxed; 118 | } 119 | 120 | nav ul, 121 | nav ol { 122 | @apply space-y-0; 123 | } 124 | 125 | article > *, 126 | section > * { 127 | @apply mt-5; 128 | } 129 | 130 | article h2, 131 | article h3, 132 | article h4, 133 | article h5, 134 | article h6, 135 | section h2, 136 | section h3, 137 | section h4, 138 | section h5, 139 | section h6 { 140 | @apply mt-10; 141 | } 142 | 143 | /* Code block */ 144 | code { 145 | /* Inline code style */ 146 | @apply rounded px-2 py-1 bg-text font-mono text-base text-md shadow-sm; 147 | } 148 | 149 | code > pre { 150 | @apply font-mono text-md; 151 | } 152 | 153 | pre { 154 | @apply overflow-auto p-4 my-6 rounded-md shadow-md border border-muted; 155 | } 156 | 157 | pre > code { 158 | /* Disable inline code style */ 159 | @apply rounded-none p-0 bg-transparent font-mono text-md border-0 shadow-none; 160 | } 161 | 162 | /* ################################# */ 163 | /* # Table of contents # */ 164 | /* ################################# */ 165 | @media screen and (min-width: 1080px) { 166 | #toc { 167 | @apply fixed top-sidebar-top left-page-gutter z-40 w-1/4 h-3/4 overflow-auto px-page-gutter py-sidebar-top; 168 | } 169 | } 170 | 171 | #toc summary { 172 | @apply font-bold; 173 | } 174 | 175 | #toc-list ol li { 176 | @apply list-outside; 177 | } 178 | 179 | #toc-list ol { 180 | @apply pl-3 m-1 border-l-2 text-sm text-muted; 181 | counter-reset: tocitem; 182 | } 183 | 184 | #toc-list > #TableOfContents > ol { 185 | @apply border-0; 186 | } 187 | 188 | #toc-list a { 189 | @apply inline-block w-full rounded px-3 leading-relaxed transition-none; 190 | } 191 | 192 | #toc-list ol > li { 193 | @apply block my-1; 194 | counter-increment: tocitem; 195 | } 196 | 197 | #toc-list li > a::before { 198 | @apply mr-2 -ml-3 font-semibold; 199 | content: counters(tocitem, ".") "."; 200 | } 201 | 202 | #toc-list li > a { 203 | @apply hover:text-text; 204 | } 205 | 206 | #toc-list li > a > code { 207 | @apply text-xs; 208 | } 209 | 210 | /* ###################### */ 211 | /* # Figure # */ 212 | /* ###################### */ 213 | figure { 214 | img { 215 | @apply block mx-auto rounded-lg drop-shadow-lg; 216 | } 217 | 218 | figcaption { 219 | @apply px-5 py-3 text-center text-muted italic; 220 | } 221 | } 222 | 223 | /* ################### */ 224 | /* # Tag # */ 225 | /* ################### */ 226 | #tag { 227 | @apply p-1 text-muted italic underline; 228 | } 229 | 230 | #tag:before, 231 | #tag:after { 232 | @apply text-muted inline-block no-underline; 233 | } 234 | 235 | #tag:before { 236 | content: "[#"; 237 | } 238 | 239 | #tag:after { 240 | content: "]"; 241 | } 242 | 243 | .content { 244 | /* ##################### */ 245 | /* # Links # */ 246 | /* ##################### */ 247 | & a { 248 | @apply italic p-1 font-medium; 249 | } 250 | 251 | a::before, 252 | a::after { 253 | @apply text-muted inline-block no-underline; 254 | } 255 | 256 | a::before { 257 | content: "{"; 258 | @apply pr-1; 259 | } 260 | 261 | a::after { 262 | content: "}"; 263 | @apply pl-1; 264 | } 265 | 266 | a:hover { 267 | @apply underline decoration-muted underline-offset-2; 268 | } 269 | 270 | /* ##################### */ 271 | /* Table */ 272 | /* ##################### */ 273 | table { 274 | @apply overflow-auto block my-4 min-w-full divide-y-2 text-sm; 275 | } 276 | 277 | table thead { 278 | @apply ltr:text-left rtl:text-right; 279 | } 280 | table tbody { 281 | @apply divide-y; 282 | } 283 | 284 | tr th { 285 | @apply font-medium; 286 | } 287 | 288 | tr th, 289 | tr td { 290 | @apply px-4 py-2; 291 | } 292 | 293 | img { 294 | @apply my-4; 295 | } 296 | 297 | ul { 298 | @apply list-disc ml-6; 299 | } 300 | 301 | ol { 302 | @apply list-decimal ml-6; 303 | } 304 | } 305 | -------------------------------------------------------------------------------- /exampleSite/content/posts/migrate-from-jekyll.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Migrate to Hugo from Jekyll" 3 | date: 2021-10-22T17:12:11+07:00 4 | comment: true 5 | tags: ["hugo"] 6 | --- 7 | 8 | ## Move static content to `static` 9 | 10 | Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output. Hugo keeps all static content under `static`. You should therefore move it all there. 11 | With Jekyll, something that looked like 12 | 13 | ```shell 14 | ▾ / 15 | ▾ images/ 16 | logo.png 17 | ``` 18 | 19 | should become 20 | 21 | ```shell 22 | ▾ / 23 | ▾ static/ 24 | ▾ images/ 25 | logo.png 26 | ``` 27 | 28 | Additionally, you'll want any files that should reside at the root (such as `CNAME`) to be moved to `static`. 29 | 30 | ## Create your Hugo configuration file 31 | 32 | Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the [Hugo configuration documentation](/overview/configuration/) for details. 33 | 34 | ## Set your configuration publish folder to `_site` 35 | 36 | The default is for Jekyll to publish to `_site` and for Hugo to publish to `public`. If, like me, you have [`_site` mapped to a git submodule on the `gh-pages` branch](http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html), you'll want to do one of two alternatives: 37 | 38 | 1. Change your submodule to point to map `gh-pages` to public instead of `_site` (recommended). 39 | 40 | ```shell 41 | git submodule deinit _site 42 | git rm _site 43 | git submodule add -b gh-pages git@github.com:your-username/your-repo.git public 44 | ``` 45 | 46 | 2. Or, change the Hugo configuration to use `_site` instead of `public`. 47 | 48 | ``` 49 | { 50 | .. 51 | "publishdir": "_site", 52 | .. 53 | } 54 | ``` 55 | 56 | ## Convert Jekyll templates to Hugo templates 57 | 58 | That's the bulk of the work right here. The documentation is your friend. You should refer to [Jekyll's template documentation](http://jekyllrb.com/docs/templates/) if you need to refresh your memory on how you built your blog and [Hugo's template](/layout/templates/) to learn Hugo's way. 59 | 60 | As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours. 61 | 62 | ## Convert Jekyll plugins to Hugo shortcodes 63 | 64 | Jekyll has [plugins](http://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port. 65 | 66 | ### Implementation 67 | 68 | As an example, I was using a custom [`image_tag`](https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb) plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing. 69 | 70 | Jekyll's plugin: 71 | 72 | ```ruby 73 | module Jekyll 74 | class ImageTag < Liquid::Tag 75 | @url: nil 76 | @caption: nil 77 | @class: nil 78 | @link: nil 79 | // Patterns 80 | IMAGE_URL_WITH_CLASS_AND_CAPTION = 81 | IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK: /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i 82 | IMAGE_URL_WITH_CAPTION: /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i 83 | IMAGE_URL_WITH_CLASS: /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i 84 | IMAGE_URL: /((https?:\/\/|\/)(\S+))/i 85 | def initialize(tag_name, markup, tokens) 86 | super 87 | if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK 88 | @class : $1 89 | @url : $3 90 | @caption: $7 91 | @link: $9 92 | elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION 93 | @class : $1 94 | @url : $3 95 | @caption: $7 96 | elsif markup =~ IMAGE_URL_WITH_CAPTION 97 | @url : $1 98 | @caption: $5 99 | elsif markup =~ IMAGE_URL_WITH_CLASS 100 | @class: $1 101 | @url : $3 102 | elsif markup =~ IMAGE_URL 103 | @url: $1 104 | end 105 | end 106 | def render(context) 107 | if @class 108 | source: "
    " 109 | else 110 | source: "
    " 111 | end 112 | if @link 113 | source += "" 114 | end 115 | source += "" 116 | if @link 117 | source += "" 118 | end 119 | source += "
    #{@caption}
    " if @caption 120 | source += "
    " 121 | source 122 | end 123 | end 124 | end 125 | Liquid::Template.register_tag('image', Jekyll::ImageTag) 126 | ``` 127 | 128 | is written as this Hugo shortcode: 129 | 130 | ```html 131 | 132 |
    133 | {{ with .Get "link"}}{{ end }} 134 | 135 | {{ if .Get "link"}}{{ end }} 136 | {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} 137 |
    {{ if isset .Params "title" }} 138 | {{ .Get "title" }}{{ end }} 139 | {{ if or (.Get "caption") (.Get "attr")}}

    140 | {{ .Get "caption" }} 141 | {{ with .Get "attrlink"}} {{ end }} 142 | {{ .Get "attr" }} 143 | {{ if .Get "attrlink"}} {{ end }} 144 |

    {{ end }} 145 |
    146 | {{ end }} 147 |
    148 | 149 | ``` 150 | 151 | ### Usage 152 | 153 | I simply changed: 154 | 155 | ``` 156 | {% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg "One of my favorite touristy-type photos. I secretly waited for the good light while we were "having fun" and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." ->http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %} 157 | ``` 158 | 159 | to this (this example uses a slightly extended version named `fig`, different than the built-in `figure`): 160 | 161 | ``` 162 | {{%/* fig class="full" src="http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg" title="One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." link="http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/" */%}} 163 | ``` 164 | 165 | As a bonus, the shortcode named parameters are, arguably, more readable. 166 | 167 | ## Finishing touches 168 | 169 | ### Fix content 170 | 171 | Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that `hugo server --watch` is your friend. Test your changes and fix errors as needed. 172 | 173 | ### Clean up 174 | 175 | You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it. 176 | 177 | ## A practical example in a diff 178 | 179 | [Hey, it's Alex](http://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610). 180 | -------------------------------------------------------------------------------- /exampleSite/content/posts/welcome-to-hugo-toigian.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Welcome to Hugo Toigian" 3 | date: 2022-10-25T18:12:11+07:00 4 | comment: true 5 | tags: ["hugo", "tech", "toigian"] 6 | --- 7 | 8 | {{< quote info >}} 9 | `Toigian` - `Tối giản` (vietnamese): Minimalist (english) 10 | 11 | **Disclaimer**: I'm not a front-end developer, just a guy who like tweaking stuff, so my code may not be pretty/clean. I attempt to learn [Tailwind CSS](https://tailwindcss.com/), and hugo-toigian is the result. 12 | {{< /quote >}} 13 | 14 | ## Showcase 15 | 16 | Take a look at [demo site](https://ntk148v.github.io/hugo-toigian). 17 | 18 | | Dark | Light | 19 | | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | 20 | | {{< figure src="https://raw.githubusercontent.com/ntk148v/hugo-toigian/master/images/dark-home.png" class="figure" >}} | {{< figure src="https://raw.githubusercontent.com/ntk148v/hugo-toigian/master/images/light-home.png" class="figure" >}} | 21 | | {{< figure src="https://raw.githubusercontent.com/ntk148v/hugo-toigian/master/images/dark-list.png" class="figure" >}} | {{< figure src="https://raw.githubusercontent.com/ntk148v/hugo-toigian/master/images/light-list.png" class="figure" >}} | 22 | | {{< figure src="https://raw.githubusercontent.com/ntk148v/hugo-toigian/master/images/dark-post.png" class="figure" >}} | {{< figure src="https://raw.githubusercontent.com/ntk148v/hugo-toigian/master/images/light-post.png" class="figure" >}} | 23 | 24 | ## Features 25 | 26 | - Minimalist (`tối giản`) design. Highly inspired by [mellow.dev](https://mellow.dev/). 27 | - Use the classy minimalist [Rosé Pine](https://github.com/rose-pine/palette) color palette. 28 | - Customizable. 29 | - Support light/dark mode. 30 | - Useful shortcodes. 31 | - Comments support. 32 | - Syntax highlighting: use server-side solution (Chroma, hugo built-in), I've added [Rosé Pine styles to Chroma](https://github.com/alecthomas/chroma/pull/689), so everything is the same vibe. 33 | 34 | ## Prerequisites 35 | 36 | - `git`, `npm` installed. 37 | - A minimum Hugo "extended" version of v0.93.0 and above. 38 | 39 | ```shell 40 | snap install hugo --channel=extended 41 | ``` 42 | 43 | - Hugo Pipe’s PostCSS requires the `postcss-cli` JavaScript package to be installed in the environment (`npm install -g postcss postcss-cli`) along with any PostCSS plugin(s) used (e.g., `npm install -g autoprefixer`). If you are using the Hugo Snap package, PostCSS and plugin(s) need to be installed locally within your Hugo site directory, e.g., `npm install postcss-cli` without the -g flag. 44 | 45 | ## Installation 46 | 47 | - Go to root directory of your Hugo website, or create a new site with: 48 | 49 | ```shell 50 | hugo new site hugo-example-site 51 | cd hugo-example-site 52 | git init 53 | ``` 54 | 55 | - Add the theme. 56 | 57 | ```shell 58 | git submodule add https://github.com/ntk148v/hugo-toigian.git themes/hugo-toigian 59 | ``` 60 | 61 | - Install Nodejs modules. 62 | 63 | ```shell 64 | cd themes/hugo-toigian 65 | npm install 66 | ``` 67 | 68 | - Finally, update theme in your configuration `config.toml` file in the root directory of your Hugo website. 69 | 70 | ```toml 71 | theme = "hugo-toigian" 72 | ``` 73 | 74 | - Run server to see a live preview of it. 75 | 76 | ```shell 77 | hugo server -DF --disableFastRender 78 | ``` 79 | 80 | - Build static pages 81 | 82 | ```shell 83 | hugo --environment production --minify 84 | ``` 85 | 86 | ## Configuration 87 | 88 | ### Site configuration 89 | 90 | There are a few configuration options that you can add to [config.toml](./exampleSite/config.toml) file. 91 | 92 | ```toml 93 | baseURL = 'http://example.org/' 94 | languageCode = 'en-us' 95 | title = 'Toigian' 96 | theme = "hugo-toigian" 97 | themesDir = "../.." 98 | # (Optional) If you provide a Disqus shortname, comments will be enabled on 99 | # all pages. 100 | # disqusShortname = "my-site" 101 | 102 | [params] 103 | # (Optional, default true): Controls table of contents visibility on right side of pages. 104 | # Start and end levels can be controlled with markup.tableOfContents setting. 105 | toc = true 106 | # (Optional, default true) Enables comments template on pages 107 | # By default partials/docs/comments.html includes Disqus template 108 | # See https://gohugo.io/content-management/comments/#configure-disqus 109 | # Can be overwritten by same param in page frontmatter 110 | comments = true 111 | 112 | [params.author] 113 | name = "Kien Nguyen-Tuan" 114 | email = "kiennt2609@gmail.com" 115 | 116 | [markup] 117 | defaultMarkdownHandler = "goldmark" 118 | # By default, Goldmark trims unsafe outputs which might prevent some shortcodes from rendering. 119 | # It is recommended to set markup.goldmark.renderer.unsafe=true if you encounter problems. 120 | [markup.goldmark] 121 | [markup.goldmark.renderer] 122 | unsafe = true # Enable user to embed HTML snippets in Markdown content. 123 | [markup.highlight] 124 | codeFences = true 125 | guessSyntax = true 126 | lineNos = false 127 | noClasses = false 128 | tabWidth = 4 129 | [markup.tableOfContents] 130 | startLevel = 2 131 | endLevel = 4 132 | ordered = true 133 | 134 | # The left side navbar at the top 135 | [menu] 136 | [[menu.nav]] 137 | name = "About" 138 | url = "/about" 139 | weight = 2 140 | 141 | [[menu.nav]] 142 | name = "Posts" 143 | url = "/posts" 144 | weight = 3 145 | ``` 146 | 147 | ### Page configuration 148 | 149 | You can specify additional params in the front matter of individual pages. 150 | 151 | ```md 152 | # Your posts tags 153 | 154 | tags = [] 155 | 156 | # If you have enabled comments for the site, you can disable it for specific pages 157 | 158 | comment = true 159 | ``` 160 | 161 | ## Shortcodes 162 | 163 | Check out [shortcodes](https://ntk148v.github.io/hugo-toigian/posts/shortcodes). 164 | 165 | ## Customization 166 | 167 | - Partials: There are layout partials available for you to easily override components of the theme in `layouts/partials/`. 168 | 169 | | Empty partial | Placement | Usage | 170 | | --------------------------------------------- | --------------------------- | ------------------- | 171 | | `layouts/partials/custom/head.html` | Before closing `` tag | Add custom css/js | 172 | | `layouts/partials/custom/content-before.html` | Before page content | | 173 | | `layouts/partials/custom/content-after.html` | After page content | | 174 | | `layouts/partials/font.html` | | Import custom fonts | 175 | 176 | - Extra customization: 177 | 178 | | File | Description | 179 | | ----------------------- | -------------------------------- | 180 | | `assets/css/custom.css` | Customize or override css styles | 181 | 182 | - For example, you don't like the chosen font (Inconsolata), and you want to use your own choice, follow these steps: 183 | 184 | - Create `layouts/partials/font.html` to import your fonts: 185 | 186 | ```html 187 | 188 | 189 | 190 | 194 | ``` 195 | 196 | - Create `assets/css/custom.css`: 197 | 198 | ```scss 199 | // change the default mono font to Overpass 200 | :root { 201 | --font-mono: "Overpass"; 202 | --font-serif: "Inter"; 203 | } 204 | ``` 205 | 206 | ## Contributing 207 | 208 | As you already known, I'm not front-end developer. Therefore, if you find anything wrong or want to make improvement, don't hesitate to open an issue/pull request. 209 | 210 | Primary goals are: 211 | 212 | - Keep it simple. 213 | - Avoid using JS if it can be solved by CSS. 214 | 215 | Feel free to open issues if you find missing configuration or customization options. 216 | 217 | ## Credits 218 | 219 | - [hugo-book](https://github.com/alex-shpak/hugo-book) 220 | - [dirkolbrich/hugo-tailwindcss-starter-theme](https://github.com/dirkolbrich/hugo-tailwindcss-starter-theme) 221 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
    2 | 3 |

    Hugo Toigian

    4 |
    A minimal Hugo theme with Tailwind CSS
    5 |

    6 | 7 | GitHub license 8 | 9 | 10 | GitHub stars 11 | 12 | 13 | Hugo 14 | 15 |


    16 |
    17 | 18 | > [!Important] 19 | > `Toigian` - `Tối giản` (vietnamese): Minimalist (english) 20 | > 21 | > **Disclaimer**: I'm not a front-end developer, just a guy who like tweaking stuff, so my code may not be pretty/clean. I attempt to learn [Tailwind CSS](https://tailwindcss.com/), and hugo-toigian is the result. 22 | 23 | - [0. Showcase](#0-showcase) 24 | - [1. Features](#1-features) 25 | - [2. Prerequisites](#2-prerequisites) 26 | - [3. Installation](#3-installation) 27 | - [3. Configuration](#3-configuration) 28 | - [3.1. Site configuration](#31-site-configuration) 29 | - [3.2. Page configuration](#32-page-configuration) 30 | - [4. Shortcodes](#4-shortcodes) 31 | - [5. Customization](#5-customization) 32 | - [6. Contributing](#6-contributing) 33 | - [7. Credits](#7-credits) 34 | 35 | ## 0. Showcase 36 | 37 | These screenshots may be outdated. Take a look at [demo site](https://ntk148v.github.io/hugo-toigian) for newest. 38 | 39 | | Dark | Light | 40 | | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | 41 | | dark | dark | 42 | | dark | dark | 43 | | dark | dark | 44 | 45 | ## 1. Features 46 | 47 | - Minimalist (`tối giản`) design. Highly inspired by [mellow.dev](https://mellow.dev/). 48 | - Use the classy minimalist [Rosé Pine](https://github.com/rose-pine/palette) color palette. 49 | - Customizable. 50 | - Support light/dark mode. 51 | - Nested counters for heading. 52 | - Side floating Table of content. 53 | - Useful shortcodes. 54 | - Comments support. 55 | - Syntax highlighting: use server-side solution (Chroma, hugo built-in), I've added [Rosé Pine styles to Chroma](https://github.com/alecthomas/chroma/pull/689), so everything is the same vibe. 56 | 57 | ## 2. Prerequisites 58 | 59 | - `git`, `npm` installed. 60 | - A minimum Hugo "extended" version of v0.93.0 and above. 61 | 62 | ```shell 63 | snap install hugo --channel=extended 64 | ``` 65 | 66 | - Hugo Pipe’s PostCSS requires the `postcss-cli` JavaScript package to be installed in the environment (`npm install -g postcss postcss-cli`) along with any PostCSS plugin(s) used (e.g., `npm install -g autoprefixer`). If you are using the Hugo Snap package, PostCSS and plugin(s) need to be installed locally within your Hugo site directory, e.g., `npm install postcss-cli` without the -g flag. 67 | 68 | ## 3. Installation 69 | 70 | - Go to root directory of your Hugo website, or create a new site with: 71 | 72 | ```shell 73 | hugo new site hugo-example-site 74 | cd hugo-example-site 75 | git init 76 | ``` 77 | 78 | - Add the theme. 79 | 80 | ```shell 81 | git submodule add https://github.com/ntk148v/hugo-toigian.git themes/hugo-toigian 82 | ``` 83 | 84 | - Install Nodejs modules. 85 | 86 | ```shell 87 | cd themes/hugo-toigian 88 | npm install 89 | ``` 90 | 91 | - Finally, update theme in your configuration `config.toml` file in the root directory of your Hugo website. 92 | 93 | ```toml 94 | theme = "hugo-toigian" 95 | ``` 96 | 97 | - Run server to see a live preview of it. 98 | 99 | ```shell 100 | hugo server -DF --disableFastRender 101 | ``` 102 | 103 | - Build static pages 104 | 105 | ```shell 106 | hugo --environment production --minify 107 | ``` 108 | 109 | ## 3. Configuration 110 | 111 | ### 3.1. Site configuration 112 | 113 | There are a few configuration options that you can add to [config.toml](./exampleSite/config.toml) file. 114 | 115 | ```toml 116 | baseURL = 'http://example.org/' 117 | languageCode = 'en-us' 118 | title = 'Toigian' 119 | theme = "hugo-toigian" 120 | themesDir = "../.." 121 | # (Optional) If you provide a Disqus shortname, comments will be enabled on 122 | # all pages. 123 | # disqusShortname = "my-site" 124 | 125 | [params] 126 | # (Optional, default true): Controls table of contents visibility on right side of pages. 127 | # Start and end levels can be controlled with markup.tableOfContents setting. 128 | toc = true 129 | # (Optional, default true) Enables comments template on pages 130 | # By default partials/docs/comments.html includes Disqus template 131 | # See https://gohugo.io/content-management/comments/#configure-disqus 132 | # Can be overwritten by same param in page frontmatter 133 | comments = true 134 | 135 | [params.author] 136 | name = "Kien Nguyen-Tuan" 137 | email = "kiennt2609@gmail.com" 138 | 139 | [markup] 140 | defaultMarkdownHandler = "goldmark" 141 | # By default, Goldmark trims unsafe outputs which might prevent some shortcodes from rendering. 142 | # It is recommended to set markup.goldmark.renderer.unsafe=true if you encounter problems. 143 | [markup.goldmark] 144 | [markup.goldmark.renderer] 145 | unsafe = true # Enable user to embed HTML snippets in Markdown content. 146 | [markup.highlight] 147 | codeFences = true 148 | guessSyntax = true 149 | lineNos = false 150 | noClasses = false 151 | tabWidth = 4 152 | [markup.tableOfContents] 153 | startLevel = 2 154 | endLevel = 4 155 | ordered = true 156 | 157 | # The left side navbar at the top 158 | [menu] 159 | [[menu.nav]] 160 | name = "About" 161 | url = "/about" 162 | weight = 2 163 | 164 | [[menu.nav]] 165 | name = "Posts" 166 | url = "/posts" 167 | weight = 3 168 | ``` 169 | 170 | ### 3.2. Page configuration 171 | 172 | You can specify additional params in the front matter of individual pages. 173 | 174 | ```md 175 | # Your posts tags 176 | 177 | tags = [] 178 | 179 | # If you have enabled comments for the site, you can disable it for specific pages 180 | 181 | comment = true 182 | ``` 183 | 184 | ## 4. Shortcodes 185 | 186 | Check out [shortcodes](https://ntk148v.github.io/hugo-toigian/posts/shortcodes). 187 | 188 | ## 5. Customization 189 | 190 | - Partials: There are layout partials available for you to easily override components of the theme in `layouts/partials/`. 191 | 192 | | Empty partial | Placement | Usage | 193 | | --------------------------------------------- | --------------------------- | ------------------- | 194 | | `layouts/partials/custom/head.html` | Before closing `` tag | Add custom css/js | 195 | | `layouts/partials/custom/content-before.html` | Before page content | | 196 | | `layouts/partials/custom/content-after.html` | After page content | | 197 | | `layouts/partials/font.html` | | Import custom fonts | 198 | 199 | - Extra customization: 200 | 201 | | File | Description | 202 | | ----------------------- | -------------------------------- | 203 | | `assets/css/custom.css` | Customize or override css styles | 204 | 205 | - For example, you don't like the chosen font (Inconsolata), and you want to use your own choice, follow these steps: 206 | 207 | - Create `layouts/partials/font.html` to import your fonts: 208 | 209 | ```html 210 | 211 | 212 | 213 | 217 | ``` 218 | 219 | - Create `assets/css/custom.css`: 220 | 221 | ```scss 222 | // change the default mono font to Overpass 223 | :root { 224 | --font-mono: "Overpass"; 225 | --font-serif: "Inter"; 226 | } 227 | ``` 228 | 229 | ## 6. Contributing 230 | 231 | As you already known, I'm not front-end developer. Therefore, if you find anything wrong or want to make improvement, don't hesitate to open an issue/pull request. 232 | 233 | Primary goals are: 234 | 235 | - Keep it simple. 236 | - Avoid using JS if it can be solved by CSS. 237 | 238 | Feel free to open issues if you find missing configuration or customization options. 239 | 240 | ## 7. Credits 241 | 242 | - [hugo-book](https://github.com/alex-shpak/hugo-book) 243 | - [dirkolbrich/hugo-tailwindcss-starter-theme](https://github.com/dirkolbrich/hugo-tailwindcss-starter-theme) 244 | -------------------------------------------------------------------------------- /exampleSite/content/posts/diagrams.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Hugo Diagrams" 3 | date: 2022-10-25T17:12:11+07:00 4 | comment: true 5 | tags: ["hugo", "tech", "diagrams"] 6 | --- 7 | 8 | Hugo version >= 0.93.0 9 | 10 | ## GoAT Diagrams (Ascii) 11 | 12 | Hugo! supports [GoAT](https://github.com/bep/goat) natively. This means that this code block: 13 | 14 | ```` 15 | ```goat 16 | . . . .--- 1 .-- 1 / 1 17 | / \ | | .---+ .-+ + 18 | / \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2 19 | + + | | | | ---+ ---+ + 20 | / \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3 21 | / \ / \ | | | | | | | | '---+ '-+ + 22 | 1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4 23 | 24 | ``` 25 | ```` 26 | 27 | Will be rendered as: 28 | 29 | ```goat 30 | 31 | . . . .--- 1 .-- 1 / 1 32 | / \ | | .---+ .-+ + 33 | / \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2 34 | + + | | | | ---+ ---+ + 35 | / \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3 36 | / \ / \ | | | | | | | | '---+ '-+ + 37 | 1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4 38 | ``` 39 | 40 | ## GoAT Diagrams Examples 41 | 42 | ### Graphics 43 | 44 | ```goat 45 | . 46 | 0 3 P * Eye / ^ / 47 | *-------* +y \ +) \ / Reflection 48 | 1 /| 2 /| ^ \ \ \ v 49 | *-------* | | v0 \ v3 --------*-------- 50 | | |4 | |7 | *----\-----* 51 | | *-----|-* +-----> +x / v X \ .-.<-------- o 52 | |/ |/ / / o \ | / | Refraction / \ 53 | *-------* v / \ +-' / \ 54 | 5 6 +z v1 *------------------* v2 | o-----o 55 | v 56 | 57 | ``` 58 | 59 | ### Complex 60 | 61 | ```goat 62 | +-------------------+ ^ .---. 63 | | A Box |__.--.__ __.--> | .-. | | 64 | | | '--' v | * |<--- | | 65 | +-------------------+ '-' | | 66 | Round *---(-. | 67 | .-----------------. .-------. .----------. .-------. | | | 68 | | Mixed Rounded | | | / Diagonals \ | | | | | | 69 | | & Square Corners | '--. .--' / \ |---+---| '-)-' .--------. 70 | '--+------------+-' .--. | '-------+--------' | | | | / Search / 71 | | | | | '---. | '-------' | '-+------' 72 | |<---------->| | | | v Interior | ^ 73 | ' <---' '----' .-----------. ---. .--- v | 74 | .------------------. Diag line | .-------. +---. \ / . | 75 | | if (a > b) +---. .--->| | | | | Curved line \ / / \ | 76 | | obj->fcn() | \ / | '-------' |<--' + / \ | 77 | '------------------' '--' '--+--------' .--. .--. | .-. +Done?+-' 78 | .---+-----. | ^ |\ | | /| .--+ | | \ / 79 | | | | Join \|/ | | Curved | \| |/ | | \ | \ / 80 | | | +----> o --o-- '-' Vertical '--' '--' '-- '--' + .---. 81 | <--+---+-----' | /|\ | | 3 | 82 | v not:line 'quotes' .-' '---' 83 | .-. .---+--------. / A || B *bold* | ^ 84 | | | | Not a dot | <---+---<-- A dash--is not a line v | 85 | '-' '---------+--' / Nor/is this. --- 86 | 87 | ``` 88 | 89 | ### Process 90 | 91 | ```goat 92 | . 93 | .---------. / \ 94 | | START | / \ .-+-------+-. ___________ 95 | '----+----' .-------. A / \ B | |COMPLEX| | / \ .-. 96 | | | END |<-----+CHOICE +----->| | | +--->+ PREPARATION +--->| X | 97 | v '-------' \ / | |PROCESS| | \___________/ '-' 98 | .---------. \ / '-+---+---+-' 99 | / INPUT / \ / 100 | '-----+---' ' 101 | | ^ 102 | v | 103 | .-----------. .-----+-----. .-. 104 | | PROCESS +---------------->| PROCESS |<------+ X | 105 | '-----------' '-----------' '-' 106 | ``` 107 | 108 | ### File tree 109 | 110 | Created from 111 | 112 | ```goat { width=300 color="orange" } 113 | ───Linux─┬─Android 114 | ├─Debian─┬─Ubuntu─┬─Lubuntu 115 | │ │ ├─Kubuntu 116 | │ │ ├─Xubuntu 117 | │ │ └─Xubuntu 118 | │ └─Mint 119 | ├─Centos 120 | └─Fedora 121 | ``` 122 | 123 | 124 | ### Sequence Diagram 125 | 126 | 127 | 128 | ```goat { class="w-40" } 129 | ┌─────┐ ┌───┐ 130 | │Alice│ │Bob│ 131 | └──┬──┘ └─┬─┘ 132 | │ │ 133 | │ Hello Bob! │ 134 | │───────────>│ 135 | │ │ 136 | │Hello Alice!│ 137 | │<───────────│ 138 | ┌──┴──┐ ┌─┴─┐ 139 | │Alice│ │Bob│ 140 | └─────┘ └───┘ 141 | 142 | ``` 143 | 144 | 145 | ### Flowchart 146 | 147 | 148 | 149 | ```goat 150 | _________________ 151 | ╱ ╲ ┌─────┐ 152 | ╱ DO YOU UNDERSTAND ╲____________________________________________________│GOOD!│ 153 | ╲ FLOW CHARTS? ╱yes └──┬──┘ 154 | ╲_________________╱ │ 155 | │no │ 156 | _________▽_________ ______________________ │ 157 | ╱ ╲ ╱ ╲ ┌────┐ │ 158 | ╱ OKAY, YOU SEE THE ╲________________╱ ... AND YOU CAN SEE ╲___│GOOD│ │ 159 | ╲ LINE LABELED 'YES'? ╱yes ╲ THE ONES LABELED 'NO'? ╱yes└──┬─┘ │ 160 | ╲___________________╱ ╲______________________╱ │ │ 161 | │no │no │ │ 162 | ________▽_________ _________▽__________ │ │ 163 | ╱ ╲ ┌───────────┐ ╱ ╲ │ │ 164 | ╱ BUT YOU SEE THE ╲___│WAIT, WHAT?│ ╱ BUT YOU JUST ╲___ │ │ 165 | ╲ ONES LABELED 'NO'? ╱yes└───────────┘ ╲ FOLLOWED THEM TWICE? ╱yes│ │ │ 166 | ╲__________________╱ ╲____________________╱ │ │ │ 167 | │no │no │ │ │ 168 | ┌───▽───┐ │ │ │ │ 169 | │LISTEN.│ └───────┬───────┘ │ │ 170 | └───┬───┘ ┌──────▽─────┐ │ │ 171 | ┌─────▽────┐ │(THAT WASN'T│ │ │ 172 | │I HATE YOU│ │A QUESTION) │ │ │ 173 | └──────────┘ └──────┬─────┘ │ │ 174 | ┌────▽───┐ │ │ 175 | │SCREW IT│ │ │ 176 | └────┬───┘ │ │ 177 | └─────┬─────┘ │ 178 | │ │ 179 | └─────┬─────┘ 180 | ┌───────▽──────┐ 181 | │LET'S GO DRING│ 182 | └───────┬──────┘ 183 | ┌─────────▽─────────┐ 184 | │HEY, I SHOULD TRY │ 185 | │INSTALLING FREEBSD!│ 186 | └───────────────────┘ 187 | 188 | ``` 189 | 190 | 191 | ### Table 192 | 193 | 194 | 195 | ```goat { class="w-80 dark-blue" } 196 | ┌────────────────────────────────────────────────┐ 197 | │ │ 198 | ├────────────────────────────────────────────────┤ 199 | │SYNTAX : { PRODUCTION } . │ 200 | ├────────────────────────────────────────────────┤ 201 | │PRODUCTION: IDENTIFIER "=" EXPRESSION "." . │ 202 | ├────────────────────────────────────────────────┤ 203 | │EXPRESSION: TERM { "|" TERM } . │ 204 | ├────────────────────────────────────────────────┤ 205 | │TERM : FACTOR { FACTOR } . │ 206 | ├────────────────────────────────────────────────┤ 207 | │FACTOR : IDENTIFIER │ 208 | ├────────────────────────────────────────────────┤ 209 | │ | LITERAL │ 210 | ├────────────────────────────────────────────────┤ 211 | │ | "[" EXPRESSION "]" │ 212 | ├────────────────────────────────────────────────┤ 213 | │ | "(" EXPRESSION ")" │ 214 | ├────────────────────────────────────────────────┤ 215 | │ | "{" EXPRESSION "}" . │ 216 | ├────────────────────────────────────────────────┤ 217 | │IDENTIFIER: letter { letter } . │ 218 | ├────────────────────────────────────────────────┤ 219 | │LITERAL : """" character { character } """" .│ 220 | └────────────────────────────────────────────────┘ 221 | ``` 222 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 352 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 353 | 354 | # User-specific stuff 355 | .idea/**/workspace.xml 356 | .idea/**/tasks.xml 357 | .idea/**/usage.statistics.xml 358 | .idea/**/dictionaries 359 | .idea/**/shelf 360 | 361 | # AWS User-specific 362 | .idea/**/aws.xml 363 | 364 | # Generated files 365 | .idea/**/contentModel.xml 366 | 367 | # Sensitive or high-churn files 368 | .idea/**/dataSources/ 369 | .idea/**/dataSources.ids 370 | .idea/**/dataSources.local.xml 371 | .idea/**/sqlDataSources.xml 372 | .idea/**/dynamic.xml 373 | .idea/**/uiDesigner.xml 374 | .idea/**/dbnavigator.xml 375 | 376 | # Gradle 377 | .idea/**/gradle.xml 378 | .idea/**/libraries 379 | 380 | # Gradle and Maven with auto-import 381 | # When using Gradle or Maven with auto-import, you should exclude module files, 382 | # since they will be recreated, and may cause churn. Uncomment if using 383 | # auto-import. 384 | # .idea/artifacts 385 | # .idea/compiler.xml 386 | # .idea/jarRepositories.xml 387 | # .idea/modules.xml 388 | # .idea/*.iml 389 | # .idea/modules 390 | # *.iml 391 | # *.ipr 392 | 393 | # CMake 394 | cmake-build-*/ 395 | 396 | # Mongo Explorer plugin 397 | .idea/**/mongoSettings.xml 398 | 399 | # File-based project format 400 | *.iws 401 | 402 | # IntelliJ 403 | out/ 404 | 405 | # mpeltonen/sbt-idea plugin 406 | .idea_modules/ 407 | 408 | # JIRA plugin 409 | atlassian-ide-plugin.xml 410 | 411 | # Cursive Clojure plugin 412 | .idea/replstate.xml 413 | 414 | # SonarLint plugin 415 | .idea/sonarlint/ 416 | 417 | # Crashlytics plugin (for Android Studio and IntelliJ) 418 | com_crashlytics_export_strings.xml 419 | crashlytics.properties 420 | crashlytics-build.properties 421 | fabric.properties 422 | 423 | # Editor-based Rest Client 424 | .idea/httpRequests 425 | 426 | # Android studio 3.1+ serialized cache file 427 | .idea/caches/build_file_checksums.ser 428 | # Logs 429 | logs 430 | *.log 431 | npm-debug.log* 432 | yarn-debug.log* 433 | yarn-error.log* 434 | lerna-debug.log* 435 | .pnpm-debug.log* 436 | 437 | # Diagnostic reports (https://nodejs.org/api/report.html) 438 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 439 | 440 | # Runtime data 441 | pids 442 | *.pid 443 | *.seed 444 | *.pid.lock 445 | 446 | # Directory for instrumented libs generated by jscoverage/JSCover 447 | lib-cov 448 | 449 | # Coverage directory used by tools like istanbul 450 | coverage 451 | *.lcov 452 | 453 | # nyc test coverage 454 | .nyc_output 455 | 456 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 457 | .grunt 458 | 459 | # Bower dependency directory (https://bower.io/) 460 | bower_components 461 | 462 | # node-waf configuration 463 | .lock-wscript 464 | 465 | # Compiled binary addons (https://nodejs.org/api/addons.html) 466 | build/Release 467 | 468 | # Dependency directories 469 | node_modules/ 470 | jspm_packages/ 471 | 472 | # Snowpack dependency directory (https://snowpack.dev/) 473 | web_modules/ 474 | 475 | # TypeScript cache 476 | *.tsbuildinfo 477 | 478 | # Optional npm cache directory 479 | .npm 480 | 481 | # Optional eslint cache 482 | .eslintcache 483 | 484 | # Optional stylelint cache 485 | .stylelintcache 486 | 487 | # Microbundle cache 488 | .rpt2_cache/ 489 | .rts2_cache_cjs/ 490 | .rts2_cache_es/ 491 | .rts2_cache_umd/ 492 | 493 | # Optional REPL history 494 | .node_repl_history 495 | 496 | # Output of 'npm pack' 497 | *.tgz 498 | 499 | # Yarn Integrity file 500 | .yarn-integrity 501 | 502 | # dotenv environment variable files 503 | .env 504 | .env.development.local 505 | .env.test.local 506 | .env.production.local 507 | .env.local 508 | 509 | # parcel-bundler cache (https://parceljs.org/) 510 | .cache 511 | .parcel-cache 512 | 513 | # Next.js build output 514 | .next 515 | out 516 | 517 | # Nuxt.js build / generate output 518 | .nuxt 519 | dist 520 | 521 | # Gatsby files 522 | .cache/ 523 | # Comment in the public line in if your project uses Gatsby and not Next.js 524 | # https://nextjs.org/blog/next-9-1#public-directory-support 525 | # public 526 | 527 | # vuepress build output 528 | .vuepress/dist 529 | 530 | # vuepress v2.x temp and cache directory 531 | .temp 532 | .cache 533 | 534 | # Docusaurus cache and generated files 535 | .docusaurus 536 | 537 | # Serverless directories 538 | .serverless/ 539 | 540 | # FuseBox cache 541 | .fusebox/ 542 | 543 | # DynamoDB Local files 544 | .dynamodb/ 545 | 546 | # TernJS port file 547 | .tern-port 548 | 549 | # Stores VSCode versions used for testing VSCode extensions 550 | .vscode-test 551 | 552 | # yarn v2 553 | .yarn/cache 554 | .yarn/unplugged 555 | .yarn/build-state.yml 556 | .yarn/install-state.gz 557 | .pnp.* 558 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@alloc/quick-lru@^5.2.0": 6 | version "5.2.0" 7 | resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30" 8 | integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw== 9 | 10 | "@isaacs/cliui@^8.0.2": 11 | version "8.0.2" 12 | resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" 13 | integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== 14 | dependencies: 15 | string-width "^5.1.2" 16 | string-width-cjs "npm:string-width@^4.2.0" 17 | strip-ansi "^7.0.1" 18 | strip-ansi-cjs "npm:strip-ansi@^6.0.1" 19 | wrap-ansi "^8.1.0" 20 | wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" 21 | 22 | "@jridgewell/gen-mapping@^0.3.2": 23 | version "0.3.8" 24 | resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142" 25 | integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== 26 | dependencies: 27 | "@jridgewell/set-array" "^1.2.1" 28 | "@jridgewell/sourcemap-codec" "^1.4.10" 29 | "@jridgewell/trace-mapping" "^0.3.24" 30 | 31 | "@jridgewell/resolve-uri@^3.1.0": 32 | version "3.1.2" 33 | resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" 34 | integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== 35 | 36 | "@jridgewell/set-array@^1.2.1": 37 | version "1.2.1" 38 | resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" 39 | integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== 40 | 41 | "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": 42 | version "1.5.0" 43 | resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" 44 | integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== 45 | 46 | "@jridgewell/trace-mapping@^0.3.24": 47 | version "0.3.25" 48 | resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" 49 | integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== 50 | dependencies: 51 | "@jridgewell/resolve-uri" "^3.1.0" 52 | "@jridgewell/sourcemap-codec" "^1.4.14" 53 | 54 | "@nodelib/fs.scandir@2.1.5": 55 | version "2.1.5" 56 | resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" 57 | integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== 58 | dependencies: 59 | "@nodelib/fs.stat" "2.0.5" 60 | run-parallel "^1.1.9" 61 | 62 | "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": 63 | version "2.0.5" 64 | resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" 65 | integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== 66 | 67 | "@nodelib/fs.walk@^1.2.3": 68 | version "1.2.8" 69 | resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" 70 | integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== 71 | dependencies: 72 | "@nodelib/fs.scandir" "2.1.5" 73 | fastq "^1.6.0" 74 | 75 | "@pkgjs/parseargs@^0.11.0": 76 | version "0.11.0" 77 | resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" 78 | integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== 79 | 80 | ansi-regex@^5.0.1: 81 | version "5.0.1" 82 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" 83 | integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== 84 | 85 | ansi-regex@^6.0.1: 86 | version "6.1.0" 87 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654" 88 | integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== 89 | 90 | ansi-styles@^4.0.0: 91 | version "4.3.0" 92 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" 93 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== 94 | dependencies: 95 | color-convert "^2.0.1" 96 | 97 | ansi-styles@^6.1.0: 98 | version "6.2.1" 99 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" 100 | integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== 101 | 102 | any-promise@^1.0.0: 103 | version "1.3.0" 104 | resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" 105 | integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== 106 | 107 | anymatch@~3.1.2: 108 | version "3.1.3" 109 | resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" 110 | integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== 111 | dependencies: 112 | normalize-path "^3.0.0" 113 | picomatch "^2.0.4" 114 | 115 | arg@^5.0.2: 116 | version "5.0.2" 117 | resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" 118 | integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== 119 | 120 | autoprefixer@^10.4.21: 121 | version "10.4.21" 122 | resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.21.tgz#77189468e7a8ad1d9a37fbc08efc9f480cf0a95d" 123 | integrity sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ== 124 | dependencies: 125 | browserslist "^4.24.4" 126 | caniuse-lite "^1.0.30001702" 127 | fraction.js "^4.3.7" 128 | normalize-range "^0.1.2" 129 | picocolors "^1.1.1" 130 | postcss-value-parser "^4.2.0" 131 | 132 | balanced-match@^1.0.0: 133 | version "1.0.2" 134 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" 135 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== 136 | 137 | binary-extensions@^2.0.0: 138 | version "2.3.0" 139 | resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" 140 | integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== 141 | 142 | brace-expansion@^2.0.1: 143 | version "2.0.2" 144 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7" 145 | integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== 146 | dependencies: 147 | balanced-match "^1.0.0" 148 | 149 | braces@^3.0.3, braces@~3.0.2: 150 | version "3.0.3" 151 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" 152 | integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== 153 | dependencies: 154 | fill-range "^7.1.1" 155 | 156 | browserslist@^4.24.4: 157 | version "4.25.0" 158 | resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.0.tgz#986aa9c6d87916885da2b50d8eb577ac8d133b2c" 159 | integrity sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA== 160 | dependencies: 161 | caniuse-lite "^1.0.30001718" 162 | electron-to-chromium "^1.5.160" 163 | node-releases "^2.0.19" 164 | update-browserslist-db "^1.1.3" 165 | 166 | camelcase-css@^2.0.1: 167 | version "2.0.1" 168 | resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" 169 | integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== 170 | 171 | caniuse-lite@^1.0.30001702, caniuse-lite@^1.0.30001718: 172 | version "1.0.30001723" 173 | resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001723.tgz#c4f3174f02089720736e1887eab345e09bb10944" 174 | integrity sha512-1R/elMjtehrFejxwmexeXAtae5UO9iSyFn6G/I806CYC/BLyyBk1EPhrKBkWhy6wM6Xnm47dSJQec+tLJ39WHw== 175 | 176 | chokidar@^3.3.0, chokidar@^3.6.0: 177 | version "3.6.0" 178 | resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" 179 | integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== 180 | dependencies: 181 | anymatch "~3.1.2" 182 | braces "~3.0.2" 183 | glob-parent "~5.1.2" 184 | is-binary-path "~2.1.0" 185 | is-glob "~4.0.1" 186 | normalize-path "~3.0.0" 187 | readdirp "~3.6.0" 188 | optionalDependencies: 189 | fsevents "~2.3.2" 190 | 191 | cliui@^8.0.1: 192 | version "8.0.1" 193 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" 194 | integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== 195 | dependencies: 196 | string-width "^4.2.0" 197 | strip-ansi "^6.0.1" 198 | wrap-ansi "^7.0.0" 199 | 200 | color-convert@^2.0.1: 201 | version "2.0.1" 202 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 203 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 204 | dependencies: 205 | color-name "~1.1.4" 206 | 207 | color-name@~1.1.4: 208 | version "1.1.4" 209 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 210 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 211 | 212 | commander@^4.0.0: 213 | version "4.1.1" 214 | resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" 215 | integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== 216 | 217 | cross-spawn@^7.0.6: 218 | version "7.0.6" 219 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" 220 | integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== 221 | dependencies: 222 | path-key "^3.1.0" 223 | shebang-command "^2.0.0" 224 | which "^2.0.1" 225 | 226 | cssesc@^3.0.0: 227 | version "3.0.0" 228 | resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" 229 | integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== 230 | 231 | dependency-graph@^0.11.0: 232 | version "0.11.0" 233 | resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27" 234 | integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg== 235 | 236 | didyoumean@^1.2.2: 237 | version "1.2.2" 238 | resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" 239 | integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== 240 | 241 | dir-glob@^3.0.1: 242 | version "3.0.1" 243 | resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" 244 | integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== 245 | dependencies: 246 | path-type "^4.0.0" 247 | 248 | dlv@^1.1.3: 249 | version "1.1.3" 250 | resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" 251 | integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== 252 | 253 | eastasianwidth@^0.2.0: 254 | version "0.2.0" 255 | resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" 256 | integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== 257 | 258 | electron-to-chromium@^1.5.160: 259 | version "1.5.167" 260 | resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.167.tgz#dab251d7161985306c54d9df2b7c1e651589a4d2" 261 | integrity sha512-LxcRvnYO5ez2bMOFpbuuVuAI5QNeY1ncVytE/KXaL6ZNfzX1yPlAO0nSOyIHx2fVAuUprMqPs/TdVhUFZy7SIQ== 262 | 263 | emoji-regex@^8.0.0: 264 | version "8.0.0" 265 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" 266 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== 267 | 268 | emoji-regex@^9.2.2: 269 | version "9.2.2" 270 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" 271 | integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== 272 | 273 | escalade@^3.1.1, escalade@^3.2.0: 274 | version "3.2.0" 275 | resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" 276 | integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== 277 | 278 | fast-glob@^3.3.0, fast-glob@^3.3.2: 279 | version "3.3.3" 280 | resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" 281 | integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== 282 | dependencies: 283 | "@nodelib/fs.stat" "^2.0.2" 284 | "@nodelib/fs.walk" "^1.2.3" 285 | glob-parent "^5.1.2" 286 | merge2 "^1.3.0" 287 | micromatch "^4.0.8" 288 | 289 | fastq@^1.6.0: 290 | version "1.19.1" 291 | resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" 292 | integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== 293 | dependencies: 294 | reusify "^1.0.4" 295 | 296 | fill-range@^7.1.1: 297 | version "7.1.1" 298 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" 299 | integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== 300 | dependencies: 301 | to-regex-range "^5.0.1" 302 | 303 | foreground-child@^3.1.0: 304 | version "3.3.1" 305 | resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f" 306 | integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== 307 | dependencies: 308 | cross-spawn "^7.0.6" 309 | signal-exit "^4.0.1" 310 | 311 | fraction.js@^4.3.7: 312 | version "4.3.7" 313 | resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7" 314 | integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== 315 | 316 | fs-extra@^11.0.0: 317 | version "11.3.0" 318 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.0.tgz#0daced136bbaf65a555a326719af931adc7a314d" 319 | integrity sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew== 320 | dependencies: 321 | graceful-fs "^4.2.0" 322 | jsonfile "^6.0.1" 323 | universalify "^2.0.0" 324 | 325 | fsevents@~2.3.2: 326 | version "2.3.3" 327 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" 328 | integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== 329 | 330 | function-bind@^1.1.2: 331 | version "1.1.2" 332 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" 333 | integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== 334 | 335 | get-caller-file@^2.0.5: 336 | version "2.0.5" 337 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" 338 | integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== 339 | 340 | get-stdin@^9.0.0: 341 | version "9.0.0" 342 | resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-9.0.0.tgz#3983ff82e03d56f1b2ea0d3e60325f39d703a575" 343 | integrity sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA== 344 | 345 | glob-parent@^5.1.2, glob-parent@~5.1.2: 346 | version "5.1.2" 347 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" 348 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== 349 | dependencies: 350 | is-glob "^4.0.1" 351 | 352 | glob-parent@^6.0.2: 353 | version "6.0.2" 354 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" 355 | integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== 356 | dependencies: 357 | is-glob "^4.0.3" 358 | 359 | glob@^10.3.10: 360 | version "10.4.5" 361 | resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" 362 | integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== 363 | dependencies: 364 | foreground-child "^3.1.0" 365 | jackspeak "^3.1.2" 366 | minimatch "^9.0.4" 367 | minipass "^7.1.2" 368 | package-json-from-dist "^1.0.0" 369 | path-scurry "^1.11.1" 370 | 371 | globby@^13.0.0: 372 | version "13.2.2" 373 | resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" 374 | integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== 375 | dependencies: 376 | dir-glob "^3.0.1" 377 | fast-glob "^3.3.0" 378 | ignore "^5.2.4" 379 | merge2 "^1.4.1" 380 | slash "^4.0.0" 381 | 382 | graceful-fs@^4.1.6, graceful-fs@^4.2.0: 383 | version "4.2.11" 384 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" 385 | integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== 386 | 387 | hasown@^2.0.2: 388 | version "2.0.2" 389 | resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" 390 | integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== 391 | dependencies: 392 | function-bind "^1.1.2" 393 | 394 | ignore@^5.2.4: 395 | version "5.3.2" 396 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" 397 | integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== 398 | 399 | is-binary-path@~2.1.0: 400 | version "2.1.0" 401 | resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" 402 | integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== 403 | dependencies: 404 | binary-extensions "^2.0.0" 405 | 406 | is-core-module@^2.16.0: 407 | version "2.16.1" 408 | resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" 409 | integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== 410 | dependencies: 411 | hasown "^2.0.2" 412 | 413 | is-extglob@^2.1.1: 414 | version "2.1.1" 415 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 416 | integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== 417 | 418 | is-fullwidth-code-point@^3.0.0: 419 | version "3.0.0" 420 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" 421 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== 422 | 423 | is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: 424 | version "4.0.3" 425 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" 426 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== 427 | dependencies: 428 | is-extglob "^2.1.1" 429 | 430 | is-number@^7.0.0: 431 | version "7.0.0" 432 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" 433 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 434 | 435 | isexe@^2.0.0: 436 | version "2.0.0" 437 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 438 | integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== 439 | 440 | jackspeak@^3.1.2: 441 | version "3.4.3" 442 | resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" 443 | integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== 444 | dependencies: 445 | "@isaacs/cliui" "^8.0.2" 446 | optionalDependencies: 447 | "@pkgjs/parseargs" "^0.11.0" 448 | 449 | jiti@^1.21.6: 450 | version "1.21.7" 451 | resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.7.tgz#9dd81043424a3d28458b193d965f0d18a2300ba9" 452 | integrity sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A== 453 | 454 | jsonfile@^6.0.1: 455 | version "6.1.0" 456 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" 457 | integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== 458 | dependencies: 459 | universalify "^2.0.0" 460 | optionalDependencies: 461 | graceful-fs "^4.1.6" 462 | 463 | lilconfig@^3.0.0, lilconfig@^3.1.3: 464 | version "3.1.3" 465 | resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.3.tgz#a1bcfd6257f9585bf5ae14ceeebb7b559025e4c4" 466 | integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== 467 | 468 | lines-and-columns@^1.1.6: 469 | version "1.2.4" 470 | resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" 471 | integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== 472 | 473 | lru-cache@^10.2.0: 474 | version "10.4.3" 475 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" 476 | integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== 477 | 478 | merge2@^1.3.0, merge2@^1.4.1: 479 | version "1.4.1" 480 | resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" 481 | integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== 482 | 483 | micromatch@^4.0.8: 484 | version "4.0.8" 485 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" 486 | integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== 487 | dependencies: 488 | braces "^3.0.3" 489 | picomatch "^2.3.1" 490 | 491 | minimatch@^9.0.4: 492 | version "9.0.5" 493 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" 494 | integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== 495 | dependencies: 496 | brace-expansion "^2.0.1" 497 | 498 | "minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: 499 | version "7.1.2" 500 | resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" 501 | integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== 502 | 503 | mz@^2.7.0: 504 | version "2.7.0" 505 | resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" 506 | integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== 507 | dependencies: 508 | any-promise "^1.0.0" 509 | object-assign "^4.0.1" 510 | thenify-all "^1.0.0" 511 | 512 | nanoid@^3.3.11: 513 | version "3.3.11" 514 | resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b" 515 | integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== 516 | 517 | node-releases@^2.0.19: 518 | version "2.0.19" 519 | resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" 520 | integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== 521 | 522 | normalize-path@^3.0.0, normalize-path@~3.0.0: 523 | version "3.0.0" 524 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" 525 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== 526 | 527 | normalize-range@^0.1.2: 528 | version "0.1.2" 529 | resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" 530 | integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== 531 | 532 | object-assign@^4.0.1: 533 | version "4.1.1" 534 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 535 | integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== 536 | 537 | object-hash@^3.0.0: 538 | version "3.0.0" 539 | resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" 540 | integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== 541 | 542 | package-json-from-dist@^1.0.0: 543 | version "1.0.1" 544 | resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" 545 | integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== 546 | 547 | path-key@^3.1.0: 548 | version "3.1.1" 549 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" 550 | integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== 551 | 552 | path-parse@^1.0.7: 553 | version "1.0.7" 554 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" 555 | integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== 556 | 557 | path-scurry@^1.11.1: 558 | version "1.11.1" 559 | resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" 560 | integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== 561 | dependencies: 562 | lru-cache "^10.2.0" 563 | minipass "^5.0.0 || ^6.0.2 || ^7.0.0" 564 | 565 | path-type@^4.0.0: 566 | version "4.0.0" 567 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" 568 | integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== 569 | 570 | picocolors@^1.0.0, picocolors@^1.1.1: 571 | version "1.1.1" 572 | resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" 573 | integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== 574 | 575 | picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: 576 | version "2.3.1" 577 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" 578 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== 579 | 580 | pify@^2.3.0: 581 | version "2.3.0" 582 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 583 | integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== 584 | 585 | pirates@^4.0.1: 586 | version "4.0.7" 587 | resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" 588 | integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== 589 | 590 | postcss-cli@^10.0.0: 591 | version "10.1.0" 592 | resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-10.1.0.tgz#f6658c4998a1c35bd66cd71009132b2d12e04f80" 593 | integrity sha512-Zu7PLORkE9YwNdvOeOVKPmWghprOtjFQU3srMUGbdz3pHJiFh7yZ4geiZFMkjMfB0mtTFR3h8RemR62rPkbOPA== 594 | dependencies: 595 | chokidar "^3.3.0" 596 | dependency-graph "^0.11.0" 597 | fs-extra "^11.0.0" 598 | get-stdin "^9.0.0" 599 | globby "^13.0.0" 600 | picocolors "^1.0.0" 601 | postcss-load-config "^4.0.0" 602 | postcss-reporter "^7.0.0" 603 | pretty-hrtime "^1.0.3" 604 | read-cache "^1.0.0" 605 | slash "^5.0.0" 606 | yargs "^17.0.0" 607 | 608 | postcss-import@^15.1.0: 609 | version "15.1.0" 610 | resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-15.1.0.tgz#41c64ed8cc0e23735a9698b3249ffdbf704adc70" 611 | integrity sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew== 612 | dependencies: 613 | postcss-value-parser "^4.0.0" 614 | read-cache "^1.0.0" 615 | resolve "^1.1.7" 616 | 617 | postcss-js@^4.0.1: 618 | version "4.0.1" 619 | resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.1.tgz#61598186f3703bab052f1c4f7d805f3991bee9d2" 620 | integrity sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw== 621 | dependencies: 622 | camelcase-css "^2.0.1" 623 | 624 | postcss-load-config@^4.0.0, postcss-load-config@^4.0.2: 625 | version "4.0.2" 626 | resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.2.tgz#7159dcf626118d33e299f485d6afe4aff7c4a3e3" 627 | integrity sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ== 628 | dependencies: 629 | lilconfig "^3.0.0" 630 | yaml "^2.3.4" 631 | 632 | postcss-nested@^6.2.0: 633 | version "6.2.0" 634 | resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.2.0.tgz#4c2d22ab5f20b9cb61e2c5c5915950784d068131" 635 | integrity sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ== 636 | dependencies: 637 | postcss-selector-parser "^6.1.1" 638 | 639 | postcss-reporter@^7.0.0: 640 | version "7.1.0" 641 | resolved "https://registry.yarnpkg.com/postcss-reporter/-/postcss-reporter-7.1.0.tgz#5ec476d224e2fe25a054e3c66d9b2901d4fab422" 642 | integrity sha512-/eoEylGWyy6/DOiMP5lmFRdmDKThqgn7D6hP2dXKJI/0rJSO1ADFNngZfDzxL0YAxFvws+Rtpuji1YIHj4mySA== 643 | dependencies: 644 | picocolors "^1.0.0" 645 | thenby "^1.3.4" 646 | 647 | postcss-selector-parser@^6.1.1, postcss-selector-parser@^6.1.2: 648 | version "6.1.2" 649 | resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" 650 | integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== 651 | dependencies: 652 | cssesc "^3.0.0" 653 | util-deprecate "^1.0.2" 654 | 655 | postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: 656 | version "4.2.0" 657 | resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" 658 | integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== 659 | 660 | postcss@^8.4.47, postcss@^8.5.4: 661 | version "8.5.5" 662 | resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.5.tgz#04de7797f6911fb1c96550e96616d08681537ef3" 663 | integrity sha512-d/jtm+rdNT8tpXuHY5MMtcbJFBkhXE6593XVR9UoGCH8jSFGci7jGvMGH5RYd5PBJW+00NZQt6gf7CbagJCrhg== 664 | dependencies: 665 | nanoid "^3.3.11" 666 | picocolors "^1.1.1" 667 | source-map-js "^1.2.1" 668 | 669 | prettier-plugin-go-template@^0.0.13: 670 | version "0.0.13" 671 | resolved "https://registry.yarnpkg.com/prettier-plugin-go-template/-/prettier-plugin-go-template-0.0.13.tgz#b4047bce76430bc89a8ee8f27fad1b1c14d942be" 672 | integrity sha512-gG/xT5kd+kCzoMaTchXvdfBdsunyRCV6G8cgdPGPd2V5JGGKXUG7SjzBKU7jaGh2RTeblcAdBb/E+S/duOAMsA== 673 | dependencies: 674 | ulid "^2.3.0" 675 | 676 | pretty-hrtime@^1.0.3: 677 | version "1.0.3" 678 | resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" 679 | integrity sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A== 680 | 681 | queue-microtask@^1.2.2: 682 | version "1.2.3" 683 | resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" 684 | integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== 685 | 686 | read-cache@^1.0.0: 687 | version "1.0.0" 688 | resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" 689 | integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA== 690 | dependencies: 691 | pify "^2.3.0" 692 | 693 | readdirp@~3.6.0: 694 | version "3.6.0" 695 | resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" 696 | integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== 697 | dependencies: 698 | picomatch "^2.2.1" 699 | 700 | require-directory@^2.1.1: 701 | version "2.1.1" 702 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" 703 | integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== 704 | 705 | resolve@^1.1.7, resolve@^1.22.8: 706 | version "1.22.10" 707 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" 708 | integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== 709 | dependencies: 710 | is-core-module "^2.16.0" 711 | path-parse "^1.0.7" 712 | supports-preserve-symlinks-flag "^1.0.0" 713 | 714 | reusify@^1.0.4: 715 | version "1.1.0" 716 | resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" 717 | integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== 718 | 719 | run-parallel@^1.1.9: 720 | version "1.2.0" 721 | resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" 722 | integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== 723 | dependencies: 724 | queue-microtask "^1.2.2" 725 | 726 | shebang-command@^2.0.0: 727 | version "2.0.0" 728 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" 729 | integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== 730 | dependencies: 731 | shebang-regex "^3.0.0" 732 | 733 | shebang-regex@^3.0.0: 734 | version "3.0.0" 735 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" 736 | integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== 737 | 738 | signal-exit@^4.0.1: 739 | version "4.1.0" 740 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" 741 | integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== 742 | 743 | slash@^4.0.0: 744 | version "4.0.0" 745 | resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" 746 | integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== 747 | 748 | slash@^5.0.0: 749 | version "5.1.0" 750 | resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce" 751 | integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg== 752 | 753 | source-map-js@^1.2.1: 754 | version "1.2.1" 755 | resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" 756 | integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== 757 | 758 | "string-width-cjs@npm:string-width@^4.2.0": 759 | version "4.2.3" 760 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" 761 | integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== 762 | dependencies: 763 | emoji-regex "^8.0.0" 764 | is-fullwidth-code-point "^3.0.0" 765 | strip-ansi "^6.0.1" 766 | 767 | string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: 768 | version "4.2.3" 769 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" 770 | integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== 771 | dependencies: 772 | emoji-regex "^8.0.0" 773 | is-fullwidth-code-point "^3.0.0" 774 | strip-ansi "^6.0.1" 775 | 776 | string-width@^5.0.1, string-width@^5.1.2: 777 | version "5.1.2" 778 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" 779 | integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== 780 | dependencies: 781 | eastasianwidth "^0.2.0" 782 | emoji-regex "^9.2.2" 783 | strip-ansi "^7.0.1" 784 | 785 | "strip-ansi-cjs@npm:strip-ansi@^6.0.1": 786 | version "6.0.1" 787 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" 788 | integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== 789 | dependencies: 790 | ansi-regex "^5.0.1" 791 | 792 | strip-ansi@^6.0.0, strip-ansi@^6.0.1: 793 | version "6.0.1" 794 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" 795 | integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== 796 | dependencies: 797 | ansi-regex "^5.0.1" 798 | 799 | strip-ansi@^7.0.1: 800 | version "7.1.0" 801 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" 802 | integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== 803 | dependencies: 804 | ansi-regex "^6.0.1" 805 | 806 | sucrase@^3.35.0: 807 | version "3.35.0" 808 | resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263" 809 | integrity sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA== 810 | dependencies: 811 | "@jridgewell/gen-mapping" "^0.3.2" 812 | commander "^4.0.0" 813 | glob "^10.3.10" 814 | lines-and-columns "^1.1.6" 815 | mz "^2.7.0" 816 | pirates "^4.0.1" 817 | ts-interface-checker "^0.1.9" 818 | 819 | supports-preserve-symlinks-flag@^1.0.0: 820 | version "1.0.0" 821 | resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" 822 | integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== 823 | 824 | tailwindcss@^3.4.17: 825 | version "3.4.17" 826 | resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.17.tgz#ae8406c0f96696a631c790768ff319d46d5e5a63" 827 | integrity sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og== 828 | dependencies: 829 | "@alloc/quick-lru" "^5.2.0" 830 | arg "^5.0.2" 831 | chokidar "^3.6.0" 832 | didyoumean "^1.2.2" 833 | dlv "^1.1.3" 834 | fast-glob "^3.3.2" 835 | glob-parent "^6.0.2" 836 | is-glob "^4.0.3" 837 | jiti "^1.21.6" 838 | lilconfig "^3.1.3" 839 | micromatch "^4.0.8" 840 | normalize-path "^3.0.0" 841 | object-hash "^3.0.0" 842 | picocolors "^1.1.1" 843 | postcss "^8.4.47" 844 | postcss-import "^15.1.0" 845 | postcss-js "^4.0.1" 846 | postcss-load-config "^4.0.2" 847 | postcss-nested "^6.2.0" 848 | postcss-selector-parser "^6.1.2" 849 | resolve "^1.22.8" 850 | sucrase "^3.35.0" 851 | 852 | thenby@^1.3.4: 853 | version "1.3.4" 854 | resolved "https://registry.yarnpkg.com/thenby/-/thenby-1.3.4.tgz#81581f6e1bb324c6dedeae9bfc28e59b1a2201cc" 855 | integrity sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ== 856 | 857 | thenify-all@^1.0.0: 858 | version "1.6.0" 859 | resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" 860 | integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== 861 | dependencies: 862 | thenify ">= 3.1.0 < 4" 863 | 864 | "thenify@>= 3.1.0 < 4": 865 | version "3.3.1" 866 | resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" 867 | integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== 868 | dependencies: 869 | any-promise "^1.0.0" 870 | 871 | to-regex-range@^5.0.1: 872 | version "5.0.1" 873 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" 874 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 875 | dependencies: 876 | is-number "^7.0.0" 877 | 878 | ts-interface-checker@^0.1.9: 879 | version "0.1.13" 880 | resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" 881 | integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== 882 | 883 | ulid@^2.3.0: 884 | version "2.4.0" 885 | resolved "https://registry.yarnpkg.com/ulid/-/ulid-2.4.0.tgz#9d9ee22e63f4390ee1bcd9ad09fca39d8ae0afed" 886 | integrity sha512-fIRiVTJNcSRmXKPZtGzFQv9WRrZ3M9eoptl/teFJvjOzmpU+/K/JH6HZ8deBfb5vMEpicJcLn7JmvdknlMq7Zg== 887 | 888 | universalify@^2.0.0: 889 | version "2.0.1" 890 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" 891 | integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== 892 | 893 | update-browserslist-db@^1.1.3: 894 | version "1.1.3" 895 | resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420" 896 | integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw== 897 | dependencies: 898 | escalade "^3.2.0" 899 | picocolors "^1.1.1" 900 | 901 | util-deprecate@^1.0.2: 902 | version "1.0.2" 903 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 904 | integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== 905 | 906 | which@^2.0.1: 907 | version "2.0.2" 908 | resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" 909 | integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== 910 | dependencies: 911 | isexe "^2.0.0" 912 | 913 | "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": 914 | version "7.0.0" 915 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" 916 | integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== 917 | dependencies: 918 | ansi-styles "^4.0.0" 919 | string-width "^4.1.0" 920 | strip-ansi "^6.0.0" 921 | 922 | wrap-ansi@^7.0.0: 923 | version "7.0.0" 924 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" 925 | integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== 926 | dependencies: 927 | ansi-styles "^4.0.0" 928 | string-width "^4.1.0" 929 | strip-ansi "^6.0.0" 930 | 931 | wrap-ansi@^8.1.0: 932 | version "8.1.0" 933 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" 934 | integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== 935 | dependencies: 936 | ansi-styles "^6.1.0" 937 | string-width "^5.0.1" 938 | strip-ansi "^7.0.1" 939 | 940 | y18n@^5.0.5: 941 | version "5.0.8" 942 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" 943 | integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== 944 | 945 | yaml@^2.3.4: 946 | version "2.8.0" 947 | resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.0.tgz#15f8c9866211bdc2d3781a0890e44d4fa1a5fff6" 948 | integrity sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ== 949 | 950 | yargs-parser@^21.1.1: 951 | version "21.1.1" 952 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" 953 | integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== 954 | 955 | yargs@^17.0.0: 956 | version "17.7.2" 957 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" 958 | integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== 959 | dependencies: 960 | cliui "^8.0.1" 961 | escalade "^3.1.1" 962 | get-caller-file "^2.0.5" 963 | require-directory "^2.1.1" 964 | string-width "^4.2.3" 965 | y18n "^5.0.5" 966 | yargs-parser "^21.1.1" 967 | -------------------------------------------------------------------------------- /exampleSite/content/posts/creating-a-new-theme.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Creating a New Theme" 3 | date: 2021-10-22T17:12:11+07:00 4 | comment: true 5 | tags: ["hugo"] 6 | --- 7 | 8 | 9 | ## Introduction 10 | 11 | This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I'll explain how Hugo uses templates and how you can organize your templates to create a theme. I won't cover using CSS to style your theme. 12 | 13 | We'll start with creating a new site with a very basic template. Then we'll add in a few pages and posts. With small variations on that, you will be able to create many different types of web sites. 14 | 15 | In this tutorial, commands that you enter will start with the "$" prompt. The output will follow. Lines that start with "#" are comments that I've added to explain a point. When I show updates to a file, the ":wq" on the last line means to save the file. 16 | 17 | Here's an example: 18 | 19 | ``` 20 | ## this is a comment 21 | $ echo this is a command 22 | this is a command 23 | 24 | ## edit the file 25 | $ vi foo.md 26 | --- 27 | date: "2014-09-28" 28 | title: "creating a new theme" 29 | --- 30 | 31 | bah and humbug 32 | :wq 33 | 34 | ## show it 35 | $ cat foo.md 36 | --- 37 | date: "2014-09-28" 38 | title: "creating a new theme" 39 | --- 40 | 41 | bah and humbug 42 | $ 43 | ``` 44 | 45 | 46 | ## Some Definitions 47 | 48 | There are a few concepts that you need to understand before creating a theme. 49 | 50 | ### Skins 51 | 52 | Skins are the files responsible for the look and feel of your site. It’s the CSS that controls colors and fonts, it’s the Javascript that determines actions and reactions. It’s also the rules that Hugo uses to transform your content into the HTML that the site will serve to visitors. 53 | 54 | You have two ways to create a skin. The simplest way is to create it in the ```layouts/``` directory. If you do, then you don’t have to worry about configuring Hugo to recognize it. The first place that Hugo will look for rules and files is in the ```layouts/``` directory so it will always find the skin. 55 | 56 | Your second choice is to create it in a sub-directory of the ```themes/``` directory. If you do, then you must always tell Hugo where to search for the skin. It’s extra work, though, so why bother with it? 57 | 58 | The difference between creating a skin in ```layouts/``` and creating it in ```themes/``` is very subtle. A skin in ```layouts/``` can’t be customized without updating the templates and static files that it is built from. A skin created in ```themes/```, on the other hand, can be and that makes it easier for other people to use it. 59 | 60 | The rest of this tutorial will call a skin created in the ```themes/``` directory a theme. 61 | 62 | Note that you can use this tutorial to create a skin in the ```layouts/``` directory if you wish to. The main difference will be that you won’t need to update the site’s configuration file to use a theme. 63 | 64 | ### The Home Page 65 | 66 | The home page, or landing page, is the first page that many visitors to a site see. It is the index.html file in the root directory of the web site. Since Hugo writes files to the public/ directory, our home page is public/index.html. 67 | 68 | ### Site Configuration File 69 | 70 | When Hugo runs, it looks for a configuration file that contains settings that override default values for the entire site. The file can use TOML, YAML, or JSON. I prefer to use TOML for my configuration files. If you prefer to use JSON or YAML, you’ll need to translate my examples. You’ll also need to change the name of the file since Hugo uses the extension to determine how to process it. 71 | 72 | Hugo translates Markdown files into HTML. By default, Hugo expects to find Markdown files in your ```content/``` directory and template files in your ```themes/``` directory. It will create HTML files in your ```public/``` directory. You can change this by specifying alternate locations in the configuration file. 73 | 74 | ### Content 75 | 76 | Content is stored in text files that contain two sections. The first section is the “front matter,” which is the meta-information on the content. The second section contains Markdown that will be converted to HTML. 77 | 78 | #### Front Matter 79 | 80 | The front matter is information about the content. Like the configuration file, it can be written in TOML, YAML, or JSON. Unlike the configuration file, Hugo doesn’t use the file’s extension to know the format. It looks for markers to signal the type. TOML is surrounded by “`---`”, YAML by “`---`”, and JSON is enclosed in curly braces. I prefer to use TOML, so you’ll need to translate my examples if you prefer YAML or JSON. 81 | 82 | The information in the front matter is passed into the template before the content is rendered into HTML. 83 | 84 | #### Markdown 85 | 86 | Content is written in Markdown which makes it easier to create the content. Hugo runs the content through a Markdown engine to create the HTML which will be written to the output file. 87 | 88 | ### Template Files 89 | 90 | Hugo uses template files to render content into HTML. Template files are a bridge between the content and presentation. Rules in the template define what content is published, where it's published to, and how it will rendered to the HTML file. The template guides the presentation by specifying the style to use. 91 | 92 | There are three types of templates: single, list, and partial. Each type takes a bit of content as input and transforms it based on the commands in the template. 93 | 94 | Hugo uses its knowledge of the content to find the template file used to render the content. If it can’t find a template that is an exact match for the content, it will shift up a level and search from there. It will continue to do so until it finds a matching template or runs out of templates to try. If it can’t find a template, it will use the default template for the site. 95 | 96 | Please note that you can use the front matter to influence Hugo’s choice of templates. 97 | 98 | #### Single Template 99 | 100 | A single template is used to render a single piece of content. For example, an article or post would be a single piece of content and use a single template. 101 | 102 | #### List Template 103 | 104 | A list template renders a group of related content. That could be a summary of recent postings or all articles in a category. List templates can contain multiple groups. 105 | 106 | The homepage template is a special type of list template. Hugo assumes that the home page of your site will act as the portal for the rest of the content in the site. 107 | 108 | #### Partial Template 109 | 110 | A partial template is a template that can be included in other templates. Partial templates must be called using the “partial” template command. They are very handy for rolling up common behavior. For example, your site may have a banner that all pages use. Instead of copying the text of the banner into every single and list template, you could create a partial with the banner in it. That way if you decide to change the banner, you only have to change the partial template. 111 | 112 | ## Create a New Site 113 | 114 | Let's use Hugo to create a new web site. I'm a Mac user, so I'll create mine in my home directory, in the Sites folder. If you're using Linux, you might have to create the folder first. 115 | 116 | The "new site" command will create a skeleton of a site. It will give you the basic directory structure and a useable configuration file. 117 | 118 | ``` 119 | $ hugo new site ~/Sites/zafta 120 | $ cd ~/Sites/zafta 121 | $ ls -l 122 | total 8 123 | drwxr-xr-x 7 quoha staff 238 Sep 29 16:49 . 124 | drwxr-xr-x 3 quoha staff 102 Sep 29 16:49 .. 125 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes 126 | -rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml 127 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content 128 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts 129 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static 130 | $ 131 | ``` 132 | 133 | Take a look in the content/ directory to confirm that it is empty. 134 | 135 | The other directories (archetypes/, layouts/, and static/) are used when customizing a theme. That's a topic for a different tutorial, so please ignore them for now. 136 | 137 | ### Generate the HTML For the New Site 138 | 139 | Running the `hugo` command with no options will read all the available content and generate the HTML files. It will also copy all static files (that's everything that's not content). Since we have an empty site, it won't do much, but it will do it very quickly. 140 | 141 | ``` 142 | $ hugo --verbose 143 | INFO: 2014/09/29 Using config file: config.toml 144 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ 145 | WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] 146 | WARN: 2014/09/29 Unable to locate layout: [404.html] 147 | 0 draft content 148 | 0 future content 149 | 0 pages created 150 | 0 tags created 151 | 0 categories created 152 | in 2 ms 153 | $ 154 | ``` 155 | 156 | The "`--verbose`" flag gives extra information that will be helpful when we build the template. Every line of the output that starts with "INFO:" or "WARN:" is present because we used that flag. The lines that start with "WARN:" are warning messages. We'll go over them later. 157 | 158 | We can verify that the command worked by looking at the directory again. 159 | 160 | ``` 161 | $ ls -l 162 | total 8 163 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes 164 | -rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml 165 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content 166 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts 167 | drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public 168 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static 169 | $ 170 | ``` 171 | 172 | See that new public/ directory? Hugo placed all generated content there. When you're ready to publish your web site, that's the place to start. For now, though, let's just confirm that we have what we'd expect from a site with no content. 173 | 174 | ``` 175 | $ ls -l public 176 | total 16 177 | -rw-r--r-- 1 quoha staff 416 Sep 29 17:02 index.xml 178 | -rw-r--r-- 1 quoha staff 262 Sep 29 17:02 sitemap.xml 179 | $ 180 | ``` 181 | 182 | Hugo created two XML files, which is standard, but there are no HTML files. 183 | 184 | 185 | 186 | ### Test the New Site 187 | 188 | Verify that you can run the built-in web server. It will dramatically shorten your development cycle if you do. Start it by running the "server" command. If it is successful, you will see output similar to the following: 189 | 190 | ``` 191 | $ hugo server --verbose 192 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 193 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ 194 | WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] 195 | WARN: 2014/09/29 Unable to locate layout: [404.html] 196 | 0 draft content 197 | 0 future content 198 | 0 pages created 199 | 0 tags created 200 | 0 categories created 201 | in 2 ms 202 | Serving pages from /Users/quoha/Sites/zafta/public 203 | Web Server is available at http://localhost:1313 204 | Press Ctrl+C to stop 205 | ``` 206 | 207 | Connect to the listed URL (it's on the line that starts with "Web Server"). If everything is working correctly, you should get a page that shows the following: 208 | 209 | ``` 210 | index.xml 211 | sitemap.xml 212 | ``` 213 | 214 | That's a listing of your public/ directory. Hugo didn't create a home page because our site has no content. When there's no index.html file in a directory, the server lists the files in the directory, which is what you should see in your browser. 215 | 216 | Let’s go back and look at those warnings again. 217 | 218 | ``` 219 | WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] 220 | WARN: 2014/09/29 Unable to locate layout: [404.html] 221 | ``` 222 | 223 | That second warning is easier to explain. We haven’t created a template to be used to generate “page not found errors.” The 404 message is a topic for a separate tutorial. 224 | 225 | Now for the first warning. It is for the home page. You can tell because the first layout that it looked for was “index.html.” That’s only used by the home page. 226 | 227 | I like that the verbose flag causes Hugo to list the files that it's searching for. For the home page, they are index.html, _default/list.html, and _default/single.html. There are some rules that we'll cover later that explain the names and paths. For now, just remember that Hugo couldn't find a template for the home page and it told you so. 228 | 229 | At this point, you've got a working installation and site that we can build upon. All that’s left is to add some content and a theme to display it. 230 | 231 | ## Create a New Theme 232 | 233 | Hugo doesn't ship with a default theme. There are a few available (I counted a dozen when I first installed Hugo) and Hugo comes with a command to create new themes. 234 | 235 | We're going to create a new theme called "zafta." Since the goal of this tutorial is to show you how to fill out the files to pull in your content, the theme will not contain any CSS. In other words, ugly but functional. 236 | 237 | All themes have opinions on content and layout. For example, Zafta uses "post" over "blog". Strong opinions make for simpler templates but differing opinions make it tougher to use themes. When you build a theme, consider using the terms that other themes do. 238 | 239 | 240 | ### Create a Skeleton 241 | 242 | Use the hugo "new" command to create the skeleton of a theme. This creates the directory structure and places empty files for you to fill out. 243 | 244 | ``` 245 | $ hugo new theme zafta 246 | 247 | $ ls -l 248 | total 8 249 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes 250 | -rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml 251 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content 252 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts 253 | drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public 254 | drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static 255 | drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes 256 | 257 | $ find themes -type f | xargs ls -l 258 | -rw-r--r-- 1 quoha staff 1081 Sep 29 17:31 themes/zafta/LICENSE.md 259 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/archetypes/default.md 260 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html 261 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html 262 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html 263 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html 264 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html 265 | -rw-r--r-- 1 quoha staff 93 Sep 29 17:31 themes/zafta/theme.toml 266 | $ 267 | ``` 268 | 269 | The skeleton includes templates (the files ending in .html), license file, a description of your theme (the theme.toml file), and an empty archetype. 270 | 271 | Please take a minute to fill out the theme.toml and LICENSE.md files. They're optional, but if you're going to be distributing your theme, it tells the world who to praise (or blame). It's also nice to declare the license so that people will know how they can use the theme. 272 | 273 | ``` 274 | $ vi themes/zafta/theme.toml 275 | author: "michael d henderson" 276 | description: "a minimal working template" 277 | license: "MIT" 278 | name: "zafta" 279 | source_repo: "" 280 | tags: ["tags", "categories"] 281 | :wq 282 | 283 | ## also edit themes/zafta/LICENSE.md and change 284 | ## the bit that says "YOUR_NAME_HERE" 285 | ``` 286 | 287 | Note that the the skeleton's template files are empty. Don't worry, we'll be changing that shortly. 288 | 289 | ``` 290 | $ find themes/zafta -name '*.html' | xargs ls -l 291 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html 292 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html 293 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html 294 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html 295 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html 296 | $ 297 | ``` 298 | 299 | 300 | 301 | ### Update the Configuration File to Use the Theme 302 | 303 | Now that we've got a theme to work with, it's a good idea to add the theme name to the configuration file. This is optional, because you can always add "-t zafta" on all your commands. I like to put it the configuration file because I like shorter command lines. If you don't put it in the configuration file or specify it on the command line, you won't use the template that you're expecting to. 304 | 305 | Edit the file to add the theme, add a title for the site, and specify that all of our content will use the TOML format. 306 | 307 | ``` 308 | $ vi config.toml 309 | theme: "zafta" 310 | baseurl: "" 311 | languageCode: "en-us" 312 | title: "zafta - totally refreshing" 313 | MetaDataFormat: "toml" 314 | :wq 315 | 316 | $ 317 | ``` 318 | 319 | ### Generate the Site 320 | 321 | Now that we have an empty theme, let's generate the site again. 322 | 323 | ``` 324 | $ hugo --verbose 325 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 326 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ 327 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ 328 | WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 329 | 0 draft content 330 | 0 future content 331 | 0 pages created 332 | 0 tags created 333 | 0 categories created 334 | in 2 ms 335 | $ 336 | ``` 337 | 338 | Did you notice that the output is different? The warning message for the home page has disappeared and we have an additional information line saying that Hugo is syncing from the theme's directory. 339 | 340 | Let's check the public/ directory to see what Hugo's created. 341 | 342 | ``` 343 | $ ls -l public 344 | total 16 345 | drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 css 346 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:56 index.html 347 | -rw-r--r-- 1 quoha staff 407 Sep 29 17:56 index.xml 348 | drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 js 349 | -rw-r--r-- 1 quoha staff 243 Sep 29 17:56 sitemap.xml 350 | $ 351 | ``` 352 | 353 | Notice four things: 354 | 355 | 1. Hugo created a home page. This is the file public/index.html. 356 | 2. Hugo created a css/ directory. 357 | 3. Hugo created a js/ directory. 358 | 4. Hugo claimed that it created 0 pages. It created a file and copied over static files, but didn't create any pages. That's because it considers a "page" to be a file created directly from a content file. It doesn't count things like the index.html files that it creates automatically. 359 | 360 | #### The Home Page 361 | 362 | Hugo supports many different types of templates. The home page is special because it gets its own type of template and its own template file. The file, layouts/index.html, is used to generate the HTML for the home page. The Hugo documentation says that this is the only required template, but that depends. Hugo's warning message shows that it looks for three different templates: 363 | 364 | ``` 365 | WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] 366 | ``` 367 | 368 | If it can't find any of these, it completely skips creating the home page. We noticed that when we built the site without having a theme installed. 369 | 370 | When Hugo created our theme, it created an empty home page template. Now, when we build the site, Hugo finds the template and uses it to generate the HTML for the home page. Since the template file is empty, the HTML file is empty, too. If the template had any rules in it, then Hugo would have used them to generate the home page. 371 | 372 | ``` 373 | $ find . -name index.html | xargs ls -l 374 | -rw-r--r-- 1 quoha staff 0 Sep 29 20:21 ./public/index.html 375 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 ./themes/zafta/layouts/index.html 376 | $ 377 | ``` 378 | 379 | #### The Magic of Static 380 | 381 | Hugo does two things when generating the site. It uses templates to transform content into HTML and it copies static files into the site. Unlike content, static files are not transformed. They are copied exactly as they are. 382 | 383 | Hugo assumes that your site will use both CSS and JavaScript, so it creates directories in your theme to hold them. Remember opinions? Well, Hugo's opinion is that you'll store your CSS in a directory named css/ and your JavaScript in a directory named js/. If you don't like that, you can change the directory names in your theme directory or even delete them completely. Hugo's nice enough to offer its opinion, then behave nicely if you disagree. 384 | 385 | ``` 386 | $ find themes/zafta -type d | xargs ls -ld 387 | drwxr-xr-x 7 quoha staff 238 Sep 29 17:38 themes/zafta 388 | drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes/zafta/archetypes 389 | drwxr-xr-x 5 quoha staff 170 Sep 29 17:31 themes/zafta/layouts 390 | drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/_default 391 | drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/partials 392 | drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/static 393 | drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/css 394 | drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/js 395 | $ 396 | ``` 397 | 398 | ## The Theme Development Cycle 399 | 400 | When you're working on a theme, you will make changes in the theme's directory, rebuild the site, and check your changes in the browser. Hugo makes this very easy: 401 | 402 | 1. Purge the public/ directory. 403 | 2. Run the built in web server in watch mode. 404 | 3. Open your site in a browser. 405 | 4. Update the theme. 406 | 5. Glance at your browser window to see changes. 407 | 6. Return to step 4. 408 | 409 | I’ll throw in one more opinion: never work on a theme on a live site. Always work on a copy of your site. Make changes to your theme, test them, then copy them up to your site. For added safety, use a tool like Git to keep a revision history of your content and your theme. Believe me when I say that it is too easy to lose both your mind and your changes. 410 | 411 | Check the main Hugo site for information on using Git with Hugo. 412 | 413 | ### Purge the public/ Directory 414 | 415 | When generating the site, Hugo will create new files and update existing ones in the ```public/``` directory. It will not delete files that are no longer used. For example, files that were created in the wrong directory or with the wrong title will remain. If you leave them, you might get confused by them later. I recommend cleaning out your site prior to generating it. 416 | 417 | Note: If you're building on an SSD, you should ignore this. Churning on a SSD can be costly. 418 | 419 | ### Hugo's Watch Option 420 | 421 | Hugo's "`--watch`" option will monitor the content/ and your theme directories for changes and rebuild the site automatically. 422 | 423 | ### Live Reload 424 | 425 | Hugo's built in web server supports live reload. As pages are saved on the server, the browser is told to refresh the page. Usually, this happens faster than you can say, "Wow, that's totally amazing." 426 | 427 | ### Development Commands 428 | 429 | Use the following commands as the basis for your workflow. 430 | 431 | ``` 432 | ## purge old files. hugo will recreate the public directory. 433 | ## 434 | $ rm -rf public 435 | ## 436 | ## run hugo in watch mode 437 | ## 438 | $ hugo server --watch --verbose 439 | ``` 440 | 441 | Here's sample output showing Hugo detecting a change to the template for the home page. Once generated, the web browser automatically reloaded the page. I've said this before, it's amazing. 442 | 443 | 444 | ``` 445 | $ rm -rf public 446 | $ hugo server --watch --verbose 447 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 448 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ 449 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ 450 | WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 451 | 0 draft content 452 | 0 future content 453 | 0 pages created 454 | 0 tags created 455 | 0 categories created 456 | in 2 ms 457 | Watching for changes in /Users/quoha/Sites/zafta/content 458 | Serving pages from /Users/quoha/Sites/zafta/public 459 | Web Server is available at http://localhost:1313 460 | Press Ctrl+C to stop 461 | INFO: 2014/09/29 File System Event: ["/Users/quoha/Sites/zafta/themes/zafta/layouts/index.html": MODIFY|ATTRIB] 462 | Change detected, rebuilding site 463 | 464 | WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 465 | 0 draft content 466 | 0 future content 467 | 0 pages created 468 | 0 tags created 469 | 0 categories created 470 | in 1 ms 471 | ``` 472 | 473 | ## Update the Home Page Template 474 | 475 | The home page is one of a few special pages that Hugo creates automatically. As mentioned earlier, it looks for one of three files in the theme's layout/ directory: 476 | 477 | 1. index.html 478 | 2. _default/list.html 479 | 3. _default/single.html 480 | 481 | We could update one of the default templates, but a good design decision is to update the most specific template available. That's not a hard and fast rule (in fact, we'll break it a few times in this tutorial), but it is a good generalization. 482 | 483 | ### Make a Static Home Page 484 | 485 | Right now, that page is empty because we don't have any content and we don't have any logic in the template. Let's change that by adding some text to the template. 486 | 487 | ``` 488 | $ vi themes/zafta/layouts/index.html 489 | 490 | 491 | 492 |

    hugo says hello!

    493 | 494 | 495 | :wq 496 | 497 | $ 498 | ``` 499 | 500 | Build the web site and then verify the results. 501 | 502 | ``` 503 | $ hugo --verbose 504 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 505 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ 506 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ 507 | WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 508 | 0 draft content 509 | 0 future content 510 | 0 pages created 511 | 0 tags created 512 | 0 categories created 513 | in 2 ms 514 | 515 | $ find public -type f -name '*.html' | xargs ls -l 516 | -rw-r--r-- 1 quoha staff 78 Sep 29 21:26 public/index.html 517 | 518 | $ cat public/index.html 519 | 520 | 521 | 522 |

    hugo says hello!

    523 | 524 | ``` 525 | 526 | #### Live Reload 527 | 528 | Note: If you're running the server with the `--watch` option, you'll see different content in the file: 529 | 530 | ``` 531 | $ cat public/index.html 532 | 533 | 534 | 535 |

    hugo says hello!

    536 | 540 | 541 | ``` 542 | 543 | When you use `--watch`, the Live Reload script is added by Hugo. Look for live reload in the documentation to see what it does and how to disable it. 544 | 545 | ### Build a "Dynamic" Home Page 546 | 547 | "Dynamic home page?" Hugo's a static web site generator, so this seems an odd thing to say. I mean let's have the home page automatically reflect the content in the site every time Hugo builds it. We'll use iteration in the template to do that. 548 | 549 | #### Create New Posts 550 | 551 | Now that we have the home page generating static content, let's add some content to the site. We'll display these posts as a list on the home page and on their own page, too. 552 | 553 | Hugo has a command to generate a skeleton post, just like it does for sites and themes. 554 | 555 | ``` 556 | $ hugo --verbose new post/first.md 557 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 558 | INFO: 2014/09/29 attempting to create post/first.md of post 559 | INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/default.md 560 | ERROR: 2014/09/29 Unable to Cast to map[string]interface{} 561 | 562 | $ 563 | ``` 564 | 565 | That wasn't very nice, was it? 566 | 567 | The "new" command uses an archetype to create the post file. Hugo created an empty default archetype file, but that causes an error when there's a theme. For me, the workaround was to create an archetypes file specifically for the post type. 568 | 569 | ``` 570 | $ vi themes/zafta/archetypes/post.md 571 | --- 572 | Description: "" 573 | Tags: [] 574 | Categories: [] 575 | --- 576 | :wq 577 | 578 | $ find themes/zafta/archetypes -type f | xargs ls -l 579 | -rw-r--r-- 1 quoha staff 0 Sep 29 21:53 themes/zafta/archetypes/default.md 580 | -rw-r--r-- 1 quoha staff 51 Sep 29 21:54 themes/zafta/archetypes/post.md 581 | 582 | $ hugo --verbose new post/first.md 583 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 584 | INFO: 2014/09/29 attempting to create post/first.md of post 585 | INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md 586 | INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/first.md 587 | /Users/quoha/Sites/zafta/content/post/first.md created 588 | 589 | $ hugo --verbose new post/second.md 590 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 591 | INFO: 2014/09/29 attempting to create post/second.md of post 592 | INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md 593 | INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/second.md 594 | /Users/quoha/Sites/zafta/content/post/second.md created 595 | 596 | $ ls -l content/post 597 | total 16 598 | -rw-r--r-- 1 quoha staff 104 Sep 29 21:54 first.md 599 | -rw-r--r-- 1 quoha staff 105 Sep 29 21:57 second.md 600 | 601 | $ cat content/post/first.md 602 | --- 603 | Categories: [] 604 | Description: "" 605 | Tags: [] 606 | date: "2014-09-29T21:54:53-05:00" 607 | title: "first" 608 | 609 | --- 610 | my first post 611 | 612 | $ cat content/post/second.md 613 | --- 614 | Categories: [] 615 | Description: "" 616 | Tags: [] 617 | date: "2014-09-29T21:57:09-05:00" 618 | title: "second" 619 | 620 | --- 621 | my second post 622 | 623 | $ 624 | ``` 625 | 626 | Build the web site and then verify the results. 627 | 628 | ``` 629 | $ rm -rf public 630 | $ hugo --verbose 631 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 632 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ 633 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ 634 | INFO: 2014/09/29 found taxonomies: map[string]string{"category":"categories", "tag":"tags"} 635 | WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 636 | 0 draft content 637 | 0 future content 638 | 2 pages created 639 | 0 tags created 640 | 0 categories created 641 | in 4 ms 642 | $ 643 | ``` 644 | 645 | The output says that it created 2 pages. Those are our new posts: 646 | 647 | ``` 648 | $ find public -type f -name '*.html' | xargs ls -l 649 | -rw-r--r-- 1 quoha staff 78 Sep 29 22:13 public/index.html 650 | -rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/first/index.html 651 | -rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/index.html 652 | -rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/second/index.html 653 | $ 654 | ``` 655 | 656 | The new files are empty because because the templates used to generate the content are empty. The homepage doesn't show the new content, either. We have to update the templates to add the posts. 657 | 658 | ### List and Single Templates 659 | 660 | In Hugo, we have three major kinds of templates. There's the home page template that we updated previously. It is used only by the home page. We also have "single" templates which are used to generate output for a single content file. We also have "list" templates that are used to group multiple pieces of content before generating output. 661 | 662 | Generally speaking, list templates are named "list.html" and single templates are named "single.html." 663 | 664 | There are three other types of templates: partials, content views, and terms. We will not go into much detail on these. 665 | 666 | ### Add Content to the Homepage 667 | 668 | The home page will contain a list of posts. Let's update its template to add the posts that we just created. The logic in the template will run every time we build the site. 669 | 670 | ``` 671 | $ vi themes/zafta/layouts/index.html 672 | 673 | 674 | 675 | {{ range first 10 .Data.Pages }} 676 |

    {{ .Title }}

    677 | {{ end }} 678 | 679 | 680 | :wq 681 | 682 | $ 683 | ``` 684 | 685 | Hugo uses the Go template engine. That engine scans the template files for commands which are enclosed between "{{" and "}}". In our template, the commands are: 686 | 687 | 1. range 688 | 2. .Title 689 | 3. end 690 | 691 | The "range" command is an iterator. We're going to use it to go through the first ten pages. Every HTML file that Hugo creates is treated as a page, so looping through the list of pages will look at every file that will be created. 692 | 693 | The ".Title" command prints the value of the "title" variable. Hugo pulls it from the front matter in the Markdown file. 694 | 695 | The "end" command signals the end of the range iterator. The engine loops back to the top of the iteration when it finds "end." Everything between the "range" and "end" is evaluated every time the engine goes through the iteration. In this file, that would cause the title from the first ten pages to be output as heading level one. 696 | 697 | It's helpful to remember that some variables, like .Data, are created before any output files. Hugo loads every content file into the variable and then gives the template a chance to process before creating the HTML files. 698 | 699 | Build the web site and then verify the results. 700 | 701 | ``` 702 | $ rm -rf public 703 | $ hugo --verbose 704 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 705 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ 706 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ 707 | INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"} 708 | WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 709 | 0 draft content 710 | 0 future content 711 | 2 pages created 712 | 0 tags created 713 | 0 categories created 714 | in 4 ms 715 | $ find public -type f -name '*.html' | xargs ls -l 716 | -rw-r--r-- 1 quoha staff 94 Sep 29 22:23 public/index.html 717 | -rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/first/index.html 718 | -rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/index.html 719 | -rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/second/index.html 720 | $ cat public/index.html 721 | 722 | 723 | 724 | 725 |

    second

    726 | 727 |

    first

    728 | 729 | 730 | 731 | $ 732 | ``` 733 | 734 | Congratulations, the home page shows the title of the two posts. The posts themselves are still empty, but let's take a moment to appreciate what we've done. Your template now generates output dynamically. Believe it or not, by inserting the range command inside of those curly braces, you've learned everything you need to know to build a theme. All that's really left is understanding which template will be used to generate each content file and becoming familiar with the commands for the template engine. 735 | 736 | And, if that were entirely true, this tutorial would be much shorter. There are a few things to know that will make creating a new template much easier. Don't worry, though, that's all to come. 737 | 738 | ### Add Content to the Posts 739 | 740 | We're working with posts, which are in the content/post/ directory. That means that their section is "post" (and if we don't do something weird, their type is also "post"). 741 | 742 | Hugo uses the section and type to find the template file for every piece of content. Hugo will first look for a template file that matches the section or type name. If it can't find one, then it will look in the _default/ directory. There are some twists that we'll cover when we get to categories and tags, but for now we can assume that Hugo will try post/single.html, then _default/single.html. 743 | 744 | Now that we know the search rule, let's see what we actually have available: 745 | 746 | ``` 747 | $ find themes/zafta -name single.html | xargs ls -l 748 | -rw-r--r-- 1 quoha staff 132 Sep 29 17:31 themes/zafta/layouts/_default/single.html 749 | ``` 750 | 751 | We could create a new template, post/single.html, or change the default. Since we don't know of any other content types, let's start with updating the default. 752 | 753 | Remember, any content that we haven't created a template for will end up using this template. That can be good or bad. Bad because I know that we're going to be adding different types of content and we're going to end up undoing some of the changes we've made. It's good because we'll be able to see immediate results. It's also good to start here because we can start to build the basic layout for the site. As we add more content types, we'll refactor this file and move logic around. Hugo makes that fairly painless, so we'll accept the cost and proceed. 754 | 755 | Please see the Hugo documentation on template rendering for all the details on determining which template to use. And, as the docs mention, if you're building a single page application (SPA) web site, you can delete all of the other templates and work with just the default single page. That's a refreshing amount of joy right there. 756 | 757 | #### Update the Template File 758 | 759 | ``` 760 | $ vi themes/zafta/layouts/_default/single.html 761 | 762 | 763 | 764 | {{ .Title }} 765 | 766 | 767 |

    {{ .Title }}

    768 | {{ .Content }} 769 | 770 | 771 | :wq 772 | 773 | $ 774 | ``` 775 | 776 | Build the web site and verify the results. 777 | 778 | ``` 779 | $ rm -rf public 780 | $ hugo --verbose 781 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 782 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ 783 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ 784 | INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"} 785 | WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 786 | 0 draft content 787 | 0 future content 788 | 2 pages created 789 | 0 tags created 790 | 0 categories created 791 | in 4 ms 792 | 793 | $ find public -type f -name '*.html' | xargs ls -l 794 | -rw-r--r-- 1 quoha staff 94 Sep 29 22:40 public/index.html 795 | -rw-r--r-- 1 quoha staff 125 Sep 29 22:40 public/post/first/index.html 796 | -rw-r--r-- 1 quoha staff 0 Sep 29 22:40 public/post/index.html 797 | -rw-r--r-- 1 quoha staff 128 Sep 29 22:40 public/post/second/index.html 798 | 799 | $ cat public/post/first/index.html 800 | 801 | 802 | 803 | first 804 | 805 | 806 |

    first

    807 |

    my first post

    808 | 809 | 810 | 811 | 812 | $ cat public/post/second/index.html 813 | 814 | 815 | 816 | second 817 | 818 | 819 |

    second

    820 |

    my second post

    821 | 822 | 823 | 824 | $ 825 | ``` 826 | 827 | Notice that the posts now have content. You can go to localhost:1313/post/first to verify. 828 | 829 | ### Linking to Content 830 | 831 | The posts are on the home page. Let's add a link from there to the post. Since this is the home page, we'll update its template. 832 | 833 | ``` 834 | $ vi themes/zafta/layouts/index.html 835 | 836 | 837 | 838 | {{ range first 10 .Data.Pages }} 839 |

    {{ .Title }}

    840 | {{ end }} 841 | 842 | 843 | ``` 844 | 845 | Build the web site and verify the results. 846 | 847 | ``` 848 | $ rm -rf public 849 | $ hugo --verbose 850 | INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml 851 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ 852 | INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ 853 | INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"} 854 | WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] 855 | 0 draft content 856 | 0 future content 857 | 2 pages created 858 | 0 tags created 859 | 0 categories created 860 | in 4 ms 861 | 862 | $ find public -type f -name '*.html' | xargs ls -l 863 | -rw-r--r-- 1 quoha staff 149 Sep 29 22:44 public/index.html 864 | -rw-r--r-- 1 quoha staff 125 Sep 29 22:44 public/post/first/index.html 865 | -rw-r--r-- 1 quoha staff 0 Sep 29 22:44 public/post/index.html 866 | -rw-r--r-- 1 quoha staff 128 Sep 29 22:44 public/post/second/index.html 867 | 868 | $ cat public/index.html 869 | 870 | 871 | 872 | 873 |

    second

    874 | 875 |

    first

    876 | 877 | 878 | 879 | 880 | $ 881 | ``` 882 | 883 | ### Create a Post Listing 884 | 885 | We have the posts displaying on the home page and on their own page. We also have a file public/post/index.html that is empty. Let's make it show a list of all posts (not just the first ten). 886 | 887 | We need to decide which template to update. This will be a listing, so it should be a list template. Let's take a quick look and see which list templates are available. 888 | 889 | ``` 890 | $ find themes/zafta -name list.html | xargs ls -l 891 | -rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html 892 | ``` 893 | 894 | As with the single post, we have to decide to update _default/list.html or create post/list.html. We still don't have multiple content types, so let's stay consistent and update the default list template. 895 | 896 | ## Creating Top Level Pages 897 | 898 | Let's add an "about" page and display it at the top level (as opposed to a sub-level like we did with posts). 899 | 900 | The default in Hugo is to use the directory structure of the content/ directory to guide the location of the generated html in the public/ directory. Let's verify that by creating an "about" page at the top level: 901 | 902 | ``` 903 | $ vi content/about.md 904 | --- 905 | title: "about" 906 | description: "about this site" 907 | date: "2014-09-27" 908 | slug: "about time" 909 | --- 910 | 911 | ## about us 912 | 913 | i'm speechless 914 | :wq 915 | ``` 916 | 917 | Generate the web site and verify the results. 918 | 919 | ``` 920 | $ find public -name '*.html' | xargs ls -l 921 | -rw-rw-r-- 1 mdhender staff 334 Sep 27 15:08 public/about-time/index.html 922 | -rw-rw-r-- 1 mdhender staff 527 Sep 27 15:08 public/index.html 923 | -rw-rw-r-- 1 mdhender staff 358 Sep 27 15:08 public/post/first-post/index.html 924 | -rw-rw-r-- 1 mdhender staff 0 Sep 27 15:08 public/post/index.html 925 | -rw-rw-r-- 1 mdhender staff 342 Sep 27 15:08 public/post/second-post/index.html 926 | ``` 927 | 928 | Notice that the page wasn't created at the top level. It was created in a sub-directory named 'about-time/'. That name came from our slug. Hugo will use the slug to name the generated content. It's a reasonable default, by the way, but we can learn a few things by fighting it for this file. 929 | 930 | One other thing. Take a look at the home page. 931 | 932 | ``` 933 | $ cat public/index.html 934 | 935 | 936 | 937 |

    creating a new theme

    938 |

    about

    939 |

    second

    940 |

    first

    941 | 945 | 946 | ``` 947 | 948 | Notice that the "about" link is listed with the posts? That's not desirable, so let's change that first. 949 | 950 | ``` 951 | $ vi themes/zafta/layouts/index.html 952 | 953 | 954 | 955 |

    posts

    956 | {{ range first 10 .Data.Pages }} 957 | {{ if eq .Type "post"}} 958 |

    {{ .Title }}

    959 | {{ end }} 960 | {{ end }} 961 | 962 |

    pages

    963 | {{ range .Data.Pages }} 964 | {{ if eq .Type "page" }} 965 |

    {{ .Title }}

    966 | {{ end }} 967 | {{ end }} 968 | 969 | 970 | :wq 971 | ``` 972 | 973 | Generate the web site and verify the results. The home page has two sections, posts and pages, and each section has the right set of headings and links in it. 974 | 975 | But, that about page still renders to about-time/index.html. 976 | 977 | ``` 978 | $ find public -name '*.html' | xargs ls -l 979 | -rw-rw-r-- 1 mdhender staff 334 Sep 27 15:33 public/about-time/index.html 980 | -rw-rw-r-- 1 mdhender staff 645 Sep 27 15:33 public/index.html 981 | -rw-rw-r-- 1 mdhender staff 358 Sep 27 15:33 public/post/first-post/index.html 982 | -rw-rw-r-- 1 mdhender staff 0 Sep 27 15:33 public/post/index.html 983 | -rw-rw-r-- 1 mdhender staff 342 Sep 27 15:33 public/post/second-post/index.html 984 | ``` 985 | 986 | Knowing that hugo is using the slug to generate the file name, the simplest solution is to change the slug. Let's do it the hard way and change the permalink in the configuration file. 987 | 988 | ``` 989 | $ vi config.toml 990 | [permalinks] 991 | page: "/:title/" 992 | about: "/:filename/" 993 | ``` 994 | 995 | Generate the web site and verify that this didn't work. Hugo lets "slug" or "URL" override the permalinks setting in the configuration file. Go ahead and comment out the slug in content/about.md, then generate the web site to get it to be created in the right place. 996 | 997 | ## Sharing Templates 998 | 999 | If you've been following along, you probably noticed that posts have titles in the browser and the home page doesn't. That's because we didn't put the title in the home page's template (layouts/index.html). That's an easy thing to do, but let's look at a different option. 1000 | 1001 | We can put the common bits into a shared template that's stored in the themes/zafta/layouts/partials/ directory. 1002 | 1003 | ### Create the Header and Footer Partials 1004 | 1005 | In Hugo, a partial is a sugar-coated template. Normally a template reference has a path specified. Partials are different. Hugo searches for them along a TODO defined search path. This makes it easier for end-users to override the theme's presentation. 1006 | 1007 | ``` 1008 | $ vi themes/zafta/layouts/partials/header.html 1009 | 1010 | 1011 | 1012 | {{ .Title }} 1013 | 1014 | 1015 | :wq 1016 | 1017 | $ vi themes/zafta/layouts/partials/footer.html 1018 | 1019 | 1020 | :wq 1021 | ``` 1022 | 1023 | ### Update the Home Page Template to Use the Partials 1024 | 1025 | The most noticeable difference between a template call and a partials call is the lack of path: 1026 | 1027 | ``` 1028 | {{ template "theme/partials/header.html" . }} 1029 | ``` 1030 | versus 1031 | ``` 1032 | {{ partial "header.html" . }} 1033 | ``` 1034 | Both pass in the context. 1035 | 1036 | Let's change the home page template to use these new partials. 1037 | 1038 | ``` 1039 | $ vi themes/zafta/layouts/index.html 1040 | {{ partial "header.html" . }} 1041 | 1042 |

    posts

    1043 | {{ range first 10 .Data.Pages }} 1044 | {{ if eq .Type "post"}} 1045 |

    {{ .Title }}

    1046 | {{ end }} 1047 | {{ end }} 1048 | 1049 |

    pages

    1050 | {{ range .Data.Pages }} 1051 | {{ if or (eq .Type "page") (eq .Type "about") }} 1052 |

    {{ .Type }} - {{ .Title }} - {{ .RelPermalink }}

    1053 | {{ end }} 1054 | {{ end }} 1055 | 1056 | {{ partial "footer.html" . }} 1057 | :wq 1058 | ``` 1059 | 1060 | Generate the web site and verify the results. The title on the home page is now "your title here", which comes from the "title" variable in the config.toml file. 1061 | 1062 | ### Update the Default Single Template to Use the Partials 1063 | 1064 | ``` 1065 | $ vi themes/zafta/layouts/_default/single.html 1066 | {{ partial "header.html" . }} 1067 | 1068 |

    {{ .Title }}

    1069 | {{ .Content }} 1070 | 1071 | {{ partial "footer.html" . }} 1072 | :wq 1073 | ``` 1074 | 1075 | Generate the web site and verify the results. The title on the posts and the about page should both reflect the value in the markdown file. 1076 | 1077 | ## Add “Date Published” to Posts 1078 | 1079 | It's common to have posts display the date that they were written or published, so let's add that. The front matter of our posts has a variable named "date." It's usually the date the content was created, but let's pretend that's the value we want to display. 1080 | 1081 | ### Add “Date Published” to the Template 1082 | 1083 | We'll start by updating the template used to render the posts. The template code will look like: 1084 | 1085 | ``` 1086 | {{ .Date.Format "Mon, Jan 2, 2006" }} 1087 | ``` 1088 | 1089 | Posts use the default single template, so we'll change that file. 1090 | 1091 | ``` 1092 | $ vi themes/zafta/layouts/_default/single.html 1093 | {{ partial "header.html" . }} 1094 | 1095 |

    {{ .Title }}

    1096 |

    {{ .Date.Format "Mon, Jan 2, 2006" }}

    1097 | {{ .Content }} 1098 | 1099 | {{ partial "footer.html" . }} 1100 | :wq 1101 | ``` 1102 | 1103 | Generate the web site and verify the results. The posts now have the date displayed in them. There's a problem, though. The "about" page also has the date displayed. 1104 | 1105 | As usual, there are a couple of ways to make the date display only on posts. We could do an "if" statement like we did on the home page. Another way would be to create a separate template for posts. 1106 | 1107 | The "if" solution works for sites that have just a couple of content types. It aligns with the principle of "code for today," too. 1108 | 1109 | Let's assume, though, that we've made our site so complex that we feel we have to create a new template type. In Hugo-speak, we're going to create a section template. 1110 | 1111 | Let's restore the default single template before we forget. 1112 | 1113 | ``` 1114 | $ mkdir themes/zafta/layouts/post 1115 | $ vi themes/zafta/layouts/_default/single.html 1116 | {{ partial "header.html" . }} 1117 | 1118 |

    {{ .Title }}

    1119 | {{ .Content }} 1120 | 1121 | {{ partial "footer.html" . }} 1122 | :wq 1123 | ``` 1124 | 1125 | Now we'll update the post's version of the single template. If you remember Hugo's rules, the template engine will use this version over the default. 1126 | 1127 | ``` 1128 | $ vi themes/zafta/layouts/post/single.html 1129 | {{ partial "header.html" . }} 1130 | 1131 |

    {{ .Title }}

    1132 |

    {{ .Date.Format "Mon, Jan 2, 2006" }}

    1133 | {{ .Content }} 1134 | 1135 | {{ partial "footer.html" . }} 1136 | :wq 1137 | 1138 | ``` 1139 | 1140 | Note that we removed the date logic from the default template and put it in the post template. Generate the web site and verify the results. Posts have dates and the about page doesn't. 1141 | 1142 | ### Don't Repeat Yourself 1143 | 1144 | DRY is a good design goal and Hugo does a great job supporting it. Part of the art of a good template is knowing when to add a new template and when to update an existing one. While you're figuring that out, accept that you'll be doing some refactoring. Hugo makes that easy and fast, so it's okay to delay splitting up a template. 1145 | --------------------------------------------------------------------------------