Skip to content

Commit

Permalink
Add jsonresume support (alshedivat#1547)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
2 people authored and michakinyemi committed Dec 15, 2023
1 parent 53f01e4 commit 8643988
Show file tree
Hide file tree
Showing 16 changed files with 578 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ group :jekyll_plugins do
gem 'jekyll-sitemap'
gem 'jekyll-toc'
gem 'jekyll-twitter-plugin'
gem 'jekyll-get-json'
gem 'jemoji'
gem 'mini_racer'
gem 'unicode_utils'
Expand Down
22 changes: 22 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ plugins:
- jekyll-sitemap
- jekyll-toc
- jekyll-twitter-plugin
- jekyll-get-json
- jemoji

# Sitemap settings
Expand Down Expand Up @@ -403,3 +404,24 @@ mdb:
medium_zoom:
version: "1.0.8"
integrity: "sha256-7PhEpEWEW0XXQ0k6kQrPKwuoIomz8R8IYyuU1Qew4P8="

# -----------------------------------------------------------------------------
# Get external JSON data
# -----------------------------------------------------------------------------

jekyll_get_json:
- data: resume
json: "https://alshedivat.github.io/al-folio/assets/json/resume.json"
jsonresume:
- basics
- work
- education
- publications
- projects
- volunteer
- awards
- certificates
- skills
- languages
- interests
- references
23 changes: 23 additions & 0 deletions _includes/resume/awards.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<ul class="card-text font-weight-light list-group list-group-flush">
{% for content in data[1] %}
<li class="list-group-item">
<div class="row">
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
{% if content.date %}
{% assign date = content.date | split: "-" | join: "." %}
{% else %}
{% assign date = "" %}
{% endif %}
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">
{{ date }}
</span>
</div>
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.title}}</a></h6>
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.awarder}}</h6>
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.summary}}</h6>
</div>
</div>
</li>
{% endfor %}
</ul>
23 changes: 23 additions & 0 deletions _includes/resume/basics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<table class="table table-cv table-sm table-borderless table-responsive table-cv-map">
{% assign skip_basics = "image,profiles,location" | split:"," %}
{% for content in data[1] %}
{% if (content[1] == "") or (skip_basics contains content[0]) %}
{% continue %}
{% endif %}

<tr>
<td class="p-1 pr-2 font-weight-bold"><b>{{ content[0] | capitalize }}</b></td>
<td class="p-1 pl-2 font-weight-light text">
{% if content[0] == "url" %}
<a href="{{ content[1] }}" target="_blank" rel="noopener noreferrer">{{ content[1] }}</a>
{% elsif content[0] == "email" %}
<a href="mailto:{{ content[1] }}" target="_blank">{{ content[1] }}</a>
{% elsif content[0] == "phone" %}
<a href="tel:{{ content[1] }}">{{ content[1] }}</a>
{% else %}
{{ content[1] }}
{% endif %}
</td>
</tr>
{% endfor %}
</table>
31 changes: 31 additions & 0 deletions _includes/resume/certificates.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<div class="list-groups">
{% assign certificates = data[1] | sort: 'date' | reverse %}
{% for content in certificates %}
<div class="list-group col-md-6">
<table class="table-cv list-group-table">
<tbody>
<tr>
{% if content.icon %}
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
{% else %}
<td class="list-group-category-icon"></td>
{% endif %}
<!-- Calculate colspan number for category title -->
{% assign i = 1 %}
{% for item in content.items %}
{% assign i = i | plus:1 %}
{% endfor %}
<td colspan="{{ i }}" class="list-group-category">
<a href="{{ content.url | default: # }}">{{ content.name }}</a>
</td>
</tr>
<tr>
<td></td>
<td class="list-group-name"><b>{{ content.issuer }}</b></td>
<td class="list-group-name">{{ content.date }}</td>
</tr>
</tbody>
</table>
</div>
{% endfor %}
</div>
47 changes: 47 additions & 0 deletions _includes/resume/education.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<ul class="card-text font-weight-light list-group list-group-flush">
{% assign education = data[1] | sort: 'startDate' | reverse %}
{% for content in education %}
<li class="list-group-item">
<div class="row">
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
{% if content.startDate %}
{% assign startDate = content.startDate | split: "-" | slice: 0,2 | join: "." %}
{% assign endDate = content.endDate | split: "-" | slice: 0,2 | join: "." | default: "Present" %}
{% assign date = startDate | append: " - "%}
{% assign date = date | append: endDate %}
{% else %}
{% assign date = "" %}
{% endif %}
<table class="table-cv">
<tbody>
<tr>
<td>
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">{{date}}</span>
</td>
</tr>
{% if content.location %}
<tr>
<td>
<p class="location"><i class="fas fa-map-marker-alt iconlocation"></i> {{ content.location }}</p>
</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.studyType}}</a></h6>
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.institution}}</h6>
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.area}}</h6>
<ul class="items">
{% for item in content.courses %}
<li>
<span class="item">{{ item }}</span>
</li>
{% endfor %}
</ul>
</div>
</div>
</li>
{% endfor %}
</ul>
29 changes: 29 additions & 0 deletions _includes/resume/interests.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div class="list-groups">
{% for content in data[1] %}
<div class="list-group col-md-6">
<table class="table-cv list-group-table">
<tbody>
<tr>
{% if content.icon %}
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
{% else %}
<td class="list-group-category-icon"></td>
{% endif %}
<!-- Calculate colspan number for category title -->
{% assign i = 1 %}
{% for item in content.items %}
{% assign i = i | plus:1 %}
{% endfor %}
<td colspan="{{ i }}" class="list-group-category">{{ content.name }}</td>
</tr>
{% for item in content.keywords %}
<tr>
<td></td>
<td class="list-group-name"><b>{{ item }}</b></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</div>
27 changes: 27 additions & 0 deletions _includes/resume/languages.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="list-groups">
{% for content in data[1] %}
<div class="list-group col-md-6">
<table class="table-cv list-group-table">
<tbody>
<tr>
{% if content.icon %}
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
{% else %}
<td class="list-group-category-icon"></td>
{% endif %}
<!-- Calculate colspan number for category title -->
{% assign i = 1 %}
{% for item in content.items %}
{% assign i = i | plus:1 %}
{% endfor %}
<td colspan="{{ i }}" class="list-group-category">{{ content.language }}</td>
</tr>
<tr>
<td></td>
<td class="list-group-name"><b>{{ content.fluency }}</b></td>
</tr>
</tbody>
</table>
</div>
{% endfor %}
</div>
32 changes: 32 additions & 0 deletions _includes/resume/projects.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<ul class="card-text font-weight-light list-group list-group-flush">
{% for content in data[1] %}
<li class="list-group-item">
<div class="row">
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
{% if content.startDate %}
{% assign startDate = content.startDate | split: "-" | slice: 0,2 | join: "." %}
{% assign endDate = content.endDate | split: "-" | slice: 0,2 | join: "." | default: "Present" %}
{% assign date = startDate | append: " - "%}
{% assign date = date | append: endDate %}
{% else %}
{% assign date = "" %}
{% endif %}
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">
{{ date }}
</span>
</div>
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.name}}</a></h6>
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.summary}}</h6>
<ul class="items">
{% for item in content.highlights %}
<li>
<span class="item">{{ item }}</span>
</li>
{% endfor %}
</ul>
</div>
</div>
</li>
{% endfor %}
</ul>
30 changes: 30 additions & 0 deletions _includes/resume/publications.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<ul class="card-text font-weight-light list-group list-group-flush">
{% assign publications = data[1] | sort: 'releaseDate' | reverse %}
{% for content in publications %}
<li class="list-group-item">
<div class="row">
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
{% if content.releaseDate %}
{% assign date = content.releaseDate | split: "-" | join: "." %}
{% else %}
{% assign date = "" %}
{% endif %}
<table class="table-cv">
<tbody>
<tr>
<td>
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">{{date}}</span>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.name}}</a></h6>
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.publisher}}</h6>
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.summary}}</h6>
</div>
</div>
</li>
{% endfor %}
</ul>
27 changes: 27 additions & 0 deletions _includes/resume/references.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="list-groups">
{% for content in data[1] %}
<div class="list-group col-md-6">
<table class="table-cv list-group-table">
<tbody>
<tr>
{% if content.icon %}
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
{% else %}
<td class="list-group-category-icon"></td>
{% endif %}
<!-- Calculate colspan number for category title -->
{% assign i = 1 %}
{% for item in content.items %}
{% assign i = i | plus:1 %}
{% endfor %}
<td colspan="{{ i }}" class="list-group-category">{{ content.name }}</td>
</tr>
<tr>
<td></td>
<td class="list-group-name"><b>{{ content.reference }}</b></td>
</tr>
</tbody>
</table>
</div>
{% endfor %}
</div>
29 changes: 29 additions & 0 deletions _includes/resume/skills.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div class="list-groups">
{% for content in data[1] %}
<div class="list-group col-md-6" title="{{ content.level }}">
<table class="table-cv list-group-table">
<tbody>
<tr>
{% if content.icon %}
<td class="list-group-category-icon"><i class="{{ content.icon }}"></i></td>
{% else %}
<td class="list-group-category-icon"></td>
{% endif %}
<!-- Calculate colspan number for category title -->
{% assign i = 1 %}
{% for item in content.items %}
{% assign i = i | plus:1 %}
{% endfor %}
<td colspan="{{ i }}" class="list-group-category">{{ content.name }}</td>
</tr>
{% for item in content.keywords %}
<tr>
<td></td>
<td class="list-group-name"><b>{{ item }}</b></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</div>
34 changes: 34 additions & 0 deletions _includes/resume/volunteer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<ul class="card-text font-weight-light list-group list-group-flush">
{% assign volunteer = data[1] | sort: 'startDate' | reverse %}
{% for content in volunteer %}
<li class="list-group-item">
<div class="row">
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
{% if content.startDate %}
{% assign startDate = content.startDate | split: "-" | slice: 0,2 | join: "." %}
{% assign endDate = content.endDate | split: "-" | slice: 0,2 | join: "." | default: "Present" %}
{% assign date = startDate | append: " - "%}
{% assign date = date | append: endDate %}
{% else %}
{% assign date = "" %}
{% endif %}
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">
{{ date }}
</span>
</div>
<div class="col-xs-10 cl-sm-10 col-md-10 mt-2 mt-md-0">
<h6 class="title font-weight-bold ml-1 ml-md-4"><a href="{{ content.url }}">{{content.position}}</a></h6>
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem;">{{content.organization}}</h6>
<h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{content.summary}}</h6>
<ul class="items">
{% for item in content.highlights %}
<li>
<span class="item">{{ item }}</span>
</li>
{% endfor %}
</ul>
</div>
</div>
</li>
{% endfor %}
</ul>
Loading

0 comments on commit 8643988

Please sign in to comment.