Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kimcc/hugo-theme-noteworthy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkimcc <15278020+kimcc@users.noreply.github.com>2020-04-18 08:15:49 +0300
committerkimcc <15278020+kimcc@users.noreply.github.com>2020-04-18 08:15:56 +0300
commitde668f23496e2658924ea749d87e7acbd6fad405 (patch)
tree2fc988b461fa2df0696c9ae9280339f179351427
parent05968320431efd8fa09c765b089f1743db098c38 (diff)
added readmore option & edited readme
-rw-r--r--README.md19
-rw-r--r--assets/css/partials/_breakpoints.scss2
-rw-r--r--exampleSite/config.toml5
-rw-r--r--layouts/_default/taxonomy.html7
-rw-r--r--layouts/index.html7
5 files changed, 32 insertions, 8 deletions
diff --git a/README.md b/README.md
index 8c515c8..7eb31da 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@ Noteworthy is a minimalist Hugo theme for writers and bloggers.
* Fully responsive
* Google Analytics and Disqus integration
+* Ko-fi donation button
* Syntax highlighting
* Mathematical notations with KaTex
* About, Tags, and Archives pages
@@ -38,7 +39,7 @@ my-new-post
- image2.png
```
-Then, you can add an image within your Markdown file by using the shortcode like thist:
+Then, you can add an image within your Markdown file by using the shortcode like this:
```
{{< resize-image src="image1.jpg" alt="My first image" >}}
@@ -50,6 +51,10 @@ Add captions like this:
{{< resize-image src="image2.png" alt="My second image" caption="My caption" >}}
```
+## Read more link for posts
+
+Set `showReadMore = false` to `true` in the config file to have a "read more" link show up when posts are truncated.
+
## Social media accounts
In the `params` section of the `config.toml` file, you can add links to your social media accounts. Simply remove the ones that you don't want to include, and their icons will disappear from the site.
@@ -64,6 +69,7 @@ tumblr = "#"
reddit = "#"
pinterest = "#"
youtube = "#"
+vimeo = "#"
weibo = "#"
vk = "#"
linkedin = "#"
@@ -79,11 +85,19 @@ behance = "#"
deviantart = "#"
flickr = "#"
+# Audio & Music
+soundcloud = "#"
+
# Programming
github = "#"
stackoverflow = "#"
gitlab = "#"
codepen = "#"
+
+# Academic
+googlescholar = "#"
+impactstory = "#"
+orcid = "#"
```
@@ -104,8 +118,7 @@ googleAnalytics = ""
If you'd like to enable a Ko-fi button on your posts, enable it in the config file and add your identifier.
```
-# Set enableKofi to true to enable the Ko-fi support button. Add your Ko-fi
-ID to link to your account.
+# Set enableKofi to true to enable the Ko-fi support button. Add your Ko-fi ID to link to your account.
enableKofi = true
kofi = ""
```
diff --git a/assets/css/partials/_breakpoints.scss b/assets/css/partials/_breakpoints.scss
index 0fe3302..3320688 100644
--- a/assets/css/partials/_breakpoints.scss
+++ b/assets/css/partials/_breakpoints.scss
@@ -8,7 +8,7 @@
// TOP NAV
nav {
position: fixed;
- overflow-y: scroll;
+ overflow: auto;
height: 100%;
top: 0;
left: 36px;
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 6552ab5..2609614 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -27,6 +27,8 @@ disqusShortname = ""
# Blog description at the top of the homepage. Supports markdown.
description = "Noteworthy is a minimalist Hugo theme, perfect for writers and bloggers."
+ showReadMore = false
+
# Set enableKofi to true to enable the Ko-fi support button. Add your Ko-fi ID to link to your account.
enableKofi = false
kofi = ""
@@ -57,6 +59,9 @@ disqusShortname = ""
deviantart = "#"
flickr = "#"
+ # Audio & Music
+ soundcloud = "#"
+
# Programming
github = "#"
stackoverflow = "#"
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
index 764de44..c86d136 100644
--- a/layouts/_default/taxonomy.html
+++ b/layouts/_default/taxonomy.html
@@ -11,9 +11,10 @@
</a>
</h2>
<div>
- <p>
- {{ .Summary }}
- </p>
+ <p>{{ .Summary }}</p>
+ {{ if (and (.Site.Params.showReadMore) (.Truncated)) }}
+ <p><a href="{{ .RelPermalink }}">Read more...</a></p>
+ {{ end }}
</div>
<div class="post-footer">
<time>{{ .Date.Format "January 2, 2006" }}</time>
diff --git a/layouts/index.html b/layouts/index.html
index 3c9cff1..426a164 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -14,7 +14,12 @@
{{ .Title }}
</a>
</h2>
- <div><p>{{ .Summary }}</p></div>
+ <div>
+ <p>{{ .Summary }}</p>
+ {{ if (and (.Site.Params.showReadMore) (.Truncated)) }}
+ <p><a href="{{ .RelPermalink }}">Read more...</a></p>
+ {{ end }}
+ </div>
<div class="post-footer">
<time>{{ .Date.Format "January 2, 2006" }}</time>