From 1891bd816cdad9cf60cb6b175707c9e2ac4f5e99 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Sat, 18 May 2024 17:43:45 -0500 Subject: [PATCH 01/20] Fork off the Project --- layouts/index.html | 12 ++++++++++++ layouts/partials/head.html | 3 +++ layouts/partials/header.html | 21 +++++++++++++-------- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index c596063..77022d7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,19 @@ {{ define "main" }} + {{ partial "metadata.html" . }} +
+ {{ .Content }} +
+
+ {{ range where .Site.RegularPages "Section" "in" .Site.MainSections }} +
+

{{ .LinkTitle }}

+

{{ .Summary }}

+
+ {{ end }} +
{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b2eceb4..4d2d054 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -10,4 +10,7 @@ {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} {{ $title }} {{ partial "hook_head_end.html" . }} + {{ if .IsHome }} + + {{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 7bcaaa8..922aad3 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,15 +1,20 @@ -

{{ $.Site.Title }}

-

{{ $.Site.Params.subtitle }}

- {{ $navbar_style := (default "classy" $.Site.Params.navbar_style) }} +

{{ $.Site.Title }}

+{{ else if .IsPage }} +Go Home + +

{{ $.Site.Params.subtitle }}

+{{ end }} + From 3e45d5582c2adcf52d1ef530423238eb5111a26d Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Sat, 18 May 2024 17:44:00 -0500 Subject: [PATCH 02/20] Add Files --- layouts/partials/home-header.html | 1 + static/css/homepage.css | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 layouts/partials/home-header.html create mode 100644 static/css/homepage.css diff --git a/layouts/partials/home-header.html b/layouts/partials/home-header.html new file mode 100644 index 0000000..a37e40f --- /dev/null +++ b/layouts/partials/home-header.html @@ -0,0 +1 @@ +{{ partial "header.html" }} diff --git a/static/css/homepage.css b/static/css/homepage.css new file mode 100644 index 0000000..e4691c2 --- /dev/null +++ b/static/css/homepage.css @@ -0,0 +1,30 @@ + .articles { + padding: 5px; + border: var(--line-width) solid; + border-top-style: dashed; + border-bottom-style: dashed; + border-right-style: none; + border-left-style: none; + } + section { + border: var(--line-width) solid; + border-left-style: none; + border-right-style: none; + border-top-style: none; + text-align: left; + padding-bottom: 20px; + padding-top: 0px; + } + h3 { + text-align: left; + margin-top: 10px; + padding-top: 0px; + color: #e976d9 + } + a { + text-decoration: none; + } +.summary { + padding-left: 3.5rem; + color: #f1f3f7 +} From 94ab910470f1b2e288fb2d33f8f4ddd1f3d33f6f Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Sun, 19 May 2024 12:40:12 -0500 Subject: [PATCH 03/20] Align the Metadata to the middle For easier read-flow --- layouts/partials/head.html | 3 +++ layouts/partials/metadata.html | 7 +++++-- static/css/page.css | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 static/css/page.css diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 4d2d054..dfc6f6b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -13,4 +13,7 @@ {{ if .IsHome }} {{ end }} + {{ if .IsPage }} + + {{ end }} diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index 83f1b99..29ceb5f 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -1,19 +1,22 @@ {{ $dateTime := .PublishDate.Format "2006-01-02" }} {{ $lastmodTime := .Lastmod.Format "2006-01-02" }} {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }} + {{ end }} diff --git a/static/css/page.css b/static/css/page.css new file mode 100644 index 0000000..38dde08 --- /dev/null +++ b/static/css/page.css @@ -0,0 +1,3 @@ +.metadata { + text-align: center; +} From 378d0f14d6e2172c90c872e70efb9f407a9c640a Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Sun, 19 May 2024 13:15:23 -0500 Subject: [PATCH 04/20] Update Logic --- layouts/partials/metadata.html | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index 29ceb5f..c7a229c 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -4,19 +4,22 @@ +{{ else }} + {{ end }} -{{ with .Params.tags }} -
-Tags: -{{ range . }} -{{ $href := print "/tags/" (urlize .) }} -{{ . }} -{{ end }} - -{{ end }} + From 50be8a59ca62c04d783b13719425ca58a797af1c Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Mon, 20 May 2024 10:20:24 -0500 Subject: [PATCH 05/20] Update logic for Back Home, and also add metadata to homepage --- layouts/_default/list.html | 1 + layouts/index.html | 1 + layouts/partials/header.html | 2 +- static/css/homepage.css | 15 +++++++++++++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 35c217f..71ee208 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,4 +1,5 @@ {{ define "main" }} +{{ partial "head.html" }}

{{ .Title }}

{{ range .Pages.ByLastmod.Reverse }}

diff --git a/layouts/index.html b/layouts/index.html index 77022d7..e8f70ca 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -12,6 +12,7 @@ {{ range where .Site.RegularPages "Section" "in" .Site.MainSections }}

{{ .LinkTitle }}

+ {{ partial "metadata.html" . }}

{{ .Summary }}

{{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 922aad3..edd8e43 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -12,7 +12,7 @@ config change. --> {{- end }}

{{ $.Site.Title }}

-{{ else if .IsPage }} +{{ else }} Go Home

{{ $.Site.Params.subtitle }}

diff --git a/static/css/homepage.css b/static/css/homepage.css index e4691c2..6560fe8 100644 --- a/static/css/homepage.css +++ b/static/css/homepage.css @@ -25,6 +25,17 @@ text-decoration: none; } .summary { - padding-left: 3.5rem; - color: #f1f3f7 + padding-left: 1.5rem; + color: #f1f3f7; + margin-top: 0.1rem; +} +.metadata { + padding-left: 0.5rem; + border-top-style: none; + border-bottom-style: none; + padding-bottom: 0.3rem; +} +.metadata a { + text-decoration: underline; + color: pink; } From 8857c2682cf77dc66886e74927fc4c4406002243 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Mon, 20 May 2024 12:08:11 -0500 Subject: [PATCH 06/20] Use License Variable & Format + Footer minimal --- layouts/partials/footer.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 0a7a6c5..9ee3fdb 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,3 +1,8 @@ -

Privacy Policy | Cookie Policy | Terms of Use

-

© 2023 {{ $.Site.Params.author }}

+{{ if .Site.Params.footer.minimal | not }} +

+ Privacy Policy | Cookie Policy | Terms of Use +

+{{ end }} + +

{{ now.Format "2006" }} © {{ $.Site.Params.author }} {{ with .Site.Params.License }} - {{ . | markdownify }} {{ end }}

Mastodon | Contact Me | RSS Feed

From a752274ba057e0025308ba75ef23d7e2ca64f555 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Mon, 20 May 2024 13:21:06 -0500 Subject: [PATCH 07/20] Update Footer Logic --- layouts/partials/footer.html | 8 ++++++-- theme.toml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 9ee3fdb..cf46ab0 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -3,6 +3,10 @@ Privacy Policy | Cookie Policy | Terms of Use

{{ end }} - -

{{ now.Format "2006" }} © {{ $.Site.Params.author }} {{ with .Site.Params.License }} - {{ . | markdownify }} {{ end }}

+ +{{ with .Site.Copyright }} +

{{ now.Format "2006" }} © {{ . | markdownify }}

+{{ else }} +

{{ now.Format "2006" }} © {{ .Site.Params.author }} {{ with .Site.Params.License }} - {{ . | markdownify }} {{ end }}

+{{ end }} Mastodon | Contact Me | RSS Feed

diff --git a/theme.toml b/theme.toml index c9ce5fe..78d0ed0 100644 --- a/theme.toml +++ b/theme.toml @@ -12,4 +12,4 @@ min_version = "0.41.0" [author] name = "RogueFoam" - homepage = "" \ No newline at end of file + homepage = "" From 36110a0c55ff5f22e22564fac24c7641edd238d4 Mon Sep 17 00:00:00 2001 From: fbievan Date: Mon, 20 May 2024 14:50:59 -0500 Subject: [PATCH 08/20] Updated README Did the Following - Removed Necessary Documentation that can be referred to at the orginal project - Credited the Authors of the numerous projects used --- README.md | 51 ++++++++++----------------------------------------- 1 file changed, 10 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index b7800f6..c7a9a7f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Readable is a theme for the static-site generator [Hugo](https://gohugo.io/) usi Shoutout to [Benjamin Hollon](https://benjaminhollon.com/) for his amazing work building this CSS framework and making it so simple to use. -Want to check out a demo? (coming soon) +**This is a fork of the project [hugo-theme-readable](https://github.com/cjtheham/hugo-theme-readable)** ![demo image](/docs/demo_image.png) @@ -12,58 +12,27 @@ Want to check out a demo? (coming soon) To add this theme to an existing Hugo site, start by adding this repo as a submodule in the site's themes folder. -`git submodule add https://github.com/cjtheham/hugo-theme-readable themes/readable` +`git submodule add https://git.fbievan.live/fbievan/hugo-theme-readable themes/readable` Then, update your config file to be using the new theme. For example, if you are using config.toml, the line should become: `theme = 'readable'` -If you don't have an existing site, feel free to use the provided [starter template](https://github.com/cjtheham/hugo-starter-readable) to quickly get your website online. - For more information on starting a Hugo website and using custom themes, refer to the [Hugo documentation](https://gohugo.io/documentation/). ## Usage Freedom to Write has provided some awesome guides on writing HTML that works automatically with the formatting of Readable. For a complete HTML page guide on writing custom pages, see [Overall Structure](https://codeberg.org/Freedom-to-Write/readable.css/wiki/Overall-Structure). For some neat tips that may make life easier working with this style sheet, read [Quick Tips](https://codeberg.org/Freedom-to-Write/readable.css/wiki/Quick-Tips). -## Shortcodes -### aside +## The rest +As mentioned, This is a fork of [hugo-theme-readable](https://github.com/cjtheham/hugo-theme-readable), and will continue to cherry-pick commits from the upstream. I also commit to pushing certain things I think work with the upstream project, to the upstream. -You can use the `aside` shortcode to signify content that is slightly off-topic in regard to the rest of the post. +This is very much a opinonized theme for my site, and you can use it for yours, I however ask that you credit me as I credit Benjamin, and CJ for the work done on this project. -Here's how it compares to a blockquote: +Without Benjamin Hollon or C.J this theme wouldn't exist. -```text -> This is a blockquote. -> -> This is a default **markdown** element and supports formatting inside it. - -{{< aside >}} -This is an aside element. - -You can use **markdown** formatting inside it. -{{}} -``` - -The above code generates the following output: - -![Comparing a blockquote to an aside. The blockquote has a thin bar on it's left, while the aside element is inside a nice box with rounded corners.](/docs/blockquote_vs_aside.png) - -### video - -You can use the `video` shortcode to embed a video player in your post. - -```text -{{< video source="https://test-videos.co.uk/vids/bigbuckbunny/mp4/av1/1080/Big_Buck_Bunny_1080_10s_5MB.mp4" type="video/mp4" caption="Of course it's Big Buck Bunny!" >}} -``` - -![A still from an embedded video with controls in a post.](/docs/video.png) - -Sources can be remote or static content from your website. You can find the supported file types [here](https://www.w3schools.com/html/html5_video.asp#table1). - -## Notes - -- Benjamin loves when new sites and projects pop up using the readable.css framework! - - If you've built a complete site using this theme, submit an issue to the [original repo](https://codeberg.org/Freedom-to-Write/readable.css) with the URL of your site to be featured in the project's README. - - Projects like this and other non-website uses of the framework, such as adapting it to other static site generators, can be featured on the page [Unofficial Related Projects (that are awesome)](https://codeberg.org/Freedom-to-Write/readable.css/wiki/Unofficial-Related-Projects-%28that-are-awesome%29). Go mention [@freedomtowrite@fosstodon.org](https://fosstodon.org/@freedomtowrite) to be featured there! +Projects used: +- [hugo](https://gohugo.io/) created by [Bep](https://bep.is/en/) +- [Readable.css](https://codeberg.org/Freedom-to-Write/readable.css) created by [Benjamin Hollon](https://benjaminhollon.com/) +- [Hugo Readable Theme](https://github.com/cjtheham/hugo-theme-readable) created by [C.J](https://github.com/cjtheham) \ No newline at end of file From 295d83761813a6e6f68d9620dacbad45f74e1725 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 22 May 2024 12:25:02 -0500 Subject: [PATCH 09/20] Make Light Theme display correctly --- static/css/homepage.css | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/static/css/homepage.css b/static/css/homepage.css index 6560fe8..13fb174 100644 --- a/static/css/homepage.css +++ b/static/css/homepage.css @@ -1,3 +1,21 @@ +html, html[data-theme="light"] { + --background-color: snow; + --color: #000; +} + +html[data-theme="dark"] { + --background-color: #1f272d; + --color: #fff; + --tcolor: pink; +} +@media (prefers-color-scheme: dark) { + html { + --background-color: #222830; + --color: #fff; + --hcolor: #e976d9; + --tcolor: pink; + } +} .articles { padding: 5px; border: var(--line-width) solid; @@ -19,14 +37,10 @@ text-align: left; margin-top: 10px; padding-top: 0px; - color: #e976d9 - } - a { - text-decoration: none; + color: var(--hcolor); } .summary { padding-left: 1.5rem; - color: #f1f3f7; margin-top: 0.1rem; } .metadata { @@ -37,5 +51,5 @@ } .metadata a { text-decoration: underline; - color: pink; + color: var(--tcolor); } From d5a64c55fa6ec6c2c180cacc6bb617caa97eead6 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 22 May 2024 16:26:14 -0500 Subject: [PATCH 10/20] Merge in changes --- layouts/_default/rss.xml | 72 ++++++++++++++++++++++++++++++++++++++++ static/rss.xsl | 46 +++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 layouts/_default/rss.xml create mode 100644 static/rss.xsl diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..0e0e51c --- /dev/null +++ b/layouts/_default/rss.xml @@ -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 "" | safeHTML }} +{{- printf "" | safeHTML -}} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo + {{ site.Language.LanguageCode }}{{ with $authorEmail }} + {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} + {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} + {{ . }}{{ end }}{{ if not .Date.IsZero }} + {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{ .Permalink }} + {{ printf "" | safeHTML }} + + {{- end }} + + diff --git a/static/rss.xsl b/static/rss.xsl new file mode 100644 index 0000000..97ba4cf --- /dev/null +++ b/static/rss.xsl @@ -0,0 +1,46 @@ + + + + + + + <xsl:value-of select="/rss/channel/title"/> Feed + + + + + + + +
+

+

RSS Feed preview

+
+
+ + + +
+ + +
+
From b507d458b0cb6a04d4971f8210fcfaf73a8dc228 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 29 May 2024 12:46:47 -0500 Subject: [PATCH 11/20] Allow going back in the directory structure --- layouts/partials/header.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index edd8e43..9d72ebf 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -10,10 +10,17 @@ config change. --> {{ .Name }} {{ if eq $navbar_style "classy" }}{{ end }} {{- end }} +

{{ $.Site.Title }}

{{ else }} Go Home +{{ $path := .Path }} +{{ $bpath := path.Dir $path }} +{{ if eq $bpath "/" }} +{{ else }} +Back to {{ $bpath }} +{{ end }}

{{ $.Site.Params.subtitle }}

{{ end }} From a67a169c6ba967f1feda537f17791f6a97ad312b Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 29 May 2024 13:20:45 -0500 Subject: [PATCH 12/20] Some fixing up --- layouts/index.html | 3 --- layouts/partials/header.html | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index e8f70ca..b5b27ad 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,9 +4,6 @@
- -{{ .Content }} -
{{ range where .Site.RegularPages "Section" "in" .Site.MainSections }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 9d72ebf..32d66bd 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -13,6 +13,7 @@ config change. -->

{{ $.Site.Title }}

+

{{ $.Site.Params.subtitle }}

{{ else }} Go Home {{ $path := .Path }} @@ -22,6 +23,5 @@ config change. --> Back to {{ $bpath }} {{ end }} -

{{ $.Site.Params.subtitle }}

{{ end }} From 079b946fd685a9e16520f14cd3e2c1aa6cb7ecd2 Mon Sep 17 00:00:00 2001 From: Evan G Date: Thu, 13 Jun 2024 13:50:33 -0500 Subject: [PATCH 13/20] Change Footer logic to account for .Site.Copyright and other methods (#24) * Use License Variable & Format + Footer minimal * Update Footer Logic --- layouts/partials/footer.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 0a7a6c5..cf46ab0 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,3 +1,12 @@ -

Privacy Policy | Cookie Policy | Terms of Use

-

© 2023 {{ $.Site.Params.author }}

+{{ if .Site.Params.footer.minimal | not }} +

+ Privacy Policy | Cookie Policy | Terms of Use +

+{{ end }} + +{{ with .Site.Copyright }} +

{{ now.Format "2006" }} © {{ . | markdownify }}

+{{ else }} +

{{ now.Format "2006" }} © {{ .Site.Params.author }} {{ with .Site.Params.License }} - {{ . | markdownify }} {{ end }}

+{{ end }} Mastodon | Contact Me | RSS Feed

From d6c39b9b51e935ee7f02f97bb6f0d42d72dba0f2 Mon Sep 17 00:00:00 2001 From: benjaminhollon Date: Tue, 18 Jun 2024 21:47:27 +0000 Subject: [PATCH 14/20] Update README to reflect move to Codeberg --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b7800f6..e9ea59a 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ Want to check out a demo? (coming soon) To add this theme to an existing Hugo site, start by adding this repo as a submodule in the site's themes folder. -`git submodule add https://github.com/cjtheham/hugo-theme-readable themes/readable` +`git submodule add https://codeberg.org/Freedom-to-Write/hugo-theme-readable themes/readable` Then, update your config file to be using the new theme. For example, if you are using config.toml, the line should become: `theme = 'readable'` -If you don't have an existing site, feel free to use the provided [starter template](https://github.com/cjtheham/hugo-starter-readable) to quickly get your website online. +If you don't have an existing site, feel free to use the provided [starter template](https://codeberg.org/cjtheham/hugo-starter-readable) to quickly get your website online. For more information on starting a Hugo website and using custom themes, refer to the [Hugo documentation](https://gohugo.io/documentation/). From 5365462844891d880eb10850bc79309b82fe8832 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Tue, 18 Jun 2024 19:20:28 -0500 Subject: [PATCH 15/20] Fix Starter template link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e9ea59a..e174471 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Then, update your config file to be using the new theme. For example, if you are `theme = 'readable'` -If you don't have an existing site, feel free to use the provided [starter template](https://codeberg.org/cjtheham/hugo-starter-readable) to quickly get your website online. +If you don't have an existing site, feel free to use the provided [starter template](https://codeberg.org/Freedom-to-Write/hugo-starter-readable) to quickly get your website online. For more information on starting a Hugo website and using custom themes, refer to the [Hugo documentation](https://gohugo.io/documentation/). From 5038c515e54f5d0627626af1b4de488be4d33071 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 19 Jun 2024 13:53:40 -0500 Subject: [PATCH 16/20] Fix Links that mentioend github + remove .github --- .github/scripts/update-readable-css.sh | 49 ----------------------- .github/workflows/update-readable-css.yml | 42 ------------------- 2 files changed, 91 deletions(-) delete mode 100755 .github/scripts/update-readable-css.sh delete mode 100644 .github/workflows/update-readable-css.yml diff --git a/.github/scripts/update-readable-css.sh b/.github/scripts/update-readable-css.sh deleted file mode 100755 index 4efb067..0000000 --- a/.github/scripts/update-readable-css.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -set -o errexit -set -o pipefail -set -o nounset - -# Query the codeberg.org API (see -# https://codeberg.org/api/swagger#/repository/repoListReleases -# ) and use jq to get the tag name of the -# latest release (i.e. the first element of the -# array in the JSON output, that is not a -# prerelease). -# The '-r' option will give us "raw" output, -# i.e. without surrounding double-quotes. -# We use 'map' and 'select' in combination, -# because jq won't return a list otherwise. -# Only using 'select' returns just the matching -# elements, which is not a valid json that we -# can process further. -TAG_VERSION=$(curl -s \ - -H 'accept: application/json' \ - https://codeberg.org/api/v1/repos/Freedom-to-Write/readable.css/releases \ - | jq -r '.|map(select(.prerelease==false))[0].tag_name') - -echo "Latest tag: ${TAG_VERSION}" - -# Get the current version. -# The '-o' option will only output the match grep found. -# We look for readable.min.css and a set of three numbers seperated by dots, -# i.e. a semantic version. readable.min.css is used to make sure that we match -# the right numbers in the file. -# We use sed to get rid of the readable.min.css prefix. -CURRENT_VERSION=$(grep -o \ - 'readable.min.css?v=v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+' \ - layouts/partials/head.html \ - | sed 's/readable.min.css?v=//') -echo "Current version: ${CURRENT_VERSION}" - -if [[ $TAG_VERSION == $CURRENT_VERSION ]] -then - echo "Nothing to do. The current version is already up to date." -else - curl -s "https://codeberg.org/Freedom-to-Write/readable.css/raw/tag/${TAG_VERSION}/readable.css" > static/css/readable.css - curl -s "https://codeberg.org/Freedom-to-Write/readable.css/raw/tag/${TAG_VERSION}/readable.min.css" > static/css/readable.min.css - sed -i "s/readable.min.css?v=${CURRENT_VERSION}/readable.min.css?v=${TAG_VERSION}/" layouts/partials/head.html -fi - -# Add the latest tag version to the workflow environment, so we can access -# it in later steps. -echo "READABLE_CSS_TAG=${TAG_VERSION}" >> "$GITHUB_ENV" diff --git a/.github/workflows/update-readable-css.yml b/.github/workflows/update-readable-css.yml deleted file mode 100644 index cab3bf0..0000000 --- a/.github/workflows/update-readable-css.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: update-readable-css - -on: - schedule: - # Every day at 3:28. - - cron: '28 3 * * *' - -jobs: - update-readable-css: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Download CSS files for latest tag - run: .github/scripts/update-readable-css.sh - - name: Create pull request if files have changed - # https://github.com/marketplace/actions/create-pull-request - uses: peter-evans/create-pull-request@v5 - with: - # First line is the commit subject as always. The rest goes - # into the body. - commit-message: | - Update readable.css to ${{ env.READABLE_CSS_TAG }} - - See the changelog here: - - https://codeberg.org/Freedom-to-Write/readable.css/src/tag/${{ env.READABLE_CSS_TAG }}/CHANGELOG.md - branch: update-readable-css - delete-branch: true - # Use 'GitHub' both times. - # This is already the default for committer, but the author defaults - # to the user who triggered the workflow run, which is the owner of - # the repository. - # We use the same value for the author to indicate that the - # commit was created by a bot. - committer: GitHub - author: GitHub - title: Update readable.css to ${{ env.READABLE_CSS_TAG }} - body: | - See the changelog here: - - https://codeberg.org/Freedom-to-Write/readable.css/src/tag/${{ env.READABLE_CSS_TAG }}/CHANGELOG.md - labels: update-readable-css From e6bb246caba97ef0762a602bbc26496de8d4d657 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 19 Jun 2024 13:54:24 -0500 Subject: [PATCH 17/20] Fix Links that mentioned github --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c7a9a7f..010fb78 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Readable is a theme for the static-site generator [Hugo](https://gohugo.io/) usi Shoutout to [Benjamin Hollon](https://benjaminhollon.com/) for his amazing work building this CSS framework and making it so simple to use. -**This is a fork of the project [hugo-theme-readable](https://github.com/cjtheham/hugo-theme-readable)** - +**This is a fork of the project [hugo-theme-readable](https://codeberg.org/Freedom-to-Write/hugo-theme-readable)** +https://codeberg.org/Freedom-to-Write/hugo-theme-readable ![demo image](/docs/demo_image.png) ## Installation @@ -26,7 +26,7 @@ Freedom to Write has provided some awesome guides on writing HTML that works aut ## The rest -As mentioned, This is a fork of [hugo-theme-readable](https://github.com/cjtheham/hugo-theme-readable), and will continue to cherry-pick commits from the upstream. I also commit to pushing certain things I think work with the upstream project, to the upstream. +As mentioned, This is a fork of [hugo-theme-readable](https://codeberg.org/Freedom-to-Write/hugo-theme-readable), and will continue to cherry-pick commits from the upstream. I also commit to pushing certain things I think work with the upstream project, to the upstream. This is very much a opinonized theme for my site, and you can use it for yours, I however ask that you credit me as I credit Benjamin, and CJ for the work done on this project. @@ -35,4 +35,4 @@ Without Benjamin Hollon or C.J this theme wouldn't exist. Projects used: - [hugo](https://gohugo.io/) created by [Bep](https://bep.is/en/) - [Readable.css](https://codeberg.org/Freedom-to-Write/readable.css) created by [Benjamin Hollon](https://benjaminhollon.com/) -- [Hugo Readable Theme](https://github.com/cjtheham/hugo-theme-readable) created by [C.J](https://github.com/cjtheham) \ No newline at end of file +- [Hugo Readable Theme](https://codeberg.org/Freedom-to-Write/hugo-theme-readable) created by [C.J](https://github.com/cjtheham) From 7fbbdd1c38bb80efcf98d04a41bcfcf53838ec2a Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 19 Jun 2024 14:01:47 -0500 Subject: [PATCH 18/20] Remove all the links that mention github in theme.toml + Fix Documentation --- docs/development.md | 4 ++-- theme.toml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/development.md b/docs/development.md index 4a71c4f..eda393c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -2,7 +2,7 @@ ## Adding your fork as an additional Git remote to a hugo-theme-readable Git submodule -The easiest way to test your changes is with an existing Hugo website that already uses this theme. You can use your own or checkout the [starter template](https://github.com/cjtheham/hugo-starter-readable). +The easiest way to test your changes is with an existing Hugo website that already uses this theme. You can use your own or checkout the [starter template](https://codeberg.org/Freedom-to-Write/hugo-starter-readable). The following steps show you how to add your fork as an additional Git remote to the checked out Git submodule. @@ -16,7 +16,7 @@ git submodule update cd themes/readable/ # Add your fork as the remote 'fork'. -git remote add fork git@github.com:/hugo-theme-readable.git +git remote add fork git@codeberg.org:/hugo-theme-readable.git # Create a new branch. git checkout -b my-change diff --git a/theme.toml b/theme.toml index c9ce5fe..a971b5c 100644 --- a/theme.toml +++ b/theme.toml @@ -3,13 +3,13 @@ name = "Readable" license = "Unlicense" -licenselink = "https://github.com/cjtheham/hugo-theme-readable/blob/main/LICENSE" +licenselink = "https://codeberg.org/Freedom-to-Write/hugo-theme-readable/src/branch/main/LICENSE" description = "A theme using Freedom to Write's Readable.css" -homepage = "https://github.com/cjtheham/hugo-theme-readable" +homepage = "https://codeberg.org/Freedom-to-Write/hugo-theme-readable" tags = [] features = [] min_version = "0.41.0" [author] name = "RogueFoam" - homepage = "" \ No newline at end of file + homepage = "" From b066138b0a89c35a1241bd2512454525e3541650 Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 19 Jun 2024 14:01:47 -0500 Subject: [PATCH 19/20] Remove all the links that mention github in theme.toml + Fix Documentation --- docs/development.md | 4 ++-- theme.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/development.md b/docs/development.md index 4a71c4f..eda393c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -2,7 +2,7 @@ ## Adding your fork as an additional Git remote to a hugo-theme-readable Git submodule -The easiest way to test your changes is with an existing Hugo website that already uses this theme. You can use your own or checkout the [starter template](https://github.com/cjtheham/hugo-starter-readable). +The easiest way to test your changes is with an existing Hugo website that already uses this theme. You can use your own or checkout the [starter template](https://codeberg.org/Freedom-to-Write/hugo-starter-readable). The following steps show you how to add your fork as an additional Git remote to the checked out Git submodule. @@ -16,7 +16,7 @@ git submodule update cd themes/readable/ # Add your fork as the remote 'fork'. -git remote add fork git@github.com:/hugo-theme-readable.git +git remote add fork git@codeberg.org:/hugo-theme-readable.git # Create a new branch. git checkout -b my-change diff --git a/theme.toml b/theme.toml index 78d0ed0..a971b5c 100644 --- a/theme.toml +++ b/theme.toml @@ -3,9 +3,9 @@ name = "Readable" license = "Unlicense" -licenselink = "https://github.com/cjtheham/hugo-theme-readable/blob/main/LICENSE" +licenselink = "https://codeberg.org/Freedom-to-Write/hugo-theme-readable/src/branch/main/LICENSE" description = "A theme using Freedom to Write's Readable.css" -homepage = "https://github.com/cjtheham/hugo-theme-readable" +homepage = "https://codeberg.org/Freedom-to-Write/hugo-theme-readable" tags = [] features = [] min_version = "0.41.0" From 643076dccefcc459bf3d601bc4473c7b08983b0b Mon Sep 17 00:00:00 2001 From: "Evan G." Date: Wed, 13 Aug 2025 15:40:05 -0500 Subject: [PATCH 20/20] Fixup the Theme a lil --- layouts/index.html | 6 +++--- static/css/homepage.css | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index b5b27ad..aa901fc 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,5 @@ {{ define "main" }} -{{ partial "metadata.html" . }} -
@@ -10,7 +8,9 @@

{{ .LinkTitle }}

{{ partial "metadata.html" . }} -

{{ .Summary }}

+
+ {{ .Summary }} +
{{ end }}
diff --git a/static/css/homepage.css b/static/css/homepage.css index 13fb174..50dbf7d 100644 --- a/static/css/homepage.css +++ b/static/css/homepage.css @@ -1,12 +1,14 @@ html, html[data-theme="light"] { --background-color: snow; --color: #000; + --scolor: #387f7e; } html[data-theme="dark"] { --background-color: #1f272d; --color: #fff; --tcolor: pink; + --scolor: #fff; } @media (prefers-color-scheme: dark) { html { @@ -42,6 +44,7 @@ html[data-theme="dark"] { .summary { padding-left: 1.5rem; margin-top: 0.1rem; + color: var(--scolor); } .metadata { padding-left: 0.5rem;