Compare commits
10 commits
0e991a4677
...
7ab6e3802d
Author | SHA1 | Date | |
---|---|---|---|
7ab6e3802d | |||
94f6eff800 | |||
874809c588 | |||
eef539a20e | |||
793953fe61 | |||
ac271dc68c | |||
|
9c5b894c09 | ||
|
4129f82cd7 | ||
|
278e3ea81a | ||
|
8e9a80f7cc |
8 changed files with 118 additions and 17 deletions
|
@ -4,6 +4,8 @@ Copyright (c) 2016 Vimux
|
|||
|
||||
Copyright (c) 2020 colorchestra
|
||||
|
||||
Copyright (c) 2024 fliegerjohn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
|
|
21
README.md
21
README.md
|
@ -1,8 +1,8 @@
|
|||
# smol
|
||||
# smolsite
|
||||
|
||||
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.
|
||||
A minimal, monospaced site theme for Hugo that respects your privacy and is easy on your bandwidth.
|
||||
|
||||
smol is based on [Blank](https://github.com/Vimux/Blank) created by [Vimux](https://github.com/Vimux).
|
||||
smolsite is based on [Smol](https://git.datenkastl.org/fliegerjohn/smol).
|
||||
|
||||
|
||||
![Screenshot](/images/tn.png)
|
||||
|
@ -19,13 +19,13 @@ smol is based on [Blank](https://github.com/Vimux/Blank) created by [Vimux](http
|
|||
In your Hugo site `themes` directory, run:
|
||||
|
||||
```
|
||||
git clone https://github.com/colorchestra/smol
|
||||
git clone https://git.datenkastl.org/fliegerjohn/smolsite.git
|
||||
```
|
||||
|
||||
Next, open `config.toml` in the base of the Hugo site and ensure the theme option is set to `smol`.
|
||||
Next, open `config.toml` in the base of the Hugo site and ensure the theme option is set to `smolsite`.
|
||||
|
||||
```
|
||||
theme = "smol"
|
||||
theme = "smolsite"
|
||||
```
|
||||
|
||||
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.
|
||||
|
@ -85,8 +85,13 @@ You can add captions to images (technically using `<figcaption>` HTML tags) by a
|
|||
|
||||
## Contributing
|
||||
|
||||
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).
|
||||
Have you found a bug or got an idea for a new feature? Feel free to use the [issue tracker](https://git.datenkastl.org/fliegerjohn/smolsite/issues)to let me know. Or make directly a [pull request](https://git.datenkastl.org/fliegerjohn/smolsite/pulls).
|
||||
|
||||
## License
|
||||
|
||||
This theme is released under the [MIT license](https://github.com/colorchestra/smol/blob/master/LICENSE).
|
||||
This theme is released under the [MIT license](https://git.datenkastl.org/fliegerjohn/smolsite/raw/branch/master/LICENSE.md).
|
||||
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Smol - [colorchestra](https://github.com/colorchestra/smol)
|
||||
|
|
11
archetypes/news.md
Normal file
11
archetypes/news.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
slug: {{ now.Format "2006-01-02" }}-{{ .Name | urlize }}
|
||||
type: news
|
||||
draft: true
|
||||
categories:
|
||||
- default
|
||||
tags:
|
||||
- default
|
||||
---
|
11
archetypes/posts.md
Normal file
11
archetypes/posts.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
slug: {{ now.Format "2006-01-02" }}-{{ .Name | urlize }}
|
||||
type: posts
|
||||
draft: true
|
||||
categories:
|
||||
- default
|
||||
tags:
|
||||
- default
|
||||
---
|
72
layouts/_default/index.rss.xml
Normal file
72
layouts/_default/index.rss.xml
Normal file
|
@ -0,0 +1,72 @@
|
|||
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
|
||||
{{- $authorEmail := "" }}
|
||||
{{- with site.Params.author }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- with .email }}
|
||||
{{- $authorEmail = . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Author.email }}
|
||||
{{- $authorEmail = . }}
|
||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
||||
{{- $authorName := "" }}
|
||||
{{- with site.Params.author }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- with .name }}
|
||||
{{- $authorName = . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $authorName = . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Author.name }}
|
||||
{{- $authorName = . }}
|
||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- $pctx := . }}
|
||||
{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
|
||||
{{- $pages := slice }}
|
||||
{{- if or $.IsHome $.IsSection }}
|
||||
{{- $pages = $pctx.RegularPages }}
|
||||
{{- else }}
|
||||
{{- $pages = $pctx.Pages }}
|
||||
{{- end }}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit }}
|
||||
{{- if ge $limit 1 }}
|
||||
{{- $pages = $pages | first $limit }}
|
||||
{{- end }}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
|
||||
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
|
||||
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
|
||||
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end }}
|
||||
|
||||
{{- range where (where .Site.Pages ".Section" "posts") "Kind" "page" }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
|
||||
</item>
|
||||
{{- end }}
|
||||
</channel>
|
||||
</rss>
|
|
@ -2,7 +2,7 @@
|
|||
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
|
||||
<b><time>{{ .Date.Format (default "2006-01-02 15:04:05" .Site.Params.dateFmt) }}</time></b>
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end }}
|
||||
<div>
|
||||
{{ .Summary }}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
html {overflow-y: scroll}
|
||||
:root { --bgcolor: white; --fontcolor: #444; --linkcolor: #00e; --visitedcolor: #551a8b; --precolor: #fff; --prebgcolor: #000;}
|
||||
@media (prefers-color-scheme: dark) { :root { --bgcolor: black; --fontcolor: white; --linkcolor: #5bf; --visitedcolor: #ae5ee0; --precolor: #fff; --prebgcolor: #383838;}}
|
||||
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}
|
||||
:root { --bgcolor: #2c2e38; --fontcolor: white; --linkcolor: #5bf; --visitedcolor: #ae5ee0; --precolor: #fff; --prebgcolor: #383838;}
|
||||
body{max-width:1000px;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}
|
||||
p > code{color: var(--precolor); background: var(--prebgcolor); padding:2px}
|
||||
code{color: var(--precolor); background: var(--prebgcolor); padding:2px}
|
||||
pre{color: var(--precolor); background: var(--prebgcolor); padding:24px; overflow-x: auto}
|
||||
article{padding:24px 0}
|
||||
.center {display: block;margin-left: auto;margin-right: auto;width: 100%;}
|
||||
img {display: block; max-width: 100%; height: auto;}
|
||||
figcaption {color: #888; font: 12px/1.5 monospace; text-align: center;}
|
||||
figure {margin: auto}
|
||||
img {display: block; max-width: 100%; height: auto; margin: auto}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
name = "smol"
|
||||
name = "smolsite"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/colorchestra/smol/blob/master/LICENSE.md"
|
||||
description = "Minimal Hugo theme using a Monospace font and without any tracking or external dependencies."
|
||||
homepage = "https://github.com/colorchestra/smol"
|
||||
tags = ["blog", "minimal", "monospace", "dark mode", "simple", "clean", "light", "responsive", "fast", "no-js", "no-tracking", "privacy"]
|
||||
features = ["blog", "privacy", "responsive", "fast"]
|
||||
tags = ["minimal", "monospace", "dark mode", "simple", "clean", "light", "responsive", "fast", "no-js", "no-tracking", "privacy"]
|
||||
features = ["privacy", "responsive", "fast"]
|
||||
min_version = "0.20"
|
||||
|
||||
[author]
|
||||
|
@ -14,4 +14,4 @@ min_version = "0.20"
|
|||
[original]
|
||||
author = "Vimux"
|
||||
homepage = "https://github.com/Vimux"
|
||||
repo = "https://github.com/colorchestra/blank"
|
||||
repo = "https://github.com/Vimux/blank"
|
||||
|
|
Loading…
Reference in a new issue