@terrymooreii/sia 2.1.4 → 2.1.5
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.
- package/lib/build.js +4 -4
- package/package.json +1 -1
- package/themes/_shared/includes/meta.njk +5 -4
- package/themes/developer/pages/blog.njk +1 -1
- package/themes/developer/pages/index.njk +2 -2
- package/themes/developer/pages/notes.njk +1 -1
- package/themes/developer/pages/tag.njk +1 -1
- package/themes/magazine/layouts/post.njk +1 -1
- package/themes/magazine/pages/blog.njk +1 -1
- package/themes/magazine/pages/index.njk +3 -3
- package/themes/magazine/pages/notes.njk +1 -1
- package/themes/magazine/pages/tag.njk +1 -1
package/lib/build.js
CHANGED
|
@@ -83,9 +83,9 @@ function renderTagPages(env, siteData) {
|
|
|
83
83
|
writeFile(join(config.outputDir, 'tags', 'index.html'), tagsHtml);
|
|
84
84
|
|
|
85
85
|
// Render individual tag pages with pagination
|
|
86
|
-
for (const [
|
|
86
|
+
for (const [, tagData] of Object.entries(tags)) {
|
|
87
87
|
const tagPages = paginate(tagData.items, config.pagination.size);
|
|
88
|
-
const baseUrl = `/tags/${
|
|
88
|
+
const baseUrl = `/tags/${tagData.slug}/`;
|
|
89
89
|
|
|
90
90
|
for (const page of tagPages) {
|
|
91
91
|
const pagination = getPaginationUrls(baseUrl, page, basePath);
|
|
@@ -99,8 +99,8 @@ function renderTagPages(env, siteData) {
|
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
const outputPath = page.pageNumber === 1
|
|
102
|
-
? join(config.outputDir, 'tags',
|
|
103
|
-
: join(config.outputDir, 'tags',
|
|
102
|
+
? join(config.outputDir, 'tags', tagData.slug, 'index.html')
|
|
103
|
+
: join(config.outputDir, 'tags', tagData.slug, 'page', String(page.pageNumber), 'index.html');
|
|
104
104
|
|
|
105
105
|
writeFile(outputPath, html);
|
|
106
106
|
}
|
package/package.json
CHANGED
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
<title>{% if title %}{{ title }} | {% endif %}{{ site.title }}</title>
|
|
7
7
|
|
|
8
8
|
{# Open Graph #}
|
|
9
|
+
{% set siteOrigin = site.url | replace(site.basePath, '') if site.basePath else site.url %}
|
|
9
10
|
<meta property="og:title" content="{{ title or site.title }}">
|
|
10
11
|
<meta property="og:description" content="{{ page.excerpt or page.description or site.description }}">
|
|
11
12
|
<meta property="og:type" content="{% if page.collection == 'posts' %}article{% else %}website{% endif %}">
|
|
12
|
-
<meta property="og:url" content="{{
|
|
13
|
+
<meta property="og:url" content="{{ siteOrigin }}{{ page.url if page.url else ('/' | url) }}">
|
|
13
14
|
<meta property="og:site_name" content="{{ site.title }}">
|
|
14
15
|
{% if page.image %}
|
|
15
|
-
<meta property="og:image" content="{{
|
|
16
|
+
<meta property="og:image" content="{{ siteOrigin }}{{ page.image | url }}">
|
|
16
17
|
{% endif %}
|
|
17
18
|
|
|
18
19
|
{# Twitter Card #}
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
<meta name="twitter:title" content="{{ title or site.title }}">
|
|
21
22
|
<meta name="twitter:description" content="{{ page.excerpt or page.description or site.description }}">
|
|
22
23
|
{% if page.image %}
|
|
23
|
-
<meta name="twitter:image" content="{{
|
|
24
|
+
<meta name="twitter:image" content="{{ siteOrigin }}{{ page.image | url }}">
|
|
24
25
|
{% endif %}
|
|
25
26
|
|
|
26
27
|
{# Article specific meta (for blog posts) #}
|
|
@@ -38,4 +39,4 @@
|
|
|
38
39
|
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | url }}">
|
|
39
40
|
|
|
40
41
|
{# Canonical URL #}
|
|
41
|
-
<link rel="canonical" href="{{
|
|
42
|
+
<link rel="canonical" href="{{ siteOrigin }}{{ page.url if page.url else ('/' | url) }}">
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{% endif %}
|
|
27
27
|
|
|
28
28
|
<h3 class="card-title">
|
|
29
|
-
<a href="{{ post.url
|
|
29
|
+
<a href="{{ post.url }}">{{ post.title }}</a>
|
|
30
30
|
</h3>
|
|
31
31
|
|
|
32
32
|
<p class="card-excerpt">{{ post.excerpt | excerpt(120) }}</p>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<article class="note-card">
|
|
56
56
|
<time class="note-time">{{ note.date | date('short') }}</time>
|
|
57
57
|
<div class="note-preview">{{ note.excerpt | excerpt(150) }}</div>
|
|
58
|
-
<a href="{{ note.url
|
|
58
|
+
<a href="{{ note.url }}" class="note-link">Read more →</a>
|
|
59
59
|
</article>
|
|
60
60
|
{% endfor %}
|
|
61
61
|
</div>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</time>
|
|
18
18
|
<div class="timeline-body">
|
|
19
19
|
<div class="note-text">{{ note.excerpt | excerpt(200) }}</div>
|
|
20
|
-
<a href="{{ note.url
|
|
20
|
+
<a href="{{ note.url }}" class="read-more">Continue reading →</a>
|
|
21
21
|
</div>
|
|
22
22
|
{% if note.tags %}
|
|
23
23
|
<div class="timeline-tags">
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
{% if post.url != page.url %}
|
|
69
69
|
<article class="read-more-card">
|
|
70
70
|
<h3 class="read-more-card-title">
|
|
71
|
-
<a href="{{ post.url
|
|
71
|
+
<a href="{{ post.url }}">{{ post.title }}</a>
|
|
72
72
|
</h3>
|
|
73
73
|
<time class="read-more-date">{{ post.date | date('short') }}</time>
|
|
74
74
|
</article>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<a href="{{ ('/tags/' + (post.tags[0] | slug) + '/') | url }}" class="row-category">{{ post.tags[0] }}</a>
|
|
15
15
|
{% endif %}
|
|
16
16
|
<h2 class="row-title">
|
|
17
|
-
<a href="{{ post.url
|
|
17
|
+
<a href="{{ post.url }}">{{ post.title }}</a>
|
|
18
18
|
</h2>
|
|
19
19
|
<p class="row-excerpt">{{ post.excerpt | excerpt(180) }}</p>
|
|
20
20
|
<div class="row-meta">
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<span class="featured-category">{{ featuredPost.tags[0] }}</span>
|
|
18
18
|
{% endif %}
|
|
19
19
|
<h2 class="featured-title">
|
|
20
|
-
<a href="{{ featuredPost.url
|
|
20
|
+
<a href="{{ featuredPost.url }}">{{ featuredPost.title }}</a>
|
|
21
21
|
</h2>
|
|
22
22
|
<p class="featured-excerpt">{{ featuredPost.excerpt | excerpt(200) }}</p>
|
|
23
23
|
<div class="featured-meta">
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<span class="card-category">{{ post.tags[0] }}</span>
|
|
45
45
|
{% endif %}
|
|
46
46
|
<h3 class="card-title">
|
|
47
|
-
<a href="{{ post.url
|
|
47
|
+
<a href="{{ post.url }}">{{ post.title }}</a>
|
|
48
48
|
</h3>
|
|
49
49
|
<p class="card-excerpt">{{ post.excerpt | excerpt(100) }}</p>
|
|
50
50
|
<div class="card-meta">
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<article class="note-preview">
|
|
71
71
|
<time datetime="{{ note.date | date('iso') }}">{{ note.date | date('short') }}</time>
|
|
72
72
|
<p>{{ note.excerpt | excerpt(150) }}</p>
|
|
73
|
-
<a href="{{ note.url
|
|
73
|
+
<a href="{{ note.url }}" class="note-link">Read note →</a>
|
|
74
74
|
</article>
|
|
75
75
|
{% endfor %}
|
|
76
76
|
</div>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</time>
|
|
15
15
|
<div class="note-content">
|
|
16
16
|
<p>{{ note.excerpt | excerpt(250) }}</p>
|
|
17
|
-
<a href="{{ note.url
|
|
17
|
+
<a href="{{ note.url }}" class="note-read-more">Continue reading →</a>
|
|
18
18
|
</div>
|
|
19
19
|
{% if note.tags %}
|
|
20
20
|
<div class="note-item-tags">
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<article class="article-row">
|
|
13
13
|
<div class="article-row-content">
|
|
14
14
|
<h2 class="row-title">
|
|
15
|
-
<a href="{{ post.url
|
|
15
|
+
<a href="{{ post.url }}">{{ post.title }}</a>
|
|
16
16
|
</h2>
|
|
17
17
|
<p class="row-excerpt">{{ post.excerpt | excerpt(180) }}</p>
|
|
18
18
|
<div class="row-meta">
|