bilingual-jekyll-resume-theme 0.2.0 → 0.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +91 -0
- data/_includes/resume-section-ar.html +1 -1
- data/_layouts/resume-ar.html +133 -2
- data/_layouts/resume-en.html +132 -1
- data/docs/CONFIG_GUIDE.md +321 -0
- data/docs/DATA_GUIDE.md +559 -0
- data/docs/INCLUDES_GUIDE.md +482 -0
- data/docs/LAYOUTS_GUIDE.md +312 -0
- data/docs/SASS_GUIDE.md +290 -0
- data/docs/_config.sample.yml +172 -0
- metadata +9 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 82f9ca0be84e6576a493181eb0efe5878302db7196f3843f8468d2048a975995
|
|
4
|
+
data.tar.gz: 9b477efb312e3a1e6d71c3ac8e6ab4e95c04f3a2053ec7042412fc659b6148df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4cb13f53c7a175d3e353ad4bf169786d314c79c838b0aafafba6d57fec578b82fecf5171ae4cbac95f9c2ea2080146e7ae74d0b8067e4c834932af60c4172325
|
|
7
|
+
data.tar.gz: 14a87ccc8f9ed64072ac5b210ed74e0047753a274987e2fd52c527cb728c7bb2f6e3aab22a091299051b8bdefbd8387966b524d0f61302ef835516fee4f9b19f
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
## [0.3.1] - 2025-11-03
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
* Add arabic name to resume and config file ([`c6b224d`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/c6b224d13f8602b8b6f30d0d630817dc6fa55e3a))
|
|
11
|
+
|
|
12
|
+
## [0.3.0] - 2025-11-03
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
* Add SCSS/SASS Guide Documentation ([`77c9e2e`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/77c9e2e6a83188382e5c26033955438438d78beb))
|
|
16
|
+
|
|
17
|
+
* Add _config.yml Guide Documentation and a full sample file ([`a08d4f5`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/a08d4f5675ca902e8a2b5e23a2f3d2b4b5e02902))
|
|
18
|
+
|
|
19
|
+
* Add _layouts Guide Documentation ([`94830fe`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/94830fe4ac59667cc1514e45e5fc82af18440b5e))
|
|
20
|
+
|
|
21
|
+
* Add _includes Guide Documentation ([`b586225`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/b5862259e2f3d955b71417ec9506b1a778c5440a))
|
|
22
|
+
|
|
23
|
+
* Add Data Structure Documentation ([`077184c`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/077184ccd038441c0bfbd7644228d6efd743e75f))
|
|
24
|
+
|
|
25
|
+
* Add comments to the dynamic data loader ar&en layouts ([`4efe0a4`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/4efe0a453f2ca767d55f601ca7b02c7372357e74))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
* Add WARP.md file ([`ff38359`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/ff383590d783e17af1432d257f4f325b101dc574))
|
|
30
|
+
|
|
31
|
+
* Upload changelog file ([`d4ba77b`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/d4ba77b2f17a1d53f9e7e93db57569840fd0e03f))
|
|
32
|
+
|
|
33
|
+
* Create git-cliff config file ([`ad72acd`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/ad72acd74d03bc42c8380ff7d0a5362de66fff81))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
* Update dynamic data loader to use specific active_resume_path variables for Arabic and English ([`f4852cc`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/f4852cc01410deb358df978041a980a6e671ed00))
|
|
38
|
+
|
|
39
|
+
## [0.2.0] - 2025-11-02
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
* Add runtime dependency plugins ([`7b21773`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/7b2177300f683939b9cb045fc3403db962d56193))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
* Update to version 0.2.0 ([`bd1ab3a`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/bd1ab3af75041c5b17109bd3c20fd3c971266dd8))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
* Correct theme asset paths for gem ([`189fc46`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/189fc4693cdce7c2195909405bf97e1647d1aad8))
|
|
51
|
+
|
|
52
|
+
* Fix spec.files ([`92003e7`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/92003e7865100961b60376bd63daa1b8705e4e81))
|
|
53
|
+
|
|
54
|
+
## [0.1.1] - 2025-11-02
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
* Add assets folder ([`41fbb34`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/41fbb34708d28da99e1730cffdd485b3e6a1e1af))
|
|
58
|
+
|
|
59
|
+
* Add _sass folder ([`15ddfe1`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/15ddfe1245dbc855eebd481d1529bfad28bf6916))
|
|
60
|
+
|
|
61
|
+
* Add _layouts folder ([`0d2bd65`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/0d2bd65458760b7787a7fcca16fb9b5d805c8857))
|
|
62
|
+
|
|
63
|
+
* Add _includes folder ([`8c87411`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/8c87411b64a9a66870a1e71f13e8d08ed3a29680))
|
|
64
|
+
|
|
65
|
+
* Add CODE_OF_CONDUCT.MD ([`abea110`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/abea11088296b04f3f7ccbd845f7268c84b3e9cf))
|
|
66
|
+
|
|
67
|
+
* Add .whitesource configuration file ([`1958aa0`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/1958aa04a25ce3aa8c60ddda3a5e9eb9fe43d79c))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Changed
|
|
71
|
+
* Update to version 0.1.1 ([`07c61a7`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/07c61a70da763e2258020c41c3d2198eb89dc1f7))
|
|
72
|
+
|
|
73
|
+
* Update gemspec with metadata ([`2c1f1a7`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/2c1f1a7138314e6481edaa96391640d35349515e))
|
|
74
|
+
|
|
75
|
+
* Merge pull request #1 from kmutahar/whitesource/configure ([`058663b`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/058663b282b2b839cb244a80dc4a1ca0cbdaedab))
|
|
76
|
+
|
|
77
|
+
## [0.1.0] - 2025-11-02
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
* Update gemspec with correct email, summary, and homepage ([`39e7b88`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/39e7b8872c1092c52261c9524245ebf73804a99e))
|
|
81
|
+
|
|
82
|
+
* Update LICENSE file with orginal author copyright ([`ff03b02`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/ff03b02b285c14ac393b0ee71596961fb760c5b9))
|
|
83
|
+
|
|
84
|
+
* Initial commit (New Theme Template) ([`00af662`](https://github.com/kmutahar/bilingual-jekyll-resume-theme/commit/00af6628dfec7aefe0ef7d7083bf98c9713a5ffd))
|
|
85
|
+
|
|
86
|
+
[0.3.1]: https://github.com/kmutahar/bilingual-jekyll-resume-theme/compare/v0.3.0...v0.3.1
|
|
87
|
+
[0.3.0]: https://github.com/kmutahar/bilingual-jekyll-resume-theme/compare/v0.2.0...v0.3.0
|
|
88
|
+
[0.2.0]: https://github.com/kmutahar/bilingual-jekyll-resume-theme/compare/v0.1.1...v0.2.0
|
|
89
|
+
[0.1.1]: https://github.com/kmutahar/bilingual-jekyll-resume-theme/compare/v0.1.0...v0.1.1
|
|
90
|
+
|
|
91
|
+
<!-- generated by git-cliff -->
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
{% for project in resume_data.projects %}
|
|
201
201
|
{% if project.active == true %}
|
|
202
202
|
<div class="resume-item" itemscope itemtype="http://schema.org/CreativeWork">
|
|
203
|
-
<meta itemprop="creator" content="{{ site.
|
|
203
|
+
<meta itemprop="creator" content="{{ site.name_ar.first }} {{ site.name_ar.middle }} {{ site.name_ar.last }}" itemtype="http://schema.org/Person" />
|
|
204
204
|
<h3 class="resume-item-title" itemprop="name" style="display: inline-block;">
|
|
205
205
|
{% if project.url %}
|
|
206
206
|
<a href="{{ project.url }}" target="_blank" rel="noopener nofollow noreferrer" itemprop="url">{{ project.project }}</a>
|
data/_layouts/resume-ar.html
CHANGED
|
@@ -1,16 +1,147 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
=============================================================================
|
|
3
|
+
DYNAMIC DATA LOADER FOR JEKYLL
|
|
4
|
+
=============================================================================
|
|
5
|
+
This entire block dynamically sets the 'resume_data' variable.
|
|
6
|
+
Its goal is to find the correct data folder (or "data object") based on the
|
|
7
|
+
'active_resume_path_ar' variable set in your _config.yml file.
|
|
8
|
+
|
|
9
|
+
The rest of the template can then use 'resume_data'
|
|
10
|
+
(e.g., 'resume_data.experience', 'resume_data.links') without
|
|
11
|
+
caring *where* that data actually came from.
|
|
12
|
+
{% endcomment %}
|
|
13
|
+
|
|
14
|
+
{% comment %}
|
|
15
|
+
STEP 1: Get the path string from the config file.
|
|
16
|
+
'site.active_resume_path_ar' reads the value from _config.yml.
|
|
17
|
+
We assign it to a new, shorter variable called 'data_path_string'.
|
|
18
|
+
{% endcomment %}
|
|
1
19
|
{% assign data_path_string = site.active_resume_path_ar %}
|
|
2
20
|
|
|
21
|
+
{% comment %}
|
|
22
|
+
STEP 2: Check if the path is empty.
|
|
23
|
+
This 'if' statement checks if 'data_path_string' is either an
|
|
24
|
+
empty string ("") or 'nil' (which means it wasn't defined at all).
|
|
25
|
+
This is our "default" or "fallback" case for files in the root _data/ folder.
|
|
26
|
+
{% endcomment %}
|
|
3
27
|
{% if data_path_string == "" or data_path_string == nil %}
|
|
28
|
+
|
|
29
|
+
{% comment %}
|
|
30
|
+
FALLBACK CASE: The path was empty.
|
|
31
|
+
We assign 'resume_data' to be the top-level 'site.data' object.
|
|
32
|
+
This means the rest of the template will look for files directly in
|
|
33
|
+
the _data/ folder (e.g., 'site.data.experience' from _data/experience.yml).
|
|
34
|
+
{% endcomment %}
|
|
4
35
|
{% assign resume_data = site.data %}
|
|
5
|
-
|
|
36
|
+
|
|
37
|
+
{% else %}
|
|
38
|
+
|
|
39
|
+
{% comment %}
|
|
40
|
+
ACTIVE CASE: A path was provided (e.g., "ar" or "ProjectManager").
|
|
41
|
+
Now we need to "drill down" to find the correct data object.
|
|
42
|
+
{% endcomment %}
|
|
43
|
+
|
|
44
|
+
{% comment %}
|
|
45
|
+
STEP 3: Split the path string into parts.
|
|
46
|
+
The 'split: "."' filter takes the string and breaks it into an
|
|
47
|
+
array (a list) using the dot '.' as the separator.
|
|
48
|
+
If data_path_string = "2025-06.20250621-PM"
|
|
49
|
+
Then path_parts = ["2025-06", "20250621-PM"]
|
|
50
|
+
If data_path_string = "ar"
|
|
51
|
+
Then path_parts = ["ar"]
|
|
52
|
+
{% endcomment %}
|
|
6
53
|
{% assign path_parts = data_path_string | split: '.' %}
|
|
54
|
+
|
|
55
|
+
{% comment %}
|
|
56
|
+
STEP 4: Set the starting point for our loop.
|
|
57
|
+
We create a temporary variable 'data_object' and set it to the
|
|
58
|
+
very top of the data tree, 'site.data'. This is the object
|
|
59
|
+
we will "drill down" into.
|
|
60
|
+
{% endcomment %}
|
|
7
61
|
{% assign data_object = site.data %}
|
|
62
|
+
|
|
63
|
+
{% comment %}
|
|
64
|
+
STEP 5: The Loop.
|
|
65
|
+
This 'for' loop iterates over the 'path_parts' array we created.
|
|
66
|
+
For each 'part' in the list, it will run the code inside.
|
|
67
|
+
{% endcomment %}
|
|
8
68
|
{% for part in path_parts %}
|
|
69
|
+
|
|
70
|
+
{% comment %}
|
|
71
|
+
THE CORE LOGIC: Drilling Down with Bracket Notation.
|
|
72
|
+
|
|
73
|
+
This is the most important line. It re-assigns 'data_object'
|
|
74
|
+
to be a *child* of itself, using the current 'part' as the key.
|
|
75
|
+
|
|
76
|
+
It uses BRACKET NOTATION: data_object[part]
|
|
77
|
+
|
|
78
|
+
WHY BRACKET NOTATION?
|
|
79
|
+
In Liquid, you can access data in two ways:
|
|
80
|
+
1. Dot Notation: site.data.ar
|
|
81
|
+
2. Bracket Notation: site.data['ar']
|
|
82
|
+
|
|
83
|
+
Dot notation fails if the key starts with a number (like "2025-06").
|
|
84
|
+
Liquid sees 'site.data.2025-06' and gets confused.
|
|
85
|
+
|
|
86
|
+
Bracket notation *always* works because it treats the key as a
|
|
87
|
+
string, no matter what it contains. 'site.data['2025-06']' is valid.
|
|
88
|
+
|
|
89
|
+
Since our 'part' variable holds a string, 'data_object[part]' is
|
|
90
|
+
the perfect way to safely access the next level down.
|
|
91
|
+
|
|
92
|
+
HOW THE LOOP WORKS (Example: Your path is _data/2025-06/20250621-PM/)
|
|
93
|
+
|
|
94
|
+
- Your config string is: data_path_string = "2025-06.20250621-PM"
|
|
95
|
+
- The split array is: path_parts = ["2025-06", "20250621-PM"]
|
|
96
|
+
|
|
97
|
+
- Before loop: data_object = site.data
|
|
98
|
+
|
|
99
|
+
- Loop 1:
|
|
100
|
+
- part = "2025-06"
|
|
101
|
+
- code runs: data_object = data_object["2025-06"]
|
|
102
|
+
- result: data_object = site.data['2025-06']
|
|
103
|
+
|
|
104
|
+
- Loop 2:
|
|
105
|
+
- part = "20250621-PM"
|
|
106
|
+
- code runs: data_object = data_object["20250621-PM"]
|
|
107
|
+
- result: data_object = site.data['2025-06']['20250621-PM']
|
|
108
|
+
|
|
109
|
+
- Loop ends.
|
|
110
|
+
{% endcomment %}
|
|
9
111
|
{% assign data_object = data_object[part] %}
|
|
112
|
+
|
|
10
113
|
{% endfor %}
|
|
114
|
+
|
|
115
|
+
{% comment %}
|
|
116
|
+
STEP 6: Final Assignment.
|
|
117
|
+
|
|
118
|
+
After the loop has finished, 'data_object' holds our target folder
|
|
119
|
+
(e.g., site.data.ar or site.data['2025-06']['20250621-PM']).
|
|
120
|
+
|
|
121
|
+
We now assign this final object to the 'resume_data' variable that
|
|
122
|
+
the rest of the template will use.
|
|
123
|
+
{% endcomment %}
|
|
11
124
|
{% assign resume_data = data_object %}
|
|
125
|
+
|
|
12
126
|
{% endif %}
|
|
13
127
|
|
|
128
|
+
{% comment %}
|
|
129
|
+
=============================================================================
|
|
130
|
+
DYNAMIC DATA LOADER ENDS
|
|
131
|
+
=============================================================================
|
|
132
|
+
|
|
133
|
+
From this point on, you can just use 'resume_data' variable.
|
|
134
|
+
|
|
135
|
+
- If config was empty (""):
|
|
136
|
+
resume_data.experience == site.data.experience
|
|
137
|
+
|
|
138
|
+
- If config was "ar":
|
|
139
|
+
resume_data.experience == site.data.ar.experience
|
|
140
|
+
|
|
141
|
+
- If config was "2025-06.20250621-PM":
|
|
142
|
+
resume_data.experience == site.data['2025-06']['20250621-PM'].experience
|
|
143
|
+
{% endcomment %}
|
|
144
|
+
|
|
14
145
|
<!DOCTYPE html>
|
|
15
146
|
<html lang="ar" dir="rtl">
|
|
16
147
|
<!-- هذه الصفحة تم تحديثها آخر مرة في {{ "now" | date: "%Y-%m-%d %H:%M:%S" }}Z -->
|
|
@@ -42,7 +173,7 @@
|
|
|
42
173
|
|
|
43
174
|
<!-- Your name is defined in the _config.yml file -->
|
|
44
175
|
<h1 class="header-name" itemprop="name">
|
|
45
|
-
{{ site.
|
|
176
|
+
{{ site.name_ar.first }} {{ site.name_ar.middle }} {{ site.name_ar.last }}
|
|
46
177
|
</h1>
|
|
47
178
|
|
|
48
179
|
{% if site.display_header_contact_info == true %}
|
data/_layouts/resume-en.html
CHANGED
|
@@ -1,16 +1,147 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
=============================================================================
|
|
3
|
+
DYNAMIC DATA LOADER FOR JEKYLL
|
|
4
|
+
=============================================================================
|
|
5
|
+
This entire block dynamically sets the 'resume_data' variable.
|
|
6
|
+
Its goal is to find the correct data folder (or "data object") based on the
|
|
7
|
+
'active_resume_path_en' variable set in your _config.yml file.
|
|
8
|
+
|
|
9
|
+
The rest of the template can then use 'resume_data'
|
|
10
|
+
(e.g., 'resume_data.experience', 'resume_data.links') without
|
|
11
|
+
caring *where* that data actually came from.
|
|
12
|
+
{% endcomment %}
|
|
13
|
+
|
|
14
|
+
{% comment %}
|
|
15
|
+
STEP 1: Get the path string from the config file.
|
|
16
|
+
'site.active_resume_path_en' reads the value from _config.yml.
|
|
17
|
+
We assign it to a new, shorter variable called 'data_path_string'.
|
|
18
|
+
{% endcomment %}
|
|
1
19
|
{% assign data_path_string = site.active_resume_path_en %}
|
|
2
20
|
|
|
21
|
+
{% comment %}
|
|
22
|
+
STEP 2: Check if the path is empty.
|
|
23
|
+
This 'if' statement checks if 'data_path_string' is either an
|
|
24
|
+
empty string ("") or 'nil' (which means it wasn't defined at all).
|
|
25
|
+
This is our "default" or "fallback" case for files in the root _data/ folder.
|
|
26
|
+
{% endcomment %}
|
|
3
27
|
{% if data_path_string == "" or data_path_string == nil %}
|
|
28
|
+
|
|
29
|
+
{% comment %}
|
|
30
|
+
FALLBACK CASE: The path was empty.
|
|
31
|
+
We assign 'resume_data' to be the top-level 'site.data' object.
|
|
32
|
+
This means the rest of the template will look for files directly in
|
|
33
|
+
the _data/ folder (e.g., 'site.data.experience' from _data/experience.yml).
|
|
34
|
+
{% endcomment %}
|
|
4
35
|
{% assign resume_data = site.data %}
|
|
5
|
-
|
|
36
|
+
|
|
37
|
+
{% else %}
|
|
38
|
+
|
|
39
|
+
{% comment %}
|
|
40
|
+
ACTIVE CASE: A path was provided (e.g., "en" or "ProjectManager").
|
|
41
|
+
Now we need to "drill down" to find the correct data object.
|
|
42
|
+
{% endcomment %}
|
|
43
|
+
|
|
44
|
+
{% comment %}
|
|
45
|
+
STEP 3: Split the path string into parts.
|
|
46
|
+
The 'split: "."' filter takes the string and breaks it into an
|
|
47
|
+
array (a list) using the dot '.' as the separator.
|
|
48
|
+
If data_path_string = "2025-06.20250621-PM"
|
|
49
|
+
Then path_parts = ["2025-06", "20250621-PM"]
|
|
50
|
+
If data_path_string = "en"
|
|
51
|
+
Then path_parts = ["en"]
|
|
52
|
+
{% endcomment %}
|
|
6
53
|
{% assign path_parts = data_path_string | split: '.' %}
|
|
54
|
+
|
|
55
|
+
{% comment %}
|
|
56
|
+
STEP 4: Set the starting point for our loop.
|
|
57
|
+
We create a temporary variable 'data_object' and set it to the
|
|
58
|
+
very top of the data tree, 'site.data'. This is the object
|
|
59
|
+
we will "drill down" into.
|
|
60
|
+
{% endcomment %}
|
|
7
61
|
{% assign data_object = site.data %}
|
|
62
|
+
|
|
63
|
+
{% comment %}
|
|
64
|
+
STEP 5: The Loop.
|
|
65
|
+
This 'for' loop iterates over the 'path_parts' array we created.
|
|
66
|
+
For each 'part' in the list, it will run the code inside.
|
|
67
|
+
{% endcomment %}
|
|
8
68
|
{% for part in path_parts %}
|
|
69
|
+
|
|
70
|
+
{% comment %}
|
|
71
|
+
THE CORE LOGIC: Drilling Down with Bracket Notation.
|
|
72
|
+
|
|
73
|
+
This is the most important line. It re-assigns 'data_object'
|
|
74
|
+
to be a *child* of itself, using the current 'part' as the key.
|
|
75
|
+
|
|
76
|
+
It uses BRACKET NOTATION: data_object[part]
|
|
77
|
+
|
|
78
|
+
WHY BRACKET NOTATION?
|
|
79
|
+
In Liquid, you can access data in two ways:
|
|
80
|
+
1. Dot Notation: site.data.en
|
|
81
|
+
2. Bracket Notation: site.data['en']
|
|
82
|
+
|
|
83
|
+
Dot notation fails if the key starts with a number (like "2025-06").
|
|
84
|
+
Liquid sees 'site.data.2025-06' and gets confused.
|
|
85
|
+
|
|
86
|
+
Bracket notation *always* works because it treats the key as a
|
|
87
|
+
string, no matter what it contains. 'site.data['2025-06']' is valid.
|
|
88
|
+
|
|
89
|
+
Since our 'part' variable holds a string, 'data_object[part]' is
|
|
90
|
+
the perfect way to safely access the next level down.
|
|
91
|
+
|
|
92
|
+
HOW THE LOOP WORKS (Example: Your path is _data/2025-06/20250621-PM/)
|
|
93
|
+
|
|
94
|
+
- Your config string is: data_path_string = "2025-06.20250621-PM"
|
|
95
|
+
- The split array is: path_parts = ["2025-06", "20250621-PM"]
|
|
96
|
+
|
|
97
|
+
- Before loop: data_object = site.data
|
|
98
|
+
|
|
99
|
+
- Loop 1:
|
|
100
|
+
- part = "2025-06"
|
|
101
|
+
- code runs: data_object = data_object["2025-06"]
|
|
102
|
+
- result: data_object = site.data['2025-06']
|
|
103
|
+
|
|
104
|
+
- Loop 2:
|
|
105
|
+
- part = "20250621-PM"
|
|
106
|
+
- code runs: data_object = data_object["20250621-PM"]
|
|
107
|
+
- result: data_object = site.data['2025-06']['20250621-PM']
|
|
108
|
+
|
|
109
|
+
- Loop ends.
|
|
110
|
+
{% endcomment %}
|
|
9
111
|
{% assign data_object = data_object[part] %}
|
|
112
|
+
|
|
10
113
|
{% endfor %}
|
|
114
|
+
|
|
115
|
+
{% comment %}
|
|
116
|
+
STEP 6: Final Assignment.
|
|
117
|
+
|
|
118
|
+
After the loop has finished, 'data_object' holds our target folder
|
|
119
|
+
(e.g., site.data.en or site.data['2025-06']['20250621-PM']).
|
|
120
|
+
|
|
121
|
+
We now assign this final object to the 'resume_data' variable that
|
|
122
|
+
the rest of the template will use.
|
|
123
|
+
{% endcomment %}
|
|
11
124
|
{% assign resume_data = data_object %}
|
|
125
|
+
|
|
12
126
|
{% endif %}
|
|
13
127
|
|
|
128
|
+
{% comment %}
|
|
129
|
+
=============================================================================
|
|
130
|
+
DYNAMIC DATA LOADER ENDS
|
|
131
|
+
=============================================================================
|
|
132
|
+
|
|
133
|
+
From this point on, you can just use 'resume_data' variable.
|
|
134
|
+
|
|
135
|
+
- If config was empty (""):
|
|
136
|
+
resume_data.experience == site.data.experience
|
|
137
|
+
|
|
138
|
+
- If config was "en":
|
|
139
|
+
resume_data.experience == site.data.en.experience
|
|
140
|
+
|
|
141
|
+
- If config was "2025-06.20250621-PM":
|
|
142
|
+
resume_data.experience == site.data['2025-06']['20250621-PM'].experience
|
|
143
|
+
{% endcomment %}
|
|
144
|
+
|
|
14
145
|
<!DOCTYPE html>
|
|
15
146
|
<html lang="en">
|
|
16
147
|
<!-- This page was last updated on {{ "now" | date: "%Y-%m-%d %H:%M:%S" }}Z -->
|