jekyll-news-sitemap 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8453640a887a8b6c369bd37ad0e0737f5bd6cf2d1c69027d7379b93a1186f6f2
4
- data.tar.gz: abc3a1baa694c34f2954e75dbf75c35eeb24fdd3bac0791d3eb7e2c0e6ab058a
3
+ metadata.gz: 06b06802f95f5b17a7579a13ced81ae74ba4542a6b30b30c09ba13261a8b126c
4
+ data.tar.gz: f6f1abae5d8c45fcb3aa38e679d97d0fc75196cfa2f92807164f1fc577092c01
5
5
  SHA512:
6
- metadata.gz: cd959336abb4c4c6f569438bd3b7d8f5873328107fa1ba6155501dbfec08609fe94d4603e51296563e429f21c1d634223fdfb94635b066ae7aaa15130b1021d9
7
- data.tar.gz: 142a69a2dcc155f90318206fd90e5ba49411ad8ad5ea15243840e9bc5a93192112d6039d61fb82350cb27ee9d487038454289bf228c928885ce2922b2e3e1ae8
6
+ metadata.gz: b9e82c1d1ca5a1bfbfe58460815ba8be0fe0f9fcffd95c07f30683bce2d6b2076de5f4bd432eea72dbb2acfbd4b09493c95c1b847e20fc29f8a0886c3c8621ec
7
+ data.tar.gz: 8ec3adf1846ddca658460eaba2d3f73557b6fe22bbd5f7ee8e88c98b8bd1cbda34fcd7d836b96b0de90bff956eb859e1ebc4dc92cae73389a11217e906141191
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-news-sitemap (0.1.3)
4
+ jekyll-news-sitemap (0.1.4)
5
5
  jekyll (>= 3.7, < 5.0)
6
6
 
7
7
  GEM
@@ -55,7 +55,7 @@ GEM
55
55
  ast (~> 2.4.0)
56
56
  pathutil (0.16.2)
57
57
  forwardable-extended (~> 2.6)
58
- public_suffix (4.0.3)
58
+ public_suffix (4.0.4)
59
59
  rainbow (3.0.0)
60
60
  rake (13.0.1)
61
61
  rb-fsevent (0.10.3)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module NewsSitemap
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.4"
6
6
  end
7
7
  end
data/lib/sitemap_news.xml CHANGED
@@ -1,34 +1,24 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
-
2
+ <urlset>
3
3
  {% assign timeframe = 172800 %}
4
-
5
4
  {% assign posts = site.posts | where_exp:'doc','doc.sitemap != false' %}
6
5
  {% for post in posts %}
7
6
  {% assign post_in_seconds = post.date | date: "%s" | plus: 0 %}
8
7
  {% assign recent_posts = "now" | date: "%s" | minus: timeframe %}
9
-
10
8
  {% if post_in_seconds > recent_posts %}
9
+ <url>
10
+ <loc>{{ post.url | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
11
11
 
12
- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
13
- xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
14
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15
- xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
16
- http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
17
- http://www.google.com/schemas/sitemap-news/0.9
18
- http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd">
19
-
20
- <url>
21
- <loc>{{ post.url | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
22
-
23
- <news:news>
24
- <news:publication>
25
- <news:name>{{site.publisher}}</news:name>
26
- <news:language>en</news:language>
27
- </news:publication>
28
- <news:publication_date>{{ post.date | date_to_xmlschema }}</news:publication_date>
29
- <news:title>{{ post.title }}</news:title>
30
- </news:news>
31
- </url>
32
- </urlset>
12
+ <news:news>
13
+ <news:publication>
14
+ <news:name>{{site.publisher}}</news:name>
15
+ <news:language>en</news:language>
16
+ </news:publication>
17
+ <news:publication_date>{{ post.date | date_to_xmlschema }}</news:publication_date>
18
+ <news:title>{{ post.title }}</news:title>
19
+ </news:news>
20
+ </url>
33
21
  {% endif %}
34
22
  {% endfor %}
23
+ </urlset>
24
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-news-sitemap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav Katkov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-06 00:00:00.000000000 Z
11
+ date: 2020-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll