├── layouts
├── _default
│ ├── single.html
│ ├── list.html
│ ├── rss.xml
│ └── baseof.html
├── shortcodes
│ ├── vid.html
│ ├── hidvid.html
│ ├── tagcloud.html
│ └── img.html
└── partials
│ ├── nextprev.html
│ ├── nav.html
│ └── taglist.html
├── archetypes
└── default.md
├── config.toml
├── static
├── style.css
└── rss.svg
├── README.md
└── .github
└── workflows
└── upload.yml
/layouts/_default/single.html:
--------------------------------------------------------------------------------
1 | {{ define "title" -}}
2 | {{ .Title }}
3 | {{- end }}
4 |
--------------------------------------------------------------------------------
/archetypes/default.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "{{ replace .Name "-" " " | title }}"
3 | date: {{ .Date }}
4 | draft: true
5 | ---
6 |
7 |
--------------------------------------------------------------------------------
/layouts/shortcodes/vid.html:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/layouts/partials/nextprev.html:
--------------------------------------------------------------------------------
1 | {{ if or .Next .Prev -}}
2 |
10 | {{ end -}}
11 |
--------------------------------------------------------------------------------
/layouts/shortcodes/hidvid.html:
--------------------------------------------------------------------------------
1 |
2 | Click to reveal video.
3 |
10 |
11 |
--------------------------------------------------------------------------------
/layouts/shortcodes/tagcloud.html:
--------------------------------------------------------------------------------
1 | {{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }}
2 | {{ range $name, $items := .Site.Taxonomies.tags }}{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}- {{ $name | title }}
3 | {{ end }}
{{ end }}{{ end }}
4 |
--------------------------------------------------------------------------------
/config.toml:
--------------------------------------------------------------------------------
1 | title = "Website Name"
2 | baseURL = 'https://example.org'
3 | languageCode = 'en-us'
4 |
5 | [params]
6 | # "relatedtext" is the text that appears above the tag list at the bottom of pages.
7 | relatedtext = "Related"
8 | favicon = "/favicon.ico"
9 |
10 | #list items
11 | datesinlist = true
12 | authorsinlist = true
13 |
14 | #footer items
15 | nextprev = true
16 | taglist = true
17 | showrss = true
--------------------------------------------------------------------------------
/layouts/partials/nav.html:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/layouts/_default/list.html:
--------------------------------------------------------------------------------
1 | {{ define "title" -}}
2 | {{ .Title | title }}
3 | {{- end }}
4 | {{ define "main" -}}
5 | {{ .Content }}
6 |
7 | {{- range.Pages }}
8 | -
9 | {{- if .Param "datesinlist" }} – {{ end -}}
10 | {{ .Title }}
11 | {{- if .Param "authorsinlist" }}
12 | {{ with .Params.authors }}
13 | by
14 | {{ delimit . ", " " and " }}
15 | {{end}}
16 | {{ end -}}
17 |
18 | {{- end }}
19 |
20 | {{- end }}
21 |
--------------------------------------------------------------------------------
/layouts/partials/taglist.html:
--------------------------------------------------------------------------------
1 | {{- if isset .Params "tags" -}}
2 | {{- $tagsLen := len .Params.tags -}}
3 | {{- if gt $tagsLen 0 -}}
4 |
5 | {{- with .Site.Params.relatedtext }}{{ . }}
{{ end -}}
6 | {{- range $k, $v := .Params.tags -}}
7 | {{- $url := printf "/tags/%s" (. | urlize | lower) -}}
8 |
{{ . | title }}
9 | {{- if lt $k (sub $tagsLen 1) }} · {{ end -}}
10 | {{- end -}}
11 |
12 | {{- end -}}
13 | {{- end }}
14 |
--------------------------------------------------------------------------------
/layouts/shortcodes/img.html:
--------------------------------------------------------------------------------
1 |
8 |
9 | {{- with .Get "link"}}{{ end -}}
10 |
15 | {{- if .Get "link"}}{{ end -}}
16 | {{- with .Get "caption" -}}
17 |
18 | {{- . -}}
19 |
20 | {{- end -}}
21 |
22 |
--------------------------------------------------------------------------------
/static/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: sans-serif ;
3 | background: #110000 ;
4 | color: #ccc ;
5 | }
6 |
7 | main {
8 | max-width: 800px ;
9 | margin: auto ;
10 | }
11 |
12 | img {
13 | max-width: 100% ;
14 | }
15 |
16 | header h1 {
17 | text-align: center ;
18 | }
19 |
20 | footer {
21 | text-align: center ;
22 | clear: both ;
23 | }
24 |
25 | /* For TAGLIST.HTML */
26 | .taglist {
27 | text-align: center ;
28 | clear: both ;
29 | }
30 |
31 | /* For NEXTPREV.HTML */
32 | #nextprev {
33 | /* The container for both the previous and next articles. */
34 | }
35 | #prevart {
36 | float: left ;
37 | text-align: left ;
38 | }
39 | #nextart {
40 | float: right ;
41 | text-align: right ;
42 | }
43 | #nextart,#prevart {
44 | max-width: 33% ;
45 | }
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Luke's Hugo Theme
2 |
3 | A simple Hugo theme I plan on using for my personal website, [Based.Cooking](https://based.cooking) and [LandChad.net](https://landchad.net).
4 |
5 | ## get started
6 |
7 | ```sh
8 | hugo new site new-site
9 | cd new-site
10 | git clone https://github.com/lukesmithxyz/lugo themes/lugo
11 | echo "theme = 'lugo'" >> config.toml
12 | cp themes/lugo/static/style.css static/
13 | ```
14 |
15 | ## stuff
16 |
17 | - Makes one RSS feed for the entire site at `/index.xml`
18 | - Stylesheet is in `/style.css` and includes some important stuff for partials.
19 | - If a post is tagged, links to the tags are placed at the bottom of the post.
20 | - `nextprev.html` adds links to the Next and Previous articles to the bottom of a page.
21 | - `taglist.html` links all tags an article is tagged to for related content.
22 |
--------------------------------------------------------------------------------
/static/rss.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.github/workflows/upload.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | # Controls when the action will run.
4 | on:
5 | # Triggers the workflow on push to master (including merged PRs)
6 | push:
7 | branches: [ master ]
8 |
9 | # Allows you to run this workflow manually from the Actions tab
10 | workflow_dispatch:
11 |
12 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
13 | jobs:
14 | # This workflow contains a single job called "build"
15 | update:
16 | # The type of runner that the job will run on
17 | runs-on: ubuntu-latest
18 |
19 | # Steps represent a sequence of tasks that will be executed as part of the job
20 | steps:
21 | - name: Updating website.
22 | uses: appleboy/ssh-action@master
23 | with:
24 | host: lukesmith.xyz
25 | username: lugo
26 | key: ${{ secrets.lugo_ssh }}
27 | passphrase: ${{ secrets.lugo_pass }}
28 | port: 22
29 | script: |
30 | cd /var/www/lugo
31 | git stash
32 | git pull --force origin master
33 |
--------------------------------------------------------------------------------
/layouts/_default/rss.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ .Site.Title }}
4 | {{ .Permalink }}
5 | Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}
6 | Hugo -- gohugo.io{{ with .Site.LanguageCode }}
7 | {{.}}{{end}}{{ with .Site.Author.email }}
8 | {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }}
9 | {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }}
10 | {{.}}{{end}}{{ if not .Date.IsZero }}
11 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }}
12 | {{ with .OutputFormats.Get "RSS" }}
13 | {{ printf "" .Permalink .MediaType | safeHTML }}
14 | {{ end }}
15 | {{ range .Site.RegularPages }}
16 | -
17 | {{ .Title }}
18 | {{ .Permalink }}
19 | {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
20 | {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}
21 | {{ .Permalink }}
22 | {{- .Content | html -}}
23 |
24 | {{ end }}
25 |
26 |
27 |
--------------------------------------------------------------------------------
/layouts/_default/baseof.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}
5 |
6 |
7 |
8 | {{ with .Site.Params.favicon }}
9 | {{ end -}}
10 |
11 | {{ if isset .Params "tags" }}
12 | {{ end -}}
13 |
14 |
15 |
16 |
17 |
18 | {{ if .Site.Menus.main }}{{ partial "nav.html" . }}{{ end -}}
19 |
20 | {{ block "title" . }}{{ end }}
21 |
22 | {{ block "main" . }}
23 | {{ .Content }}
24 | {{ end }}
25 | {{ if .Param "nextprev" }}{{ partial "nextprev.html" . -}}{{ end -}}
26 | {{ if .Param "taglist" }}{{ partial "taglist.html" . }}{{ end -}}
27 |
28 |
29 | {{ block "footer" . }}
30 |
34 | {{ end }}
35 |
36 |
37 |
--------------------------------------------------------------------------------