├── LICENSE.md ├── README.md ├── archetypes ├── default.md └── posts.md ├── images ├── screenshot.png └── tn.png ├── layouts ├── _default │ ├── _markup │ │ └── render-image.html │ ├── baseof.html │ ├── list.html │ ├── single.html │ └── summary.html ├── index.html └── partials │ ├── footer.html │ ├── header.html │ ├── pagination.html │ └── sidebar.html ├── static └── css │ └── style.css └── theme.toml /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Vimux 4 | 5 | Copyright (c) 2020 colorchestra 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | this software and associated documentation files (the "Software"), to deal in 9 | the Software without restriction, including without limitation the rights to 10 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | the Software, and to permit persons to whom the Software is furnished to do so, 12 | subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # smol 2 | 3 | A minimal, monospaced blogging theme for Hugo that respects your privacy and is easy on your bandwidth. A demo can be found at https://smol-demo.morph.sh. 4 | 5 | smol is based on [Blank](https://github.com/Vimux/Blank) created by [Vimux](https://github.com/Vimux). 6 | 7 | 8 | ![Screenshot](/images/tn.png) 9 | 10 | ## Features 11 | 12 | - No JavaScript 13 | - No Google spyware or tracking of any kind 14 | - No other external dependencies, embedded fonts or comment sections 15 | - Dark mode support (depending on your OS's setting) 16 | 17 | ## Installation 18 | 19 | In your Hugo site `themes` directory, run: 20 | 21 | ``` 22 | git clone https://github.com/colorchestra/smol 23 | ``` 24 | 25 | Next, open `config.toml` in the base of the Hugo site and ensure the theme option is set to `smol`. 26 | 27 | ``` 28 | theme = "smol" 29 | ``` 30 | 31 | Lastly, add the following lines to your `config.toml` to set site parameters and make use of all the menu entries in the header and footer sections if you need them. 32 | 33 | ``` 34 | # Parameters 35 | [params] 36 | subtitle = "Your blog subtitle goes here!" 37 | dateFmt = "02.01.2006 15:04" 38 | 39 | # Header 40 | [menu] 41 | [[menu.main]] 42 | identifier = "posts" 43 | name = "Posts" 44 | url = "/posts/" 45 | weight = 1 46 | 47 | [[menu.main]] 48 | identifier = "categories" 49 | name = "Categories" 50 | url = "/categories/" 51 | weight = 2 52 | 53 | [[menu.main]] 54 | identifier = "tags" 55 | name = "Tags" 56 | url = "/tags/" 57 | weight = 3 58 | 59 | # Footer 60 | [[menu.footer]] 61 | name = "Github" 62 | url = "https://github.com/example" 63 | weight = 1 64 | 65 | [[menu.footer]] 66 | name = "Mastodon" 67 | url = "https://example.com/@user" 68 | weight = 2 69 | 70 | [[menu.footer]] 71 | name = "Imprint" 72 | url = "/imprint" 73 | weight = 3 74 | 75 | ``` 76 | 77 | For more information read the official [quick start guide](https://gohugo.io/getting-started/quick-start/) of Hugo. 78 | 79 | ## Optional features 80 | ### Custom copyright text 81 | Add `copyright = "Your text here"` - in the config.toml to change the copyright notice in the footer. 82 | 83 | ### Image captions 84 | You can add captions to images (technically using `
` HTML tags) by adding titles, like so: `![Alt text here](/path/to/image.png "Put your caption here!")` 85 | 86 | ## Contributing 87 | 88 | Have you found a bug or got an idea for a new feature? Feel free to use the [issue tracker](https://github.com/colorchestra/smol/issues) to let me know. Or make directly a [pull request](https://github.com/colorchestra/smol/pulls). 89 | 90 | ## License 91 | 92 | This theme is released under the [MIT license](https://github.com/colorchestra/smol/blob/master/LICENSE). 93 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "{{ replace .Name "-" " " | title }}" 3 | date = {{ .Date }} 4 | +++ 5 | -------------------------------------------------------------------------------- /archetypes/posts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | slug: {{ now.Format "2006-01-02" }}-{{ .Name | urlize }} 5 | type: posts 6 | draft: true 7 | categories: 8 | - default 9 | tags: 10 | - default 11 | --- 12 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colorchestra/smol/9c5b894c09507df23a167eaddd9a1a351d89cbf4/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colorchestra/smol/9c5b894c09507df23a167eaddd9a1a351d89cbf4/images/tn.png -------------------------------------------------------------------------------- /layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{ if .Title }} 2 |
3 | {{ .Text }} 4 |
{{ .Title }}
5 |
6 | {{ else }} 7 |
8 | {{ .Text }} 9 |
10 | {{ end }} 11 | 12 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ .Title }} 9 | {{ with .Site.Params.description }}{{ end }} 10 | {{ with .Site.Params.author }}{{ end }} 11 | 12 | {{ range .Site.Params.customCSS -}} 13 | 14 | {{- end }} 15 | {{ with .OutputFormats.Get "RSS" -}} 16 | {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} 17 | {{- end }} 18 | 19 | 20 | {{ partial "header" . }} 21 | {{ block "main" . }}{{ end }} 22 | {{ partial "footer" . }} 23 | 24 | 25 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 | {{ $listtitle := .Title }} 4 | {{ if or .Title .Content }} 5 |
6 | {{ with .Title }}

{{ . }}

{{ end }} 7 | {{ with .Content }}
{{ . }}
{{ end }} 8 |
9 | {{ end }} 10 | 11 | 24 | {{ partial "pagination.html" . }} 25 |
26 | {{ end }} 27 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |

{{ .Title }}

5 | 6 | {{ range .Params.tags }} 7 | {{ . }} 8 | {{ end }} 9 | 10 |
11 | {{ .Content }} 12 |
13 |
14 |
15 | {{ partial "sidebar.html" . }} 16 | {{ end }} 17 | -------------------------------------------------------------------------------- /layouts/_default/summary.html: -------------------------------------------------------------------------------- 1 |
2 |

{{ .Title }}

3 | 4 | {{ range .Params.tags }} 5 | {{ . }} 6 | {{ end }} 7 |
8 | {{ .Summary }} 9 | {{ if .Truncated }} 10 | Read more... 11 | {{ end }} 12 |
13 |
14 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 | {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} 4 | {{ range $paginator.Pages }} 5 | {{ .Render "summary" }} 6 | {{ end }} 7 | {{ partial "pagination.html" . }} 8 |
9 | {{ end }} 10 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 |
2 | {{ strings.Repeat ( .Site.Title | len | add 6 ) "=" }}
3 | == {{ .Site.Title }} ==
4 | {{ strings.Repeat ( .Site.Title | len | add 6 ) "=" }} 5 |
{{ .Site.Params.subtitle }}

6 |

7 |

14 |

15 | {{ end }} 16 |
17 | -------------------------------------------------------------------------------- /layouts/partials/pagination.html: -------------------------------------------------------------------------------- 1 |
2 | {{ if .Paginator.HasPrev }} 3 | Previous Page 4 | {{ end }} 5 | {{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }} 6 | {{ if .Paginator.HasNext }} 7 | Next Page 8 | {{ end }} 9 |
10 | -------------------------------------------------------------------------------- /layouts/partials/sidebar.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /static/css/style.css: -------------------------------------------------------------------------------- 1 | html {overflow-y: scroll} 2 | :root { --bgcolor: white; --fontcolor: #444; --linkcolor: #00e; --visitedcolor: #551a8b; --precolor: #fff; --prebgcolor: #000;} 3 | @media (prefers-color-scheme: dark) { :root { --bgcolor: black; --fontcolor: white; --linkcolor: #5bf; --visitedcolor: #ae5ee0; --precolor: #fff; --prebgcolor: #383838;}} 4 | body{max-width:800px;margin:40px auto;padding:0 10px;font:14px/1.5 monospace;color:var(--fontcolor); background: var(--bgcolor)}a:link{color: var(--linkcolor)}a:visited{color: var(--visitedcolor)}a:active{color: var(--visitedcolor)}h1,h2,h3{line-height:1.2} 5 | p > code{color: var(--precolor); background: var(--prebgcolor); padding:2px} 6 | code{color: var(--precolor); background: var(--prebgcolor); padding:2px} 7 | pre{color: var(--precolor); background: var(--prebgcolor); padding:24px; overflow-x: auto} 8 | article{padding:24px 0} 9 | .center {display: block;margin-left: auto;margin-right: auto;width: 100%;} 10 | figcaption {color: #888; font: 12px/1.5 monospace; text-align: center;} 11 | figure {margin: auto} 12 | img {display: block; max-width: 100%; height: auto; margin: auto} 13 | -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | name = "smol" 2 | license = "MIT" 3 | licenselink = "https://github.com/colorchestra/smol/blob/master/LICENSE.md" 4 | description = "Minimal Hugo theme using a Monospace font and without any tracking or external dependencies." 5 | homepage = "https://github.com/colorchestra/smol" 6 | tags = ["blog", "minimal", "monospace", "dark mode", "simple", "clean", "light", "responsive", "fast", "no-js", "no-tracking", "privacy"] 7 | features = ["blog", "privacy", "responsive", "fast"] 8 | min_version = "0.20" 9 | 10 | [author] 11 | name = "morph" 12 | homepage = "morph.sh" 13 | 14 | [original] 15 | author = "Vimux" 16 | homepage = "https://github.com/Vimux" 17 | repo = "https://github.com/Vimux/blank" 18 | --------------------------------------------------------------------------------