├── layouts
├── partials
│ ├── foot.html
│ ├── head.html
│ ├── navigation.html
│ └── pagination.html
└── _default
│ ├── single.html
│ ├── list.html
│ └── baseof.html
├── .gitignore
├── static
└── img
│ └── logo.svg
├── images
├── tn.png
└── screenshot.png
├── exampleSite
├── resources
│ └── _gen
│ │ └── assets
│ │ └── scss
│ │ └── css
│ │ ├── main.scss_f300667da4f5b5f84e1a9e0702b2fdde.json
│ │ ├── main.scss_c70ce94df64e4b85862f2e706592873a.json
│ │ ├── main.scss_48b060fe05b0a273d182ef83c0605941.json
│ │ ├── colors-dark.scss_48b060fe05b0a273d182ef83c0605941.json
│ │ ├── colors-gray.scss_48b060fe05b0a273d182ef83c0605941.json
│ │ ├── colors-light.scss_48b060fe05b0a273d182ef83c0605941.json
│ │ ├── colors-preference.scss_48b060fe05b0a273d182ef83c0605941.json
│ │ ├── colors-dark.scss_48b060fe05b0a273d182ef83c0605941.content
│ │ ├── colors-gray.scss_48b060fe05b0a273d182ef83c0605941.content
│ │ ├── colors-light.scss_48b060fe05b0a273d182ef83c0605941.content
│ │ ├── main.scss_48b060fe05b0a273d182ef83c0605941.content
│ │ ├── main.scss_f300667da4f5b5f84e1a9e0702b2fdde.content
│ │ ├── main.scss_c70ce94df64e4b85862f2e706592873a.content
│ │ └── colors-preference.scss_48b060fe05b0a273d182ef83c0605941.content
└── config.toml
├── assets
└── css
│ ├── colors-preference.scss
│ ├── colors-dark.scss
│ ├── colors-gray.scss
│ ├── colors-light.scss
│ └── layout.scss
├── theme.toml
├── README.md
└── LICENSE.md
/layouts/partials/foot.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/layouts/partials/head.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | exampleSite/content/
3 | exampleSite/static/
4 |
--------------------------------------------------------------------------------
/static/img/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/images/tn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bake/solar-theme-hugo/HEAD/images/tn.png
--------------------------------------------------------------------------------
/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bake/solar-theme-hugo/HEAD/images/screenshot.png
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/scss/css/main.scss_f300667da4f5b5f84e1a9e0702b2fdde.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/main.css","MediaType":"text/css","Data":{}}
--------------------------------------------------------------------------------
/assets/css/colors-preference.scss:
--------------------------------------------------------------------------------
1 | @media (prefers-color-scheme: dark), (prefers-color-scheme: no-preference) {
2 | @import 'colors-dark';
3 | }
4 | @media (prefers-color-scheme: light) {
5 | @import 'colors-light';
6 | }
7 |
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/scss/css/main.scss_c70ce94df64e4b85862f2e706592873a.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/main.fcaf6a8746172d5244ff0ded866af96f19e117eff176a258179acea41c8be0e5.css","MediaType":"text/css","Data":{"Integrity":"sha256-/K9qh0YXLVJE/w3thmr5bxnhF+/xdqJYF5rOpByL4OU="}}
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/scss/css/main.scss_48b060fe05b0a273d182ef83c0605941.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/main.min.86d32ed250e6920fbf8dcf2cb1b5d42300fd6dd7f7f92e03e7e6e9c1f3c22ad9.css","MediaType":"text/css","Data":{"Integrity":"sha256-htMu0lDmkg+/jc8ssbXUIwD9bdf3+S4D5+bpwfPCKtk="}}
--------------------------------------------------------------------------------
/layouts/partials/navigation.html:
--------------------------------------------------------------------------------
1 |
2 | {{ range .Site.Menus }}
3 |
8 | {{ end }}
9 |
10 |
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/scss/css/colors-dark.scss_48b060fe05b0a273d182ef83c0605941.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/colors-dark.min.217a2547e8e6c808986d22ef70b50263c2d6a4bbc80ed42e97e280a41103f9b5.css","MediaType":"text/css","Data":{"Integrity":"sha256-IXolR+jmyAiYbSLvcLUCY8LWpLvIDtQul+KApBED+bU="}}
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/scss/css/colors-gray.scss_48b060fe05b0a273d182ef83c0605941.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/colors-gray.min.4be71ae56048492fac0370bd74f8b841260264537589e360bc907ac6963c245b.css","MediaType":"text/css","Data":{"Integrity":"sha256-S+ca5WBISS+sA3C9dPi4QSYCZFN1ieNgvJB6xpY8JFs="}}
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/scss/css/colors-light.scss_48b060fe05b0a273d182ef83c0605941.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/colors-light.min.a474b597f817fb3416ddb72c91a320b9a156490617b4119cb9948ba34e014ca9.css","MediaType":"text/css","Data":{"Integrity":"sha256-pHS1l/gX+zQW3bcskaMguaFWSQYXtBGcuZSLo04BTKk="}}
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/scss/css/colors-preference.scss_48b060fe05b0a273d182ef83c0605941.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/colors-preference.min.a65e4173e6288241b66a095ab4a0d5718d726f5c8d5f0722d9bd283ead128a85.css","MediaType":"text/css","Data":{"Integrity":"sha256-pl5Bc+YogkG2aglatKDVcY1yb1yNXwci2b0oPq0SioU="}}
--------------------------------------------------------------------------------
/layouts/_default/single.html:
--------------------------------------------------------------------------------
1 | {{ define "main" }}
2 |
3 | {{ .Title }} {{ if .Draft }}(Draft){{ end }}
4 |
5 | {{ .Content | safeHTML }}
6 |
7 | Posted on {{ .Date.Format "02. January 2006" }}
8 |
9 | {{ end }}
10 |
--------------------------------------------------------------------------------
/layouts/_default/list.html:
--------------------------------------------------------------------------------
1 | {{ define "main" }}
2 | {{ range .Paginator.Pages }}
3 |
4 | {{ .Title }} {{ if .Draft }}(Draft){{ end }}
5 |
6 |
7 |
{{ .Summary | plainify | safeHTML }} {{ if .Truncated }} … {{ end }}
8 |
9 |
10 | Posted on {{ .Date.Format "02. January 2006" }}
11 |
12 | {{ end }}
13 |
14 | {{ partial "pagination.html" . }}
15 | {{ end }}
16 |
--------------------------------------------------------------------------------
/theme.toml:
--------------------------------------------------------------------------------
1 | name = "solar-theme-hugo"
2 | license = "GPLv2"
3 | licenselink = "https://github.com/bake/solar-theme-hugo/blob/master/LICENSE.md"
4 | description = "A light or dark minimalistic theme"
5 | homepage = "https://github.com/bake/solar-theme-hugo"
6 | tags = ["blog", "light", "dark", "responsive", "solarized"]
7 | features = []
8 | min_version = "0.25.1"
9 |
10 | [author]
11 | name = "bake"
12 | homepage = "https://192k.pw/"
13 |
14 | [original]
15 | author = "mattvh"
16 | name = "solar-theme-ghost"
17 | repo = "https://github.com/mattvh/solar-theme-ghost"
18 |
--------------------------------------------------------------------------------
/layouts/partials/pagination.html:
--------------------------------------------------------------------------------
1 | {{ if or .Paginator.HasPrev .Paginator.HasNext }}
2 |
11 | {{ end }}
12 |
--------------------------------------------------------------------------------
/exampleSite/config.toml:
--------------------------------------------------------------------------------
1 | title = "Solar Theme"
2 | theme = "solar-theme-hugo"
3 | paginate = 5
4 | pygmentsStyle = "solarized-dark" # solarized-light, -dark or -dark256
5 | copyright = ""
6 |
7 | [params]
8 | scheme = "preference" # light, dark, gray or preference
9 | description = "A wizard is never late"
10 |
11 | [menu]
12 | [[menu.main]]
13 | name = "Feed"
14 | url = "/index.xml"
15 | [[menu.main]]
16 | name = "Repository"
17 | url = "https://github.com/bake/solar-theme-hugo/"
18 | [[menu.other]]
19 | name = "Hugo"
20 | url = "https://themes.gohugo.io/solar-theme-hugo/"
21 | [[menu.other]]
22 | name = "Demo"
23 | url = "https://themes.gohugo.io/theme/solar-theme-hugo/"
24 |
--------------------------------------------------------------------------------
/assets/css/colors-dark.scss:
--------------------------------------------------------------------------------
1 | @import 'layout';
2 |
3 | html,
4 | body {
5 | background-color: #002a35;
6 | color: #839496;
7 | }
8 |
9 | ::selection {
10 | background: rgba(255, 255, 255, 0.05);
11 | }
12 |
13 | a,
14 | a:visited,
15 | a:active,
16 | a code {
17 | color: #2aa198;
18 | border-color: #073642;
19 | }
20 |
21 | a:hover {
22 | background-color: #073642;
23 | border-color: #073642;
24 | color: #2aa198;
25 | }
26 |
27 | hr {
28 | border-color: #073642;
29 | }
30 |
31 | h1,
32 | h2,
33 | h3 {
34 | color: #cb4b16;
35 | }
36 |
37 | h1 a,
38 | h1 a:visited,
39 | h1 a:active {
40 | color: #cb4b16;
41 | }
42 |
43 | h1 a:hover {
44 | background-color: #073642;
45 | border-color: #073642;
46 | color: #cb4b16;
47 | }
48 |
49 | article h1 a.anchor {
50 | color: #2aa198;
51 | }
52 |
53 | blockquote {
54 | border-color: #cb4b16;
55 | }
56 |
57 | #sidebar a:hover {
58 | background-color: transparent;
59 | }
60 |
61 | #sidebar a:hover span {
62 | color: #2aa198;
63 | background-color: #073642;
64 | }
65 |
66 | #footer {
67 | border-color: #073642;
68 | }
69 |
70 | .hljs {
71 | background: none;
72 | }
73 |
--------------------------------------------------------------------------------
/assets/css/colors-gray.scss:
--------------------------------------------------------------------------------
1 | @import 'layout';
2 |
3 | html,
4 | body {
5 | background-color: #222;
6 | color: #839496;
7 | }
8 |
9 | ::selection {
10 | background: rgba(255, 255, 255, 0.05);
11 | }
12 |
13 | a,
14 | a:visited,
15 | a:active,
16 | a code {
17 | color: #2aa198;
18 | border-color: #2b2b2b;
19 | }
20 |
21 | a:hover {
22 | background-color: #2b2b2b;
23 | border-color: #2b2b2b;
24 | color: #2aa198;
25 | }
26 |
27 | hr {
28 | border-color: #2b2b2b;
29 | }
30 |
31 | h1,
32 | h2,
33 | h3 {
34 | color: #cb4b16;
35 | }
36 |
37 | h1 a,
38 | h1 a:visited,
39 | h1 a:active {
40 | color: #cb4b16;
41 | }
42 |
43 | h1 a:hover {
44 | background-color: #2b2b2b;
45 | border-color: #2b2b2b;
46 | color: #cb4b16;
47 | }
48 |
49 | article h1 a.anchor {
50 | color: #2aa198;
51 | }
52 |
53 | blockquote {
54 | border-color: #cb4b16;
55 | }
56 |
57 | #sidebar a:hover {
58 | background-color: transparent;
59 | }
60 |
61 | #sidebar a:hover span {
62 | color: #2aa198;
63 | background-color: #2b2b2b;
64 | }
65 |
66 | #footer {
67 | border-color: #2b2b2b;
68 | }
69 |
70 | .hljs {
71 | background: none;
72 | }
73 |
--------------------------------------------------------------------------------
/assets/css/colors-light.scss:
--------------------------------------------------------------------------------
1 | @import 'layout';
2 |
3 | html,
4 | body {
5 | background-color: #fdf6e3;
6 | color: #839496;
7 | }
8 |
9 | ::selection {
10 | background: rgba(0, 0, 0, 0.05);
11 | }
12 |
13 | a,
14 | a:visited,
15 | a:active,
16 | a code {
17 | color: #2aa198;
18 | border-color: #eee8d5;
19 | }
20 |
21 | a:hover {
22 | background-color: #eee8d5;
23 | border-color: #eee8d5;
24 | color: #2aa198;
25 | }
26 |
27 | hr {
28 | border-color: #eee8d5;
29 | }
30 |
31 | h1,
32 | h2,
33 | h3 {
34 | color: #cb4b16;
35 | }
36 |
37 | h1 a,
38 | h1 a:visited,
39 | h1 a:active {
40 | color: #cb4b16;
41 | }
42 |
43 | h1 a:hover {
44 | background-color: #eee8d5;
45 | border-color: #eee8d5;
46 | }
47 |
48 | article h1 a.anchor {
49 | color: #2aa198;
50 | }
51 |
52 | blockquote {
53 | border-color: #cb4b16;
54 | }
55 |
56 | #sidebar a:hover {
57 | background-color: transparent;
58 | }
59 |
60 | #sidebar a:hover span {
61 | color: #2aa198;
62 | background-color: #eee8d5;
63 | }
64 |
65 | #footer {
66 | border-color: #eee8d5;
67 | }
68 |
69 | pre code {
70 | background-color: #eee8d5;
71 | color: #657b83;
72 | border: 1px solid #d6ceb6;
73 | border-radius: 3px 3px 3px 3px;
74 | overflow: auto;
75 | padding: 6px 10px;
76 | }
77 |
78 | .hljs {
79 | background: none;
80 | }
81 |
--------------------------------------------------------------------------------
/layouts/_default/baseof.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{ with .OutputFormats.Get "RSS" }}
7 |
8 |
9 | {{ end }}
10 |
11 | {{ .Title }}
12 |
13 | {{ $style := resources.Get (printf "css/colors-%s.scss" (.Site.Params.scheme | default "dark")) | toCSS | minify | fingerprint }}
14 |
15 |
16 | {{ partial "head.html" . }}
17 |
18 |
19 |
23 |
24 |
25 |
28 |
29 |
30 | {{ block "main" . }}{{ end }}
31 |
32 |
33 |
43 |
44 |
45 | {{ partial "foot.html" . }}
46 |
47 |
48 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Solar Theme for Hugo
2 |
3 | A minimalistic theme for [Hugo](https://gohugo.io/) blogs, fork of
4 | [Solar Theme for Ghost](https://github.com/mattvh/solar-theme-ghost). There is a
5 | demo available on
6 | [Hugos theme list](https://themes.gohugo.io/theme/solar-theme-hugo/). See the
7 | [example config.toml](exampleSite/config.toml) for a starting point.
8 |
9 | ## Color schemes
10 |
11 | Solar offers three color schemes: (Solarized) `light`, (Solarized) `dark`
12 | (default) and `gray`. Additionally there is a `preference` setting which
13 | switches between `light` and `dark` according to the users preference.
14 |
15 | ## Screenshot
16 |
17 | 
18 |
19 | ## Additional HTML
20 |
21 | Custom HTML can be injected just before `` and `