Skip to content

Commit 40505f4

Browse files
Add jsonresume support (alshedivat#1547)
Just as discussed in alshedivat#1513 , this pull request adds support for [jsonresume](https://jsonresume.org/). Create the resume once, either as a file in the repository or at [github gist](https://gist.github.com/) called `resume.json`. Put the file in the `_config.yaml` file and that's it! Other platforms like [resumake](https://latexresu.me/) use the same schema. I also incorperated the changes introduced by alshedivat#1339 to the best of my abilites. The style could be further improved. **Please merge this pull request after alshedivat#1339 is merged, due to dependencies from it** If someone has a bettet approach on how to solve the problem that each section needs its own template, please let me know. But for now it works fine and is still backwards compatible with the `cv.yaml` file. Co-authored-by: George <31376482+george-gca@users.noreply.github.com>
1 parent cd5138b commit 40505f4

16 files changed

+578
-0
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ group :jekyll_plugins do
1515
gem 'jekyll-sitemap'
1616
gem 'jekyll-toc'
1717
gem 'jekyll-twitter-plugin'
18+
gem 'jekyll-get-json'
1819
gem 'jemoji'
1920
gem 'mini_racer'
2021
gem 'unicode_utils'

_config.yml

+22
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ plugins:
230230
- jekyll-sitemap
231231
- jekyll-toc
232232
- jekyll-twitter-plugin
233+
- jekyll-get-json
233234
- jemoji
234235

235236
# Sitemap settings
@@ -403,3 +404,24 @@ mdb:
403404
medium_zoom:
404405
version: "1.0.8"
405406
integrity: "sha256-7PhEpEWEW0XXQ0k6kQrPKwuoIomz8R8IYyuU1Qew4P8="
407+
408+
# -----------------------------------------------------------------------------
409+
# Get external JSON data
410+
# -----------------------------------------------------------------------------
411+
412+
jekyll_get_json:
413+
- data: resume
414+
json: "https://alshedivat.github.io/al-folio/assets/json/resume.json"
415+
jsonresume:
416+
- basics
417+
- work
418+
- education
419+
- publications
420+
- projects
421+
- volunteer
422+
- awards
423+
- certificates
424+
- skills
425+
- languages
426+
- interests
427+
- references

_includes/resume/awards.html

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<ul class="card-text font-weight-light list-group list-group-flush">
2+
{% for content in data[1] %}
3+
<li class="list-group-item">
4+
<div class="row">
5+
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
6+
{% if content.date %}
7+
{% assign date = content.date | split: "-" | join: "." %}
8+
{% else %}
9+
{% assign date = "" %}
10+
{% endif %}
11+
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">
12+
{{ date }}
13+
</span>
14+
</div>
15+
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
16+
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.title}}</a></h6>
17+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.awarder}}</h6>
18+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.summary}}</h6>
19+
</div>
20+
</div>
21+
</li>
22+
{% endfor %}
23+
</ul>

_includes/resume/basics.html

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<table class="table table-cv table-sm table-borderless table-responsive table-cv-map">
2+
{% assign skip_basics = "image,profiles,location" | split:"," %}
3+
{% for content in data[1] %}
4+
{% if (content[1] == "") or (skip_basics contains content[0]) %}
5+
{% continue %}
6+
{% endif %}
7+
8+
<tr>
9+
<td class="p-1 pr-2 font-weight-bold"><b>{{ content[0] | capitalize }}</b></td>
10+
<td class="p-1 pl-2 font-weight-light text">
11+
{% if content[0] == "url" %}
12+
<a href="{{ content[1] }}" target="_blank" rel="noopener noreferrer">{{ content[1] }}</a>
13+
{% elsif content[0] == "email" %}
14+
<a href="mailto:{{ content[1] }}" target="_blank">{{ content[1] }}</a>
15+
{% elsif content[0] == "phone" %}
16+
<a href="tel:{{ content[1] }}">{{ content[1] }}</a>
17+
{% else %}
18+
{{ content[1] }}
19+
{% endif %}
20+
</td>
21+
</tr>
22+
{% endfor %}
23+
</table>

_includes/resume/certificates.html

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<div class="list-groups">
2+
{% assign certificates = data[1] | sort: 'date' | reverse %}
3+
{% for content in certificates %}
4+
<div class="list-group col-md-6">
5+
<table class="table-cv list-group-table">
6+
<tbody>
7+
<tr>
8+
{% if content.icon %}
9+
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
10+
{% else %}
11+
<td class="list-group-category-icon"></td>
12+
{% endif %}
13+
<!-- Calculate colspan number for category title -->
14+
{% assign i = 1 %}
15+
{% for item in content.items %}
16+
{% assign i = i | plus:1 %}
17+
{% endfor %}
18+
<td colspan="{{ i }}" class="list-group-category">
19+
<a href="{{ content.url | default: # }}">{{ content.name }}</a>
20+
</td>
21+
</tr>
22+
<tr>
23+
<td></td>
24+
<td class="list-group-name"><b>{{ content.issuer }}</b></td>
25+
<td class="list-group-name">{{ content.date }}</td>
26+
</tr>
27+
</tbody>
28+
</table>
29+
</div>
30+
{% endfor %}
31+
</div>

_includes/resume/education.html

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<ul class="card-text font-weight-light list-group list-group-flush">
2+
{% assign education = data[1] | sort: 'startDate' | reverse %}
3+
{% for content in education %}
4+
<li class="list-group-item">
5+
<div class="row">
6+
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
7+
{% if content.startDate %}
8+
{% assign startDate = content.startDate | split: "-" | slice: 0,2 | join: "." %}
9+
{% assign endDate = content.endDate | split: "-" | slice: 0,2 | join: "." | default: "Present" %}
10+
{% assign date = startDate | append: " - "%}
11+
{% assign date = date | append: endDate %}
12+
{% else %}
13+
{% assign date = "" %}
14+
{% endif %}
15+
<table class="table-cv">
16+
<tbody>
17+
<tr>
18+
<td>
19+
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">{{date}}</span>
20+
</td>
21+
</tr>
22+
{% if content.location %}
23+
<tr>
24+
<td>
25+
<p class="location"><i class="fas fa-map-marker-alt iconlocation"></i> {{ content.location }}</p>
26+
</td>
27+
</tr>
28+
{% endif %}
29+
</tbody>
30+
</table>
31+
</div>
32+
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
33+
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.studyType}}</a></h6>
34+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.institution}}</h6>
35+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.area}}</h6>
36+
<ul class="items">
37+
{% for item in content.courses %}
38+
<li>
39+
<span class="item">{{ item }}</span>
40+
</li>
41+
{% endfor %}
42+
</ul>
43+
</div>
44+
</div>
45+
</li>
46+
{% endfor %}
47+
</ul>

_includes/resume/interests.html

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<div class="list-groups">
2+
{% for content in data[1] %}
3+
<div class="list-group col-md-6">
4+
<table class="table-cv list-group-table">
5+
<tbody>
6+
<tr>
7+
{% if content.icon %}
8+
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
9+
{% else %}
10+
<td class="list-group-category-icon"></td>
11+
{% endif %}
12+
<!-- Calculate colspan number for category title -->
13+
{% assign i = 1 %}
14+
{% for item in content.items %}
15+
{% assign i = i | plus:1 %}
16+
{% endfor %}
17+
<td colspan="{{ i }}" class="list-group-category">{{ content.name }}</td>
18+
</tr>
19+
{% for item in content.keywords %}
20+
<tr>
21+
<td></td>
22+
<td class="list-group-name"><b>{{ item }}</b></td>
23+
</tr>
24+
{% endfor %}
25+
</tbody>
26+
</table>
27+
</div>
28+
{% endfor %}
29+
</div>

_includes/resume/languages.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<div class="list-groups">
2+
{% for content in data[1] %}
3+
<div class="list-group col-md-6">
4+
<table class="table-cv list-group-table">
5+
<tbody>
6+
<tr>
7+
{% if content.icon %}
8+
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
9+
{% else %}
10+
<td class="list-group-category-icon"></td>
11+
{% endif %}
12+
<!-- Calculate colspan number for category title -->
13+
{% assign i = 1 %}
14+
{% for item in content.items %}
15+
{% assign i = i | plus:1 %}
16+
{% endfor %}
17+
<td colspan="{{ i }}" class="list-group-category">{{ content.language }}</td>
18+
</tr>
19+
<tr>
20+
<td></td>
21+
<td class="list-group-name"><b>{{ content.fluency }}</b></td>
22+
</tr>
23+
</tbody>
24+
</table>
25+
</div>
26+
{% endfor %}
27+
</div>

_includes/resume/projects.html

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<ul class="card-text font-weight-light list-group list-group-flush">
2+
{% for content in data[1] %}
3+
<li class="list-group-item">
4+
<div class="row">
5+
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
6+
{% if content.startDate %}
7+
{% assign startDate = content.startDate | split: "-" | slice: 0,2 | join: "." %}
8+
{% assign endDate = content.endDate | split: "-" | slice: 0,2 | join: "." | default: "Present" %}
9+
{% assign date = startDate | append: " - "%}
10+
{% assign date = date | append: endDate %}
11+
{% else %}
12+
{% assign date = "" %}
13+
{% endif %}
14+
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">
15+
{{ date }}
16+
</span>
17+
</div>
18+
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
19+
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.name}}</a></h6>
20+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.summary}}</h6>
21+
<ul class="items">
22+
{% for item in content.highlights %}
23+
<li>
24+
<span class="item">{{ item }}</span>
25+
</li>
26+
{% endfor %}
27+
</ul>
28+
</div>
29+
</div>
30+
</li>
31+
{% endfor %}
32+
</ul>

_includes/resume/publications.html

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<ul class="card-text font-weight-light list-group list-group-flush">
2+
{% assign publications = data[1] | sort: 'releaseDate' | reverse %}
3+
{% for content in publications %}
4+
<li class="list-group-item">
5+
<div class="row">
6+
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
7+
{% if content.releaseDate %}
8+
{% assign date = content.releaseDate | split: "-" | join: "." %}
9+
{% else %}
10+
{% assign date = "" %}
11+
{% endif %}
12+
<table class="table-cv">
13+
<tbody>
14+
<tr>
15+
<td>
16+
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">{{date}}</span>
17+
</td>
18+
</tr>
19+
</tbody>
20+
</table>
21+
</div>
22+
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
23+
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.name}}</a></h6>
24+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.publisher}}</h6>
25+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.summary}}</h6>
26+
</div>
27+
</div>
28+
</li>
29+
{% endfor %}
30+
</ul>

_includes/resume/references.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<div class="list-groups">
2+
{% for content in data[1] %}
3+
<div class="list-group col-md-6">
4+
<table class="table-cv list-group-table">
5+
<tbody>
6+
<tr>
7+
{% if content.icon %}
8+
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
9+
{% else %}
10+
<td class="list-group-category-icon"></td>
11+
{% endif %}
12+
<!-- Calculate colspan number for category title -->
13+
{% assign i = 1 %}
14+
{% for item in content.items %}
15+
{% assign i = i | plus:1 %}
16+
{% endfor %}
17+
<td colspan="{{ i }}" class="list-group-category">{{ content.name }}</td>
18+
</tr>
19+
<tr>
20+
<td></td>
21+
<td class="list-group-name"><b>{{ content.reference }}</b></td>
22+
</tr>
23+
</tbody>
24+
</table>
25+
</div>
26+
{% endfor %}
27+
</div>

_includes/resume/skills.html

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<div class="list-groups">
2+
{% for content in data[1] %}
3+
<div class="list-group col-md-6" title="{{ content.level }}">
4+
<table class="table-cv list-group-table">
5+
<tbody>
6+
<tr>
7+
{% if content.icon %}
8+
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
9+
{% else %}
10+
<td class="list-group-category-icon"></td>
11+
{% endif %}
12+
<!-- Calculate colspan number for category title -->
13+
{% assign i = 1 %}
14+
{% for item in content.items %}
15+
{% assign i = i | plus:1 %}
16+
{% endfor %}
17+
<td colspan="{{ i }}" class="list-group-category">{{ content.name }}</td>
18+
</tr>
19+
{% for item in content.keywords %}
20+
<tr>
21+
<td></td>
22+
<td class="list-group-name"><b>{{ item }}</b></td>
23+
</tr>
24+
{% endfor %}
25+
</tbody>
26+
</table>
27+
</div>
28+
{% endfor %}
29+
</div>

_includes/resume/volunteer.html

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<ul class="card-text font-weight-light list-group list-group-flush">
2+
{% assign volunteer = data[1] | sort: 'startDate' | reverse %}
3+
{% for content in volunteer %}
4+
<li class="list-group-item">
5+
<div class="row">
6+
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
7+
{% if content.startDate %}
8+
{% assign startDate = content.startDate | split: "-" | slice: 0,2 | join: "." %}
9+
{% assign endDate = content.endDate | split: "-" | slice: 0,2 | join: "." | default: "Present" %}
10+
{% assign date = startDate | append: " - "%}
11+
{% assign date = date | append: endDate %}
12+
{% else %}
13+
{% assign date = "" %}
14+
{% endif %}
15+
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">
16+
{{ date }}
17+
</span>
18+
</div>
19+
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
20+
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.position}}</a></h6>
21+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.organization}}</h6>
22+
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.summary}}</h6>
23+
<ul class="items">
24+
{% for item in content.highlights %}
25+
<li>
26+
<span class="item">{{ item }}</span>
27+
</li>
28+
{% endfor %}
29+
</ul>
30+
</div>
31+
</div>
32+
</li>
33+
{% endfor %}
34+
</ul>

0 commit comments

Comments
 (0)