jekyll-airtable-import 0.1.6 → 0.1.7
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/README.md +4 -3
- data/lib/jekyll-airtable-import/linker.rb +1 -0
- data/lib/jekyll-airtable-import.rb +5 -2
- 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: 466cb3b575e4774b3f376e426b493aa48f3d013741a0c68ef888889106cdc3b1
|
4
|
+
data.tar.gz: dac123033aa98814a3622c67ccf654b3dd0957ebe61f21cd6de278e346733276
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43bddc77a19ee9ddcd1366424d4f80b9470afef6651e096cf8e4d130a4aeb1564347e6d70e7c93765470aacbd1f6c5d8d44208d32aba9b2d3c23cf13008ecada
|
7
|
+
data.tar.gz: 9b1669a899386b52b6958e5fc626cd447f18e1b6d72222e5a4a31cf08b0b7534347617c3aaf1418f754fcd94382b191791b16f6355985c261ee43a6bcd9be43e
|
data/README.md
CHANGED
@@ -29,7 +29,8 @@ your site will be built in.
|
|
29
29
|
### 2. Edit your `_config.yml` file
|
30
30
|
|
31
31
|
To tell your Jekyll site which tables to import your site from by defining them
|
32
|
-
in the `airtable` as a list of tables
|
32
|
+
in the `airtable` as a list of tables:.
|
33
|
+
|
33
34
|
|
34
35
|
```yaml
|
35
36
|
airtable:
|
@@ -77,8 +78,8 @@ Each import's key defines its key in the sites data or collection. Each item in
|
|
77
78
|
|
78
79
|
| Field | Required? | Notes |
|
79
80
|
| ----: | :-------: |---|
|
80
|
-
| app | :heavy_check_mark: | The base ID for the Airtable. Starts with `app` and can be found in an Airtable URL |
|
81
|
-
| table | :heavy_check_mark: | The table ID or name for the collection/data/ Starts with `tbl` and can be found in an Airtable URL |
|
81
|
+
| app | :heavy_check_mark: | The base ID for the Airtable. Starts with `app` and can be found in an Airtable URL. You can use evironment variables for this by prefixing `ENV_` to the defined environment variable. E.g. if you define `AIRTABLE_BASE_ID=app4ghFya5hfwmfVQ` you could put the line `app: ENV_AIRTABLE_BASE_ID` in the config. |
|
82
|
+
| table | :heavy_check_mark: | The table ID or name for the collection/data/ Starts with `tbl` and can be found in an Airtable URL. You can use evironment variables for this by prefixing `ENV_` to the defined environment variable. E.g. if you define `AIRTABLE_TABLE_POSTS=tbl4ghFya5hfwmfVQ` in the environment you could put the line `table: ENV_AIRTABLE_TABLE_POSTS` in the config. |
|
82
83
|
| view | | The view ID (or name) for the collection/data/ Starts with `viw` and can be found in an Airtable URL |
|
83
84
|
| fields | | A list of fields found in the headings of Airtable columns, defining the only fields to be imported |
|
84
85
|
| collection | | If this is defined, the Airtable table will be imported into a collection rather than data. |
|
@@ -75,13 +75,16 @@ module Airtable
|
|
75
75
|
site.config['airtable'].each do |name, conf|
|
76
76
|
conf ||= Hash.new
|
77
77
|
if conf['app']
|
78
|
-
|
78
|
+
# Only update app if conf does
|
79
|
+
@app_id = conf['app'][0..3] == 'ENV_' ? ENV[conf['app'][4..-1]] : conf['app']
|
79
80
|
end
|
80
81
|
unless @app_id
|
81
82
|
Jekyll.logger.warn @log_name, "No app ID for Airtable import of #{name}"
|
82
83
|
next
|
83
84
|
end
|
84
|
-
|
85
|
+
if conf['table']
|
86
|
+
@table_id = conf['table'][0..3] == 'ENV_' ? ENV[conf['table'][4..-1]] : conf['table']
|
87
|
+
end
|
85
88
|
unless @table_id
|
86
89
|
Jekyll.logger.warn @log_name, "No table ID for Airtable import of #{name}"
|
87
90
|
next
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-airtable-import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joe-irving
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|