Skip to content

Instantly share code, notes, and snippets.

@inetbiz
Created August 13, 2019 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inetbiz/4f6b24492a37ca0aceddd826b14f875e to your computer and use it in GitHub Desktop.
Save inetbiz/4f6b24492a37ca0aceddd826b14f875e to your computer and use it in GitHub Desktop.
Jekyll AUthor Social Profiles via nested data yaml
attorney2:
birth_country: "United States of America"
birth_city: "Paso Robles"
birth_region: CA
birth_zip: 93446
education: "Southeastern University: B.A. History – 2008, University of Florida Levin College of Law: Juris Doctor – 2011"
first_name: attorney
last_name: One
honorary: Esq
nationality: "United States of America"
name: Attorney Two
email: email@example.com
home_country: "United States of America"
home_city: "Ocala"
home_region: "FL"
home_zip: "34482"
gender: Female
permalink: "/lawyers/attorney2.html"
ext: "03"
social:
- title:twitter
- url: https://twitter.com/@DenverProphitJr
- title:facebook
- url: https://www.facebook.com/dpcgco/
web: "Lawyer 1 is a past member of the Hillsborough County Bar Association and Young Lawyers Division, the Lakeland Bar Association, and Emerge. Jon was also served on the Board of Directors for Tri-County Human services, which serves Polk, Hardee, and Highlands counties.
Lawyer 1 is currently a member of the Jacksonville Bar Association."
{% comment %}
#
# This is a nested liquid loop for Jekyll to iterate through Laywer YAML data with
# a depth of three levels.
{% endcomment %}
<!-- Footer -->
<footer id="footer">
{% for entry in site.data.attorney %}
{% for social in entry.social %}
{% if forloop.first %}<ul class="icons">{% endif %}
<li><a href="{{ social.url class="icon circle fa-{{social.title}}"><span class="label">{{ social.title }}</span></a></li>
{% if forloop.last %}</ul>{% endif %}
{% endfor %}
{% endfor %}
</footer>
@inetbiz
Copy link
Author

inetbiz commented Aug 13, 2019

I have two entries for attorney. The included I pasted at the bottom of this text gist.

@inetbiz
Copy link
Author

inetbiz commented Aug 13, 2019

I'm getting this error for new data entries:
jekyll 3.8.6 | Error: (/home/strike6/repositories/legal/_data/attorney.yml): mapping values are not allowed in this context at line 23 column 9

@Phlow
Copy link

Phlow commented Aug 19, 2019

I have no clue at the moment. Best way: Ask in the Jekyll forum :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment