mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-21 23:35:08 +01:00
clean merge files
This commit is contained in:
commit
1717d887b6
@ -1,5 +1,5 @@
|
||||
{
|
||||
"parser": "babylon",
|
||||
"parser": "babel",
|
||||
"printWidth": 100,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
|
11
README.md
11
README.md
@ -18,6 +18,7 @@ This theme is pretty basic and covers all of the essentials. All you have to do
|
||||
- [How to start](#how-to-start)
|
||||
- [How to configure](#how-to-configure)
|
||||
- [How to add a cover image to your posts](#how-to-add-a-cover-image-to-your-posts)
|
||||
- [How to display the Last Modified Date in your posts](#how-to-display-the-last-modified-date-in-your-posts)
|
||||
- [Add-ons](#add-ons)
|
||||
- [How to run your site](#how-to-run-your-site)
|
||||
- [How to edit the theme](#how-to-edit-the-theme)
|
||||
@ -106,6 +107,8 @@ paginate = 5
|
||||
minuteReadingTime = "min read"
|
||||
dateFormatSingle = "2006-01-02"
|
||||
dateFormatList = "2006-01-02"
|
||||
# leave empty to disable, enter display text to enable
|
||||
# lastModDisplay = ""
|
||||
|
||||
[languages.en.params.logo]
|
||||
logoText = "hello friend"
|
||||
@ -139,6 +142,14 @@ Adding a cover image to your post is simple and there are two options when you e
|
||||
* Use `cover = "img.jpg"` and `useRelativeCover = true` to link the image relative to the blog post folder
|
||||
* Resulting in `https://www.yourpage.com/posts/blog-entry-xy/img.jpg`
|
||||
|
||||
## How to display the Last Modified Date in your posts
|
||||
|
||||
Add `lastModDisplay = "[your display text]"` to `config.toml` to enable last modified date on your posts. Note - an empty string value `""` does not display anything.
|
||||
|
||||
Example: `lastModDisplay = "Modified:"` --> "Modified: Jan 01, 0001"
|
||||
|
||||
:octocat: Hugo's `enableGitInfo` option is a nice complement to this feature.
|
||||
|
||||
## Add-ons
|
||||
|
||||
- **Archive** — Theme has built-in `archive` page for main content (see `contentTypeName` variable in config). If you need archive on your blog just copy https://github.com/panr/hugo-theme-hello-friend/blob/master/exampleSite/content/archive.md to your `content` dir. If you need multilangual archives, duplicate `content/archive.md` and add `.Lang` variable, eg: `content/archive.pl.md` (remember to change `url` in duplicated file).
|
||||
|
3
USERS.md
3
USERS.md
@ -21,3 +21,6 @@ TEMPLATE:
|
||||
- https://felixleger.com/ - **Félix Léger** (Sofware Developer and DevOps)
|
||||
- https://cobalto.net/ - **Daniel Pessoa** (Sofware Developer and BI Analyst)
|
||||
- https://www.imgalone.com/ - **Iancu makes games alone** (Indie Game Dev)
|
||||
- https://jonathan.rico.live/ - **Jonathan Rico** (Electronics Engineer)
|
||||
- https://mritd.com/ - **漠然** (Software Engineer and DevOps)
|
||||
- https://ilya-lesikov.com - **Ilya Lesikov** (DevOps, SRE)
|
||||
|
@ -1,5 +1,4 @@
|
||||
{{ define "main" }}
|
||||
<div class="posts">
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
@ -9,6 +8,7 @@
|
||||
{{ end }}
|
||||
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
||||
|
||||
<div class="posts">
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="post on-list">
|
||||
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
@ -17,6 +17,10 @@
|
||||
<span class="post-date">
|
||||
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
|
||||
</span>
|
||||
|
||||
{{ if $.Site.Params.LastModDisplay }}
|
||||
{{ partial "lastmod.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
||||
{{ if $.Site.Params.ShowReadingTime }}
|
||||
@ -24,7 +28,6 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
|
@ -1,12 +1,22 @@
|
||||
{{ define "main" }}
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
<div class="post">
|
||||
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
|
||||
<div class="post-meta">
|
||||
{{ with .Date | default nil }}
|
||||
{{ if .Date | default nil }}
|
||||
<span class="post-date">
|
||||
{{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }}
|
||||
{{ .Date.Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }}
|
||||
</span>
|
||||
|
||||
{{ if eq .Type $contentTypeName }}
|
||||
{{ if $.Site.Params.LastModDisplay }}
|
||||
{{ partial "lastmod.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
|
||||
{{ if $.Site.Params.ShowReadingTime }}
|
||||
<span class="post-read-time">— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
|
||||
|
9
layouts/partials/lastmod.html
Normal file
9
layouts/partials/lastmod.html
Normal file
@ -0,0 +1,9 @@
|
||||
{{ $hourInSec := 3600 }}
|
||||
|
||||
{{ if gt .Lastmod (add (time .Date).Unix $hourInSec) }}
|
||||
{{ with .Lastmod }}
|
||||
<span class="post-moddate">
|
||||
({{ $.Site.Params.LastModDisplay }} {{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }})
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
@ -126,7 +126,7 @@ eval("// Toggle theme\nvar getTheme = window.localStorage && window.localStorage
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("__webpack_require__(/*! /Users/radek/Documents/Git/Moje/hugoBasicExampleHelloFriend/themes/hello-friend/source/js/index.js */\"./source/js/index.js\");\n__webpack_require__(/*! /Users/radek/Documents/Git/Moje/hugoBasicExampleHelloFriend/themes/hello-friend/source/js/menu.js */\"./source/js/menu.js\");\nmodule.exports = __webpack_require__(/*! /Users/radek/Documents/Git/Moje/hugoBasicExampleHelloFriend/themes/hello-friend/source/js/theme.js */\"./source/js/theme.js\");\n\n\n//# sourceURL=webpack:///multi_./source/js/index.js_./source/js/menu.js_./source/js/theme.js?");
|
||||
eval("__webpack_require__(/*! /Users/radek/Documents/Git/Moje/hello-friend/themes/hello-friend/source/js/index.js */\"./source/js/index.js\");\n__webpack_require__(/*! /Users/radek/Documents/Git/Moje/hello-friend/themes/hello-friend/source/js/menu.js */\"./source/js/menu.js\");\nmodule.exports = __webpack_require__(/*! /Users/radek/Documents/Git/Moje/hello-friend/themes/hello-friend/source/js/theme.js */\"./source/js/theme.js\");\n\n\n//# sourceURL=webpack:///multi_./source/js/index.js_./source/js/menu.js_./source/js/theme.js?");
|
||||
|
||||
/***/ })
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user