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>2019-10-14 03:42:33 +0300
committerGitHub <noreply@github.com>2019-10-14 03:42:33 +0300
commitaf2cd0204228d1ea275efc1cbe32177dc22e640e (patch)
treeb24a01f56a8356674e5e2a9b0392046e489608d9
parent3964fce10709bc55683b99aa8ec070b0d18a9da4 (diff)
parent928f67366268296ae4f8c3e4b575a29561f3455f (diff)
Merge pull request #9 from bul-ikana/fix-example-posts
Fix example posts
-rw-r--r--exampleSite/config.toml1
-rw-r--r--exampleSite/content/posts/elements.markdown1
-rw-r--r--exampleSite/content/posts/installation.markdown3
-rw-r--r--exampleSite/content/posts/no-image.markdown2
-rw-r--r--exampleSite/content/posts/usage.markdown3
-rw-r--r--exampleSite/content/posts/welcome-to-hugo.markdown1
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/_default/single.html10
-rw-r--r--layouts/partials/head.html3
-rw-r--r--layouts/partials/seo.html54
-rw-r--r--layouts/partials/sidebar.html2
-rw-r--r--static/images/image-4.pngbin0 -> 5227 bytes
-rw-r--r--static/images/image-5.pngbin0 -> 5043 bytes
-rw-r--r--theme.toml2
15 files changed, 69 insertions, 17 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index c8a9302..21252c6 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -2,6 +2,7 @@ baseurl = "http://example.org/"
languageCode = "en-us"
title = "Hugo Cards"
theme = "hugo-cards"
+themesDir = "../.."
paginate = 6
[params]
diff --git a/exampleSite/content/posts/elements.markdown b/exampleSite/content/posts/elements.markdown
index 54e1f7a..7a489a8 100644
--- a/exampleSite/content/posts/elements.markdown
+++ b/exampleSite/content/posts/elements.markdown
@@ -1,7 +1,6 @@
---
layout: post
title: "Elements"
-categories: jekyll update
img: image-4.png
date: "2016-04-10"
---
diff --git a/exampleSite/content/posts/installation.markdown b/exampleSite/content/posts/installation.markdown
index a01d7cd..bd5eca5 100644
--- a/exampleSite/content/posts/installation.markdown
+++ b/exampleSite/content/posts/installation.markdown
@@ -1,9 +1,8 @@
---
layout: post
title: "Installation"
-categories: jekyll update
img: image-3.png
-categories: one
+categories: [one]
date: 2016-05-09
---
Nulla vel ante sit amet leo imperdiet porta. Mauris pellentesque finibus ligula non dignissim. Sed sed vehicula velit. Ut eleifend velit maximus massa lobortis mattis. In dui quam, rutrum eu purus et, mattis consequat ex. Vivamus risus mauris, ultricies vel dolor eget, aliquet tristique est. Suspendisse odio urna, vehicula vel diam at, pulvinar porttitor metus. Sed ac ipsum et magna aliquam mattis in eleifend mi. Pellentesque porttitor diam nec hendrerit efficitur. In hac habitasse platea dictumst. Nam arcu enim, imperdiet quis molestie molestie, molestie non diam. Quisque pretium felis in lorem placerat rhoncus eu et lorem. Praesent tincidunt purus sed mi lacinia maximus. Curabitur rutrum tempus posuere. Donec quis fringilla enim. Nullam nisl nisl, vestibulum sed enim vel, tempor pulvinar ligula.
diff --git a/exampleSite/content/posts/no-image.markdown b/exampleSite/content/posts/no-image.markdown
index d9dae17..ffbd961 100644
--- a/exampleSite/content/posts/no-image.markdown
+++ b/exampleSite/content/posts/no-image.markdown
@@ -1,7 +1,7 @@
---
layout: post
title: "Post with no image"
-categories: jekyll update
+category: 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/exampleSite/content/posts/usage.markdown b/exampleSite/content/posts/usage.markdown
index a8ebb3b..83ef94a 100644
--- a/exampleSite/content/posts/usage.markdown
+++ b/exampleSite/content/posts/usage.markdown
@@ -1,8 +1,7 @@
---
title: "Usage Guide"
-categories: jekyll update
img: image-2.png
-categories: two
+categories: [two]
date: "2016-06-12"
---
diff --git a/exampleSite/content/posts/welcome-to-hugo.markdown b/exampleSite/content/posts/welcome-to-hugo.markdown
index 6565c11..f61f9c1 100644
--- a/exampleSite/content/posts/welcome-to-hugo.markdown
+++ b/exampleSite/content/posts/welcome-to-hugo.markdown
@@ -1,7 +1,6 @@
---
title: "Welcome to Hugo!"
date: 2016-06-13 10:51:47 +0530
-categories: jekyll update
img: "image-1.png"
categories: [one, two]
author: "Hugo Aguirre"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index c1ff15f..ba4014d 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
- {{ partial "head.html" }}
+ {{ partial "head.html" .}}
<body>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 69f4c6b..e1cd83d 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -5,7 +5,7 @@
<div class="row pack">
- {{ $paginator := .Paginate (where .Pages "Section" "posts") }}
+ {{ $paginator := .Paginate (where .Site.RegularPages "Section" "posts") }}
{{ range $paginator.Pages }}
<div class="col-md-4 card">
<a href="{{ .Permalink }}" class="index-anchor">
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index bbb6775..dd4f0dc 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -22,11 +22,11 @@
<div class="row">
<ul class="pager">
- {{ with .Next }}
- <li><a class="next" href="{{ .URL }}">&laquo; {{ .Title }}</a></li>
+ {{ with .NextPage }}
+ <li><a class="next" href="{{ .Permalink }}">&laquo; {{ .Title }}</a></li>
{{ end }}
- {{ with .Prev }}
- <li><a class="previous" href="{{ .URL }}">{{ .Title }} &raquo;</a></li>
+ {{ with .PrevPage }}
+ <li><a class="previous" href="{{ .Permalink }}">{{ .Title }} &raquo;</a></li>
{{ end }}
</ul>
</div>
@@ -39,4 +39,4 @@
{{ partial "fb-script.html" . }}
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index cb2b770..f1853f4 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -3,7 +3,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
-<!-- {% seo %} -->
+<title>{{ .Title}}{{if .IsPage}} - {{.Site.Title}}{{ end }}</title>
+{{partial "seo.html" .}}
{{ $main := resources.Get "sass/main.scss" | resources.ToCSS (dict "outputStyle" "compressed")}}
<link rel="stylesheet" href="{{ $main.RelPermalink }}">
diff --git a/layouts/partials/seo.html b/layouts/partials/seo.html
new file mode 100644
index 0000000..817da4e
--- /dev/null
+++ b/layouts/partials/seo.html
@@ -0,0 +1,54 @@
+<meta name="description" content="{{ if .Description }}{{ .Description | plainify }}{{ else }}{{if .IsPage}}{{ .Summary | plainify }}{{ end }}{{ end }}"/>
+<meta name="robots" content="noodp"/>
+<link rel="canonical" href="{{ .Permalink }}" />
+
+<!-- Twitter Card -->
+<meta name="twitter:card" content="summary" />
+<meta name="twitter:description" content="{{ if .Description }}{{ .Description | plainify }}{{ else }}{{if .IsPage}}{{ .Summary | plainify }}{{ end }}{{ end }}" />
+<meta name="twitter:title" content="{{ .Title }}{{ if .IsHome }} - {{ .Site.Params.Tagline }}{{ else }} - {{ .Site.Title }}{{ end }}" />
+<meta name="twitter:site" content="{{ .Site.Params.twitter }}" />
+<meta name="twitter:creator" content="{{ .Site.Params.twitter }}" />
+
+<!-- OG data -->
+<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
+<meta content="{{ .Title }}{{ if .IsHome }} - {{ .Site.Params.Tagline }}{{ else }} - {{ .Site.Title }}{{ end }}" property="og:title">
+<meta content="{{ if .Description }}{{ .Description | plainify }}{{ else }}{{if .IsPage}}{{ .Summary | plainify }}{{ end }}{{ end }}" property="og:description">
+<meta property="og:url" content="{{ .Permalink }}" />
+<meta property="og:site_name" content="{{ .Site.Title }}" />
+{{ range .Params.categories }}<meta property="article:section" content="{{ . }}" />{{ end }}
+{{ if isset .Params "date" }}<meta property="article:published_time" content="{{ time .Date }}" />{{ end }}
+
+<!-- JSON-LD -->
+{{ if .IsHome }}
+<script type="application/ld+json">
+{
+ "@context": "http://schema.org",
+ "@type": "WebSite",
+ "url": "{{ .Permalink }}",
+ "name": "{{ .Site.Title }}",
+ "author": {
+ "@type": "Person",
+ "name": "{{ .Site.Params.author }}"
+ },
+ "description": "{{ .Site.Params.description }}",
+}
+</script>
+{{ end }}
+
+{{ if .IsPage }}
+<script type="application/ld+json">
+{
+ "@context": "http://schema.org",
+ "@type": "BlogPosting",
+ "headline": "{{ .Title }}",
+ "genre": "{{ range .Params.categories }}{{ . }}{{ end }}",
+ "url": "{{ .Permalink }}",
+ "datePublished": "{{ time .Date }}",
+ "description": "{{ if .Description }}{{ .Description | plainify }}{{ else }}{{if .IsPage}}{{ .Summary | plainify }}{{ end }}{{ end }}",
+ "author": {
+ "@type": "Person",
+ "name": "{{ .Site.Author.name }}"
+ }
+ }
+</script>
+{{ end }}
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index d3a5752..1c5d9f5 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -14,7 +14,7 @@
{{ range first 3 (where .Site.RegularPages "Section" "posts") }}
<li>
- <p><a href="{{ .URL }}">{{ .Title }}</a><small>&nbsp;&nbsp;{{ .Date.Format "January 2, 2006" }}</small></p>
+ <p><a href="{{ .Permalink }}">{{ .Title }}</a><small>&nbsp;&nbsp;{{ .Date.Format "January 2, 2006" }}</small></p>
</li>
{{ end }}
diff --git a/static/images/image-4.png b/static/images/image-4.png
new file mode 100644
index 0000000..f7f46e8
--- /dev/null
+++ b/static/images/image-4.png
Binary files differ
diff --git a/static/images/image-5.png b/static/images/image-5.png
new file mode 100644
index 0000000..46520dd
--- /dev/null
+++ b/static/images/image-5.png
Binary files differ
diff --git a/theme.toml b/theme.toml
index 4b0f986..8be17fe 100644
--- a/theme.toml
+++ b/theme.toml
@@ -8,7 +8,7 @@ description = "A bootstrap based minimal hugo theme based on webjeda-cards"
homepage = "https://hugo-cards-site.netlify.com/"
tags = ["bootstrap", "cards", "responsive", "jekyll", "blog"]
features = []
-min_version = "0.45.0"
+min_version = "0.57.0"
[author]
name = "Hugo Aguirre"