jekyll-dictionaries 1.0.1 → 1.0.2
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/.idea/workspace.xml +19 -17
- data/README.md +13 -0
- data/lib/jekyll-dictionaries/generator.rb +6 -6
- data/lib/jekyll-dictionaries/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36df1371462bb937a7af666ad4db6b25f286f5ade437a76f6b1ecfcabf6c5ffe
|
4
|
+
data.tar.gz: 546ec1819e6f760ec135d340820f11de48bf09d1f5d70bfdf63ebe79f647bc9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc4e3620041b4f8e892ce2684f0030906cafdecac9e9e12a5ab8c0838e9749854c2e8390c1211e390650961cb21830610bb48077b99c7e2265ccfa085c6dc870
|
7
|
+
data.tar.gz: 1128d9b0a9c36e1ca95943e0db3600ca76d45b05e64ac049a2b033d61108f0a2b887865ff9bd761343d80e88dee0cd51a7ca5d25edf552cd0d5e4f5ab51bbd49
|
data/.idea/workspace.xml
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
<component name="ChangeListManager">
|
7
7
|
<list default="true" id="a0de0db4-04ba-4a6e-9544-85d905789a03" name="Changes" comment="">
|
8
8
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
9
|
+
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
9
10
|
</list>
|
10
11
|
<option name="SHOW_DIALOG" value="false" />
|
11
12
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
@@ -23,25 +24,26 @@
|
|
23
24
|
<option name="hideEmptyMiddlePackages" value="true" />
|
24
25
|
<option name="showLibraryContents" value="true" />
|
25
26
|
</component>
|
26
|
-
<component name="PropertiesComponent"
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
27
|
+
<component name="PropertiesComponent"><![CDATA[{
|
28
|
+
"keyToString": {
|
29
|
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
30
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
31
|
+
"WebServerToolWindowFactoryState": "false",
|
32
|
+
"last_opened_file_path": "/Users/s.ginkov/Work/Hinkou Labs/jekyll-dictionaries/spec/fixtures/snapshots/pages",
|
33
|
+
"node.js.detected.package.eslint": "true",
|
34
|
+
"node.js.detected.package.tslint": "true",
|
35
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
36
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
37
|
+
"nodejs_package_manager_path": "npm",
|
38
|
+
"ruby.rails.projectView.checked": "true",
|
39
|
+
"ruby.structure.view.model.defaults.configured": "true",
|
40
|
+
"settings.editor.selected.configurable": "org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable",
|
41
|
+
"vue.rearranger.settings.migration": "true"
|
41
42
|
}
|
42
|
-
}
|
43
|
+
}]]></component>
|
43
44
|
<component name="RecentsManager">
|
44
45
|
<key name="CopyFile.RECENT_KEYS">
|
46
|
+
<recent name="$PROJECT_DIR$/spec/fixtures/snapshots/pages" />
|
45
47
|
<recent name="$PROJECT_DIR$/spec/fixtures/jekyll" />
|
46
48
|
<recent name="$PROJECT_DIR$" />
|
47
49
|
<recent name="$PROJECT_DIR$/.idea" />
|
@@ -65,7 +67,7 @@
|
|
65
67
|
<updated>1696301317963</updated>
|
66
68
|
<workItem from="1696301319406" duration="9538000" />
|
67
69
|
<workItem from="1696310885150" duration="15107000" />
|
68
|
-
<workItem from="1696338033417" duration="
|
70
|
+
<workItem from="1696338033417" duration="9652000" />
|
69
71
|
</task>
|
70
72
|
<servers />
|
71
73
|
</component>
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Jekyll Dictionaries Plugin
|
2
2
|
|
3
|
+
[](https://github.com/hinkoulabs/jekyll-dictionaries/actions/workflows/ruby.yml) [](https://badge.fury.io/rb/jekyll-dictionaries)
|
4
|
+
|
5
|
+
|
3
6
|
Welcome to the Jekyll Dictionaries Plugin project! This open-source project allows you to create and share JSON dictionaries that can be accessed via a public API for language learning in mobile applications.
|
4
7
|
|
5
8
|
## Table of Contents
|
@@ -17,6 +20,7 @@ Welcome to the Jekyll Dictionaries Plugin project! This open-source project allo
|
|
17
20
|
- [Dictionary Types Examples](#dictionary-types-examples)
|
18
21
|
- [1. Single Translation Dictionary Example](#1-single-translation-dictionary-example)
|
19
22
|
- [2. Multiple Translations Dictionary Example](#2-multiple-translations-dictionary-example)
|
23
|
+
- [Push New Version Commands](#push-new-version-commands)
|
20
24
|
- [License](#license)
|
21
25
|
|
22
26
|
## Installation
|
@@ -478,6 +482,15 @@ The plugin will generate JSON API **/api/dictionaries/multiple.json**
|
|
478
482
|
|
479
483
|
As you can see collection `greetings` and folder `un1` have names that are defined by property `name`.
|
480
484
|
|
485
|
+
## Push New Version Commands
|
486
|
+
|
487
|
+
```bash
|
488
|
+
gem bump
|
489
|
+
|
490
|
+
```
|
491
|
+
|
492
|
+
|
493
|
+
|
481
494
|
## License
|
482
495
|
|
483
496
|
This project is licensed under the MIT License.
|
@@ -13,14 +13,14 @@ module JekyllDictionaries
|
|
13
13
|
# dictionary start with _
|
14
14
|
m = k.match(DICT_REGEX)
|
15
15
|
if m
|
16
|
-
dict = v.merge(data
|
16
|
+
dict = v.merge('data' => [])
|
17
17
|
|
18
18
|
name = m[1]
|
19
19
|
|
20
20
|
folder = site.data['dictionaries'][name]
|
21
21
|
|
22
22
|
if (folder)
|
23
|
-
dict[
|
23
|
+
dict['data'] = build_collections(folder)
|
24
24
|
end
|
25
25
|
|
26
26
|
memo << OpenStruct.new(filename: name, content: dict)
|
@@ -52,15 +52,15 @@ module JekyllDictionaries
|
|
52
52
|
# collection is detected
|
53
53
|
if (v['type'] == 'collection')
|
54
54
|
# set k as title if title is missing
|
55
|
-
memo << { name
|
55
|
+
memo << { 'name' => v['name'] || k }.merge(v)
|
56
56
|
else
|
57
57
|
metadata = v['_metadata']
|
58
58
|
# folder is detected
|
59
59
|
memo
|
60
60
|
folder = {
|
61
|
-
type
|
62
|
-
name
|
63
|
-
data
|
61
|
+
'type' => 'folder',
|
62
|
+
'name' => metadata ? metadata['name'] : k,
|
63
|
+
'data' => build_collections(v.select { |kk, _| kk != '_metadata' })
|
64
64
|
}
|
65
65
|
memo << folder
|
66
66
|
end
|