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

github.com/bul-ikana/hugo-cards.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Aguirre <bul-ikana@users.noreply.github.com>2020-10-19 04:27:03 +0300
committerGitHub <noreply@github.com>2020-10-19 04:27:03 +0300
commit1837d73132c6df78cced695b9914e5e3e9c08eb0 (patch)
tree3ffa12fe3e701bd4c278cdfd737194b03a242c4f
parentac2ac3b37595696d7aa93a4a4024e4012bbaad77 (diff)
parent22ba471571f460e14aaa837af1792ff6e9806bb0 (diff)
Merge pull request #18 from bul-ikana/page-resources-support
Page resources support. Closes #14 .
-rw-r--r--exampleSite/content/posts/documentation/image-5.png (renamed from static/images/image-5.png)bin5043 -> 5043 bytes
-rw-r--r--exampleSite/content/posts/documentation/index.md (renamed from exampleSite/content/posts/documentation.md)0
-rw-r--r--exampleSite/content/posts/elements/image-4.png (renamed from static/images/image-4.png)bin5227 -> 5227 bytes
-rw-r--r--exampleSite/content/posts/elements/index.md (renamed from exampleSite/content/posts/elements.markdown)0
-rw-r--r--exampleSite/content/posts/installation/image-3.png (renamed from static/images/image-3.png)bin5273 -> 5273 bytes
-rw-r--r--exampleSite/content/posts/installation/index.md (renamed from exampleSite/content/posts/installation.markdown)2
-rw-r--r--exampleSite/content/posts/no-image/index.md (renamed from exampleSite/content/posts/no-image.markdown)2
-rw-r--r--exampleSite/content/posts/usage/image-2.png (renamed from static/images/image-2.png)bin5444 -> 5444 bytes
-rw-r--r--exampleSite/content/posts/usage/index.md (renamed from exampleSite/content/posts/usage.markdown)2
-rw-r--r--exampleSite/content/posts/welcome-to-hugo/image-1.png (renamed from static/images/image-1.png)bin5306 -> 5306 bytes
-rw-r--r--exampleSite/content/posts/welcome-to-hugo/index.md (renamed from exampleSite/content/posts/welcome-to-hugo.markdown)2
-rw-r--r--layouts/_default/list.html6
-rw-r--r--layouts/partials/sidebar.html8
-rw-r--r--layouts/taxonomy/tag.html6
14 files changed, 20 insertions, 8 deletions
diff --git a/static/images/image-5.png b/exampleSite/content/posts/documentation/image-5.png
index 46520dd..46520dd 100644
--- a/static/images/image-5.png
+++ b/exampleSite/content/posts/documentation/image-5.png
Binary files differ
diff --git a/exampleSite/content/posts/documentation.md b/exampleSite/content/posts/documentation/index.md
index fac87f7..fac87f7 100644
--- a/exampleSite/content/posts/documentation.md
+++ b/exampleSite/content/posts/documentation/index.md
diff --git a/static/images/image-4.png b/exampleSite/content/posts/elements/image-4.png
index f7f46e8..f7f46e8 100644
--- a/static/images/image-4.png
+++ b/exampleSite/content/posts/elements/image-4.png
Binary files differ
diff --git a/exampleSite/content/posts/elements.markdown b/exampleSite/content/posts/elements/index.md
index dafacbe..dafacbe 100644
--- a/exampleSite/content/posts/elements.markdown
+++ b/exampleSite/content/posts/elements/index.md
diff --git a/static/images/image-3.png b/exampleSite/content/posts/installation/image-3.png
index afd37c2..afd37c2 100644
--- a/static/images/image-3.png
+++ b/exampleSite/content/posts/installation/image-3.png
Binary files differ
diff --git a/exampleSite/content/posts/installation.markdown b/exampleSite/content/posts/installation/index.md
index c12ee67..3565660 100644
--- a/exampleSite/content/posts/installation.markdown
+++ b/exampleSite/content/posts/installation/index.md
@@ -2,7 +2,7 @@
layout: post
title: "Installation"
img: image-3.png
-categories: [one]
+categories: ["one", "two"]
tags: ["tag_c"]
date: 2016-05-09
---
diff --git a/exampleSite/content/posts/no-image.markdown b/exampleSite/content/posts/no-image/index.md
index ffbd961..51befdc 100644
--- a/exampleSite/content/posts/no-image.markdown
+++ b/exampleSite/content/posts/no-image/index.md
@@ -1,7 +1,7 @@
---
layout: post
title: "Post with no image"
-category: two
+categories: ["one", "two"]
date: 2016-06-09
---
When there is no image mentioned in the front-matter, default image will be displayed. You can change this image to any other one that suits your needs.
diff --git a/static/images/image-2.png b/exampleSite/content/posts/usage/image-2.png
index bbb10e5..bbb10e5 100644
--- a/static/images/image-2.png
+++ b/exampleSite/content/posts/usage/image-2.png
Binary files differ
diff --git a/exampleSite/content/posts/usage.markdown b/exampleSite/content/posts/usage/index.md
index 83ef94a..d2ee021 100644
--- a/exampleSite/content/posts/usage.markdown
+++ b/exampleSite/content/posts/usage/index.md
@@ -1,7 +1,7 @@
---
title: "Usage Guide"
img: image-2.png
-categories: [two]
+categories: ["one", "two"]
date: "2016-06-12"
---
diff --git a/static/images/image-1.png b/exampleSite/content/posts/welcome-to-hugo/image-1.png
index 872df82..872df82 100644
--- a/static/images/image-1.png
+++ b/exampleSite/content/posts/welcome-to-hugo/image-1.png
Binary files differ
diff --git a/exampleSite/content/posts/welcome-to-hugo.markdown b/exampleSite/content/posts/welcome-to-hugo/index.md
index f61f9c1..e786706 100644
--- a/exampleSite/content/posts/welcome-to-hugo.markdown
+++ b/exampleSite/content/posts/welcome-to-hugo/index.md
@@ -1,5 +1,5 @@
---
-title: "Welcome to Hugo!"
+title: "Welcome to Hugox!"
date: 2016-06-13 10:51:47 +0530
img: "image-1.png"
categories: [one, two]
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index e1cd83d..dde78d5 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -12,7 +12,11 @@
<div class="panel panel-default">
{{ if .Params.img }}
- <img width="100%" src="{{ .Site.BaseURL }}images/{{ .Params.img }}" alt="{{ .Title }}">
+ {{ with .Resources.Match .Params.img }}
+ {{ range . }}
+ <img width="100%" src="{{ .RelPermalink }}" alt="{{ .Title }}">
+ {{ end }}
+ {{ end }}
{{ else }}
<img width="100%" src="{{ .Site.BaseURL }}images/{{ .Site.Params.defaultImage }}" alt="{{ .Site.Title }}">
{{ end }}
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 1c5d9f5..155ce70 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -1,7 +1,11 @@
<div class="col-md-4 mt20">
<div class="post-img">
- {{ if .Params.img }}
- <img width="600" src="{{ .Site.BaseURL}}images/{{ .Params.img }}" alt="{{ .Params.title }}">
+ {{ if .Params.img }}
+ {{ with .Resources.Match .Params.img }}
+ {{ range . }}
+ <img width="100%" src="{{ .RelPermalink }}" alt="{{ .Title }}">
+ {{ end }}
+ {{ end }}
{{ else }}
<img width="600" src="{{ .Site.BaseURL }}images/{{ .Site.Params.defaultImage }}" alt="webjeda">
{{ end }}
diff --git a/layouts/taxonomy/tag.html b/layouts/taxonomy/tag.html
index 8fb638d..7d12b65 100644
--- a/layouts/taxonomy/tag.html
+++ b/layouts/taxonomy/tag.html
@@ -12,7 +12,11 @@
<div class="panel panel-default">
{{ if .Params.img }}
- <img width="100%" src="{{ .Site.BaseURL }}images/{{ .Params.img }}" alt="{{ .Title }}">
+ {{ with .Resources.Match .Params.img }}
+ {{ range . }}
+ <img width="100%" src="{{ .RelPermalink }}" alt="{{ .Title }}">
+ {{ end }}
+ {{ end }}
{{ else }}
<img width="100%" src="{{ .Site.BaseURL }}images/{{ .Site.Params.defaultImage }}" alt="{{ .Site.Title }}">
{{ end }}