al_ext_posts 0.1.0 → 1.0.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +12 -24
  4. data/lib/al_ext_posts.rb +19 -2
  5. metadata +3 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8837eae98b908633289d5d3461572abe7d662d1ff4424663d025ee17ab4ddacb
4
- data.tar.gz: af0dac1c1621c4338710a06abbbd0420bb120ddf69b58bde51705c333af199b2
3
+ metadata.gz: 7854d59bf4f472e37e31cb9c397c45154a66c1803c785cbae6be5e0a6fe52936
4
+ data.tar.gz: 2552fdbeb58639b0eedd78589fca65518bde5bbf283fd483565543efbb77f8ad
5
5
  SHA512:
6
- metadata.gz: 762ec2aebbf96538c899df02bf97baa4b5751848cfcde4eab8f659e88597ccffe0fc8bb5d42e086f27c141d887a551e7c940b6242fdad4e39597a9a8e286677e
7
- data.tar.gz: e88c4b4e4894455d584ab285962e53cdd5d98892498b4a526bfd66760d05100c2354058e89c289e418d0ef07e40cf7a66cc1b879f1efee9adc68dd9f750c0758
6
+ metadata.gz: 49733ec7e66503e0ef3326333495cad2b246a657e3780e06d3d8211d4e962293bd80ead5a524e0c0e92ea47b0d13f231c9fdf392c1268ae486bdc06d2f67552b
7
+ data.tar.gz: 3dbc5c1e74595e275acf15c892cc432963e953d1656899ff47a284f4b6258eaa8920fc39d50ed560f68452a1922cfb33ebdab8f00e4425181f59569e107ae123
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1 - 2026-05-24
4
+
5
+ - Preserved source-level categories/tags while allowing RSS entries and explicit external posts to override them.
6
+ - Hardened tests against local timezone differences and current Minitest releases.
7
+
3
8
  ## 0.1.0 - 2026-02-07
9
+
4
10
  - Initial gem release.
5
11
  - Added external post import from RSS feeds and explicit URL lists.
6
12
  - Added RSS parse error handling and per-source default categories/tags.
data/README.md CHANGED
@@ -1,31 +1,21 @@
1
- # Al-Ext-Posts
1
+ # al-ext-posts
2
2
 
3
- A Jekyll plugin that allows you to fetch and display external blog posts from RSS feeds and specific URLs in your Jekyll site.
3
+ `al_ext_posts` imports and renders external posts for `al-folio` v1.x and compatible Jekyll sites.
4
4
 
5
5
  ## Installation
6
6
 
7
- Add this line to your Jekyll site's Gemfile:
8
-
9
7
  ```ruby
10
8
  gem 'al_ext_posts'
11
9
  ```
12
10
 
13
- And then execute:
14
-
15
- ```bash
16
- $ bundle install
17
- ```
18
-
19
- ## Usage
20
-
21
- 1. Add the plugin to your site's `_config.yml`:
22
-
23
11
  ```yaml
24
12
  plugins:
25
13
  - al_ext_posts
26
14
  ```
27
15
 
28
- 2. Configure your external sources in `_config.yml`:
16
+ ## Usage
17
+
18
+ Configure external sources in `_config.yml`:
29
19
 
30
20
  ```yaml
31
21
  external_sources:
@@ -43,18 +33,16 @@ external_sources:
43
33
  published_date: "2024-03-21"
44
34
  ```
45
35
 
46
- The plugin supports two types of sources:
47
- - RSS feeds: Provide the `rss_url` parameter
48
- - Direct URLs: Provide a list of `posts` with `url` and `published_date`
36
+ Supported source types:
49
37
 
50
- Optional per-source defaults:
51
- - `categories`: array of categories automatically applied to imported posts
52
- - `tags`: array of tags automatically applied to imported posts
38
+ - RSS feeds (`rss_url`)
39
+ - Manual URL entries (`posts` with `url` + `published_date`)
53
40
 
54
- ## Development
41
+ ## Ecosystem context
55
42
 
56
- After checking out the repo, run `bundle install` to install dependencies.
43
+ - Starter demo content/wiring lives in `al-folio`.
44
+ - External post ingestion logic is owned here.
57
45
 
58
46
  ## Contributing
59
47
 
60
- Bug reports and pull requests are welcome on GitHub.
48
+ Parser/source behavior changes should be contributed in this repository.
data/lib/al_ext_posts.rb CHANGED
@@ -42,7 +42,7 @@ module AlExtPosts
42
42
  content: e.content,
43
43
  summary: e.summary,
44
44
  published: e.published
45
- }, src)
45
+ }, metadata_for_post(src, e))
46
46
  end
47
47
  end
48
48
 
@@ -85,7 +85,24 @@ module AlExtPosts
85
85
  puts "...fetching #{post['url']}"
86
86
  content = fetch_content_from_url(post['url'])
87
87
  content[:published] = parse_published_date(post['published_date'])
88
- create_document(site, src['name'], post['url'], content, src)
88
+ create_document(site, src['name'], post['url'], content, metadata_for_post(src, post))
89
+ end
90
+ end
91
+
92
+ def metadata_for_post(src, post)
93
+ metadata = src.dup
94
+ %w[categories tags].each do |key|
95
+ value = metadata_value(post, key)
96
+ metadata[key] = value if value && !(value.respond_to?(:empty?) && value.empty?)
97
+ end
98
+ metadata
99
+ end
100
+
101
+ def metadata_value(post, key)
102
+ if post.respond_to?(:key?)
103
+ post[key] || post[key.to_sym]
104
+ elsif post.respond_to?(key)
105
+ post.public_send(key)
89
106
  end
90
107
  end
91
108
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: al_ext_posts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - al-org
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-02-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: jekyll
@@ -143,7 +142,6 @@ metadata:
143
142
  allowed_push_host: https://rubygems.org
144
143
  homepage_uri: https://github.com/al-org-dev/al-ext-posts
145
144
  source_code_uri: https://github.com/al-org-dev/al-ext-posts
146
- post_install_message:
147
145
  rdoc_options: []
148
146
  require_paths:
149
147
  - lib
@@ -158,8 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
156
  - !ruby/object:Gem::Version
159
157
  version: '0'
160
158
  requirements: []
161
- rubygems_version: 3.0.3.1
162
- signing_key:
159
+ rubygems_version: 4.0.6
163
160
  specification_version: 4
164
161
  summary: Import external posts from RSS feeds and URLs
165
162
  test_files: []