jekyll-theme-amethyst 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/opengraph.html +1 -1
- data/_layouts/post.html +2 -2
- data/_layouts/posts-tag.html +1 -1
- data/_layouts/posts-year.html +1 -1
- data/_layouts/posts.html +1 -1
- data/lib/jekyll-theme-amethyst.rb +34 -0
- metadata +1 -2
- data/_includes/author-text.html +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b821452b60270650a16031ce0c02143e94cc397e8c99dd661318398d59576497
|
4
|
+
data.tar.gz: f23da2ecb2b942d07cdb71a96e2de9c30f3d2ad3506b4bc3ef1fa2548e59a04d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7739a80aa0ad3174a480b5302b6d8510fc3c0d219dfcebb6cfe6d2ff958ee87e346972b97102c5bc1bf13cd89dea9ce6996fb65d84fa0c693a9e1ea64eb6f7d4
|
7
|
+
data.tar.gz: 5cb9d1535f2899914db53358d579b846b233c0853d6210ac76f52c3c2844b38bd0d6b14791700740c5af5e049d814ee20aadf906b342ff7a15fbf71f5f52460b
|
data/_includes/opengraph.html
CHANGED
@@ -53,7 +53,7 @@
|
|
53
53
|
{% if page.layout == "post" and page.date and page.author %}
|
54
54
|
<meta property="og:type" content="article">
|
55
55
|
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
|
56
|
-
<meta name="author" content="{
|
56
|
+
<meta name="author" content="{{ site.data.authors[include.author] | default: include.author | escape }}">
|
57
57
|
{% endif %}
|
58
58
|
|
59
59
|
{% endcapture -%}
|
data/_layouts/post.html
CHANGED
@@ -11,8 +11,8 @@ layout: wrapper
|
|
11
11
|
<p class="post-meta byline">Posted on <a href="{{ page.url | relative_url }}" rel="bookmark"><time itemprop="pubdate" datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: date_format }}</time></a>{% if page.author %} by <span class="vcard"><span class="fn n" rel="author">
|
12
12
|
{%- assign author_page = site.pages | where: "layout", "posts-author" | where: "author", page.author | first -%}
|
13
13
|
{%- if author_page -%}
|
14
|
-
<a href="{{ author_page.url | relative_url }}">{{
|
15
|
-
{%- else -%}{{ page.author | escape
|
14
|
+
<a href="{{ author_page.url | relative_url }}">{{ site.data.authors[page.author] | default: page.author | escape }}</a>
|
15
|
+
{%- else -%}{{ site.data.authors[page.author] | default: page.author | escape}}
|
16
16
|
{%- endif -%}</span></span>{% endif %}</p>
|
17
17
|
</header>
|
18
18
|
{{ content }}
|
data/_layouts/posts-tag.html
CHANGED
@@ -12,7 +12,7 @@ amethyst:
|
|
12
12
|
{%- for post in posts -%}
|
13
13
|
<div class="post-row">
|
14
14
|
<h2><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h2>
|
15
|
-
<p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {
|
15
|
+
<p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {{ site.data.authors[include.author] | default: include.author | escape }}{% endif %}</p>
|
16
16
|
<div class="post">
|
17
17
|
{{- post.excerpt -}}
|
18
18
|
{%- if post.excerpt != post.content %}
|
data/_layouts/posts-year.html
CHANGED
@@ -12,7 +12,7 @@ amethyst:
|
|
12
12
|
{%- for post in posts -%}
|
13
13
|
<div class="post-row">
|
14
14
|
<h2><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h2>
|
15
|
-
<p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {
|
15
|
+
<p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {{ site.data.authors[include.author] | default: include.author | escape }}{% endif %}</p>
|
16
16
|
<div class="post">
|
17
17
|
{{- post.excerpt -}}
|
18
18
|
{%- if post.excerpt != post.content %}
|
data/_layouts/posts.html
CHANGED
@@ -13,7 +13,7 @@ amethyst:
|
|
13
13
|
{% for post in posts -%}
|
14
14
|
<div class="post-row">
|
15
15
|
<h2><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h2>
|
16
|
-
<p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {
|
16
|
+
<p class="post-meta">Posted on <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: date_format }}</time>{% if post.author %} by {{ site.data.authors[include.author] | default: include.author | escape }}{% endif %}</p>
|
17
17
|
<div class="post">
|
18
18
|
{{- post.excerpt -}}
|
19
19
|
{%- if post.excerpt != post.content %}
|
@@ -37,3 +37,37 @@ module Jekyll
|
|
37
37
|
end
|
38
38
|
|
39
39
|
Liquid::Template.register_filter(Jekyll::AmethystFilters)
|
40
|
+
|
41
|
+
module AmethystPlugin
|
42
|
+
|
43
|
+
class AuthorPageWithoutAFile < Jekyll::PageWithoutAFile
|
44
|
+
def template
|
45
|
+
# The template of the permalink, can be customized e.g. to "/blog/author/:author/"
|
46
|
+
# for sites with both API docs and a blog.
|
47
|
+
site.config["amethyst"]["author_permalink"] || "/author/:author"
|
48
|
+
end
|
49
|
+
|
50
|
+
def url_placeholders
|
51
|
+
super.merge({
|
52
|
+
"author" => data["author"]
|
53
|
+
})
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class AuthorPageGenerator < Jekyll::Generator
|
58
|
+
safe true
|
59
|
+
|
60
|
+
def generate(site)
|
61
|
+
site.data["authors"].each do |slug, name|
|
62
|
+
site.pages << AuthorPageWithoutAFile.new(site, site.source, 'author', "#{slug}.html").tap do |page|
|
63
|
+
page.data.merge!(
|
64
|
+
"layout" => "posts-author",
|
65
|
+
"title" => name,
|
66
|
+
"author" => slug
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-amethyst
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Tijhof
|
@@ -108,7 +108,6 @@ extensions: []
|
|
108
108
|
extra_rdoc_files: []
|
109
109
|
files:
|
110
110
|
- LICENSE.txt
|
111
|
-
- _includes/author-text.html
|
112
111
|
- _includes/opengraph.html
|
113
112
|
- _includes/search.html
|
114
113
|
- _includes/sidebar.html
|
data/_includes/author-text.html
DELETED