clean merge files

This commit is contained in:
Adam Ormsby 2020-01-31 15:32:40 +07:00
commit 1717d887b6
8 changed files with 1406 additions and 1089 deletions

View File

@ -1,5 +1,5 @@
{
"parser": "babylon",
"parser": "babel",
"printWidth": 100,
"trailingComma": "all"
}

View File

@ -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).

View File

@ -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)

View File

@ -1,14 +1,14 @@
{{ define "main" }}
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
<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" }}
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
{{ 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 }}

View File

@ -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>
@ -60,13 +70,13 @@
</div>
{{ end }}
{{ end }}
{{ if not (eq .Params.Comments "false") }}
{{ if or (eq .Type $.Site.Params.contentTypeName) (.Params.Comments) }}
{{ partial "comments.html" . }}
{{ end }}
{{ end }}
</div>
{{ end }}

View 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 }}

View File

@ -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?");
/***/ })

2427
yarn.lock

File diff suppressed because it is too large Load Diff