Skip to content

Commit 468c379

Browse files
authored
Merge pull request #77 from ipums/duckdb-for-2020dhc
mult author support
2 parents c464c9f + b647acb commit 468c379

File tree

3 files changed

+40
-16
lines changed

3 files changed

+40
-16
lines changed

_includes/_meta_information.html

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
<div id="page-meta" class="t30">
22
<p>
3-
<!-- Look the author details up from the site config. -->
3+
<!-- Output author details if some exist. -->
4+
{% if page.authors %}
5+
Authored by
6+
{% for name in page.authors %}
7+
{% assign author = site.data.authors[name] %}
8+
{% if forloop.first %}
9+
<span itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name" class="icon-edit"><a href="{{ author.uri }}" target="_blank"> {{ author.name }}</a></span>
10+
{% elsif forloop.last %}
11+
and <span itemprop="name" class="pr20 icon-edit"><a href="{{ author.uri }}" target="_blank"> {{ author.name }}</a></span></span>
12+
{% else %}
13+
, <span itemprop="name" class="icon-edit"><a href="{{ author.uri }}" target="_blank"> {{ author.name }}</a></span>
14+
{% endif %}
15+
{% endfor %}
16+
{% elsif page.author %}
417
{% assign author = site.data.authors[page.author] %}
5-
<!-- Output author details if some exist. -->
6-
{% if author %}
7-
<span itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name" class="pr20 icon-edit"><a href="{{ author.uri }}" target="_blank"> {{ author.name }}</a></span>
8-
</span>
18+
<span itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name" class="pr20 icon-edit">Authored by <a href="{{ author.uri }}" target="_blank"> {{ author.name }}</a></span></span>
919
{% endif %}
10-
20+
<br />
1121
{% if page.date %}
1222
<time class="icon-calendar pr20" datetime="{{ page.date | date: "%Y-%m-%d" }}" itemprop="datePublished"> {{ page.date | date: "%Y-%m-%d" }}</time>
1323
{% endif %}

_layouts/isrdi-frontpage.html

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,26 @@
2525
<p class="subheadline"><span class="subheader">{{ post.categories | join: ' &middot; ' }}</span>{% if post.subheadline %}{{ post.subheadline }}{% endif %}</p>
2626
{% endunless %}
2727
<h3><a href="{{ site.url }}{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h3>
28-
{% if post.author %}
29-
<p>
30-
{% assign author = site.data.authors[post.author] %}
31-
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
32-
<span itemprop="name" class="pr20">by <a href="{{ author.url }}" target="_blank">{{ author.name }}</a> &middot; {{ post.date | date: "%B %-d, %Y"}}</span>
33-
</span>
34-
</p>
35-
{% endif %}
28+
{% if post.authors %}
29+
<p>
30+
{% for name in post.authors %}
31+
{% assign author = site.data.authors[name] %}
32+
{% if forloop.first %}
33+
by <span itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name"><a href="{{ author.url }}" target="_blank">{{ author.name }}</a></span>
34+
{% elsif forloop.last %}
35+
and <span itemprop="name" class="pr20"><a href="{{ author.url }}" target="_blank"> {{ author.name }}</a> &middot; {{ post.date | date: "%B %-d, %Y"}}</span></span>
36+
{% else %}
37+
, <span itemprop="name"><a href="{{ author.url }}" target="_blank"> {{ author.name }}</a></span>
38+
{% endif %}
39+
{% endfor %}
40+
</p>
41+
{% elsif post.author %}
42+
<p>
43+
{% assign author = site.data.authors[post.author] %}
44+
<span itemprop="author" itemscope itemtype="https://schema.org/Person"><span itemprop="name" class="pr20">by <a href="{{ author.url }}" target="_blank"> {{ author.name }}</a> &middot; {{ post.date | date: "%B %-d, %Y"}}</span></span>
45+
</p>
46+
{% endif %}
47+
3648
<p>
3749
{% if post.meta_description %}{{ post.meta_description | strip_html | escape }}{% else post.teaser %}{{ post.teaser | strip_html | escape }}{% endif %}<br />
3850
<a href="{{ site.url }}{{ site.baseurl }}{{ post.url }}" title="Read {{ post.title | escape_once }}"><strong>{{ site.data.language.read_more }}</strong></a>

_posts/2023/2023-11-27-DuckDB-and-the-2020-Census.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
2-
author: kevin
3-
author: fran
2+
authors:
3+
- ccd
4+
- fran
5+
- kevin
46
author: ccd
57
title: Ingesting the 2020 U.S. Census with DuckDB
68
teaser: DuckDB made it possible for us to reshape the U.S. Census with pure SQL and a sprinkling of classic UNIX utilities.

0 commit comments

Comments
 (0)