jekyll-make-sitemap 1.1.1 → 1.2.0
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/CHANGELOG.md +5 -0
- data/README.md +3 -2
- data/lib/jekyll/make/sitemap.rb +12 -2
- data/lib/jekyll/make/sitemap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16db4afb3d3c11c391bb3b66415273fc85911357a5a9fd9032f740533925c3b2
|
|
4
|
+
data.tar.gz: 448cffe8ddb49bf4945a08192214eacb11bde3892670d8a4a0cc1d61658b2ee3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f4458b5ea17b2942cc5381c94789a97167457c17b577b7d00e67e7ec4b9a40f1aea0f3247e7c742bf514a4a9cacdf61e4ac3673df52d54a43254b58604a0c818
|
|
7
|
+
data.tar.gz: 024267fbca6c40efc38cf0da7fc691cc0650f432e662d8dff0657fb8baf13b22730f4230d0d3a4c47499de5a551db965bf0d876758344dbcf3845d1986b2b615
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [1.2.0] - 2020-07-19
|
|
8
|
+
|
|
9
|
+
Added
|
|
10
|
+
- Ability to include posts by category in configuration
|
|
11
|
+
|
|
7
12
|
## [1.1.1] - 2020-07-12
|
|
8
13
|
|
|
9
14
|
Added
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# [jekyll-make-sitemap](https://rubygems.org/gems/jekyll-make-sitemap)
|
|
2
2
|
[](https://badge.fury.io/rb/jekyll-make-sitemap)
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
A Jekyll hook plugin for generating a `sitemap.txt` file during the Jekyll build process. If you're interested in generating an XML sitemap I recommend checking out [jekyll-sitemap](https://github.com/jekyll/jekyll-sitemap).
|
|
5
5
|
|
|
6
6
|
This plugin includes all pages and posts by default. See the [Configuration](#Configuration) section for more on configuring your sitemap.
|
|
7
7
|
|
|
@@ -25,7 +25,8 @@ In `_config.yml`
|
|
|
25
25
|
``` yaml
|
|
26
26
|
jekyll-make-sitemap:
|
|
27
27
|
pages: true # Default: true
|
|
28
|
-
posts:
|
|
28
|
+
posts: # Default: true
|
|
29
|
+
- category # Categories of posts to include in sitemap; accepts true, false, or a list of categories
|
|
29
30
|
environments: # Default: ['production']
|
|
30
31
|
- production
|
|
31
32
|
- development
|
data/lib/jekyll/make/sitemap.rb
CHANGED
|
@@ -10,12 +10,22 @@ module Jekyll
|
|
|
10
10
|
config = site.config.has_key?("jekyll-make-sitemap") ? site.config["jekyll-make-sitemap"] : default_config
|
|
11
11
|
if config['environments'].include?(payload.jekyll.environment)
|
|
12
12
|
baseurl = site.config["url"]
|
|
13
|
-
collections = config.has_key?("collections") ? ["collections"] : []
|
|
13
|
+
collections = config.has_key?("collections") ? config["collections"] : []
|
|
14
14
|
unless config.has_key?("pages") && config["pages"] == false
|
|
15
15
|
payload.site.pages.each do |page| process(file, page, baseurl) end
|
|
16
16
|
end
|
|
17
17
|
unless config.has_key?("posts") && config["posts"] == false
|
|
18
|
-
payload.site.posts.each do |post|
|
|
18
|
+
payload.site.posts.each do |post|
|
|
19
|
+
if !config["posts"].eql?(true)
|
|
20
|
+
config["posts"].each do |cat|
|
|
21
|
+
if post.data.has_key?("categories") && post.data["categories"].include?(cat)
|
|
22
|
+
process(file, post, baseurl)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
else
|
|
26
|
+
process(file, post, baseurl)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
19
29
|
end
|
|
20
30
|
collections.each do |col|
|
|
21
31
|
site.collections[col].docs.each do |post| process(file, post, baseurl) end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-make-sitemap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sean Hofer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-07-
|
|
11
|
+
date: 2020-07-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: A Jekyll hook plugin for generating a sitemap.txt file during the Jekyll
|
|
14
14
|
build process.
|