Skip to content

Commit bea7d85

Browse files
committed
Added support for people in _data folder
1 parent dbff8c7 commit bea7d85

File tree

3 files changed

+74
-5
lines changed

3 files changed

+74
-5
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ It's all free, so if you're in the area please come along!
99
# To add yourself to the people page
1010

1111
* Create a branch
12-
* Make a copy of one of the existing bios in *pages-people*
13-
* Name it using the convention people-*yourname*
12+
* Make a copy of one of the existing bios in *_data/people/*
13+
* Name it using the convention *yourname*
1414
* Modify to be your bio including
1515
* Photograph
1616
* Information paragraph
@@ -19,9 +19,6 @@ It's all free, so if you're in the area please come along!
1919

2020
If you need any help, contact one of the pople who have already added themselves.
2121

22-
Copy the includes code `<br />
23-
{% include_relative pages-people/people-yourname.html %}` to the bottom of people.html (ensure you update the file name)
24-
2522
# Sitemap
2623
All pages not defined as a default in _config.yml are added to the sitemap
2724

_includes/person.html

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<a name="{{ include.person.anchor }}"></a>
2+
<div class="row person-blurb">
3+
<div class="col-md-4 col-lg-5 col-xl-3">
4+
<div class="mb-2 box-shadow text-center">
5+
<img class="profile-photo" src="./images/{{ include.person.photo | default: 'keyboard-green.png' }}" />
6+
</div>
7+
<div class="col-12 text-center">
8+
<h4>{{ include.person.first_name }} {{ include.person.last_name }}</h4>
9+
</div>
10+
</div>
11+
<div class="col-md-8 col-lg-6">
12+
<div class="row">
13+
<div class="col col-md-6">
14+
<p class="text-muted no-margin">{{ include.person.roles }}</p>
15+
</div>
16+
{% if include.person.twitter_handle %}
17+
<div class="col-md-6 twitter-mention-container text-right">
18+
<a href="https://twitter.com/intent/tweet?screen_name={{include.person.twitter_handle}}" class="twitter-mention-button"
19+
data-show-count="false">
20+
Tweet to @{{ include.person.twitter_handle }}
21+
</a>
22+
</div>
23+
{% endif %}
24+
</div>
25+
<div class="row">
26+
<div class="col-md-12">
27+
{% for paragraph in include.person.description_paragraphs %}
28+
<p>
29+
{{ paragraph }}
30+
</p>
31+
{% endfor %}
32+
</div>
33+
</div>
34+
</div>
35+
<div class="col-lg-12 col-xl-3 skills">
36+
<div class="row">
37+
<div class="col-12">
38+
<h5>{{ include.person.first_name }} can help with...</h5>
39+
</div>
40+
<div class="col-md-4 col-lg-12">
41+
<!-- <h6>Languages</h6> -->
42+
<p>
43+
{% for language in include.person.languages %}
44+
<span class="badge badge-secondary">{{ language }}</span>
45+
{% endfor %}
46+
</p>
47+
</div>
48+
<div class="col-md-4 col-lg-12">
49+
<!-- <h6>Technologies</h6> -->
50+
<p>
51+
{% for technology in include.person.technologies %}
52+
<span class="badge badge-secondary">{{ technology }}</span>
53+
{% endfor %}
54+
</p>
55+
</div>
56+
<div class="col-md-4 col-lg-12">
57+
<!-- <h6>Tools</h6> -->
58+
<p>
59+
{% for tool in include.person.tools %}
60+
<span class="badge badge-secondary">{{ tool }}</span>
61+
{% endfor %}
62+
</p>
63+
</div>
64+
</div>
65+
</div>
66+
</div>

people.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ <h1>{{page.title}}</h1>
99
{% include_relative pages-people/people-drew.html %}
1010
<br />
1111
{% include_relative pages-people/people-keiran.html %}
12+
13+
{% for person_hash in site.data.people %}
14+
{% assign person = person_hash[1] %}
15+
<br />
16+
{% include_relative _includes/person.html person=person %}
17+
{% endfor %}

0 commit comments

Comments
 (0)