From 3d08f965095ccc1b42ddb3098f974a79381b3a54 Mon Sep 17 00:00:00 2001 From: Dmitry Kolosov Date: Wed, 12 Aug 2020 22:25:08 +0300 Subject: [PATCH] Add optional Read more. Close #47 --- README.md | 2 ++ exampleSite/config.toml | 1 + exampleSiteMultilingual/config.toml | 1 + layouts/partials/footer.html | 5 ++++- layouts/partials/postSummary.html | 4 ++-- layouts/partials/themeSwitcher.html | 9 +++------ static/css/style.css | 2 +- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e0c3c50..30f9673 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/). - Robots.txt - Favorite posts - Pagination on post single page +- Optional "Read more" link ## Installation @@ -66,6 +67,7 @@ params: dateFormat: "2006-01-02" paginationSinglePost: true style: light-without-switcher + readMore: false markup: goldmark: diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 817f7a9..b3fb036 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -16,6 +16,7 @@ googleAnalytics = "" dateFormat = "2006-01-02" paginationSinglePost = true style = "light-without-switcher" + readMore = false [menu] diff --git a/exampleSiteMultilingual/config.toml b/exampleSiteMultilingual/config.toml index e33540b..a04f2a6 100644 --- a/exampleSiteMultilingual/config.toml +++ b/exampleSiteMultilingual/config.toml @@ -17,6 +17,7 @@ googleAnalytics = "" dateFormat = "2006-01-02" paginationSinglePost = true style = "light-without-switcher" + readMore = false [languages.en] languageName = "English" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e022af9..d8512fe 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -4,13 +4,16 @@ {{ partial "languageSelect.html" . }} {{ end }} + + - {{ partial "themeSwitcher.html" . }} diff --git a/layouts/partials/postSummary.html b/layouts/partials/postSummary.html index 11bb9e0..352e09d 100644 --- a/layouts/partials/postSummary.html +++ b/layouts/partials/postSummary.html @@ -6,11 +6,11 @@
{{ .Summary | safeHTML }}
- + {{ end }} {{ partial "postInfo.html" . }} \ No newline at end of file diff --git a/layouts/partials/themeSwitcher.html b/layouts/partials/themeSwitcher.html index 6da264b..5e8de97 100644 --- a/layouts/partials/themeSwitcher.html +++ b/layouts/partials/themeSwitcher.html @@ -5,7 +5,7 @@ {{ if not (in (slice "light-without-switcher" "dark-without-switcher" "auto-without-switcher") $style) }}