Skip to content

Commit

Permalink
front-matter corresponding author support
Browse files Browse the repository at this point in the history
merges #470
closes #469

Co-authored-by: Daniel Himmelstein <[email protected]>
  • Loading branch information
cgreene and dhimmel authored Jul 9, 2022
1 parent 9a22fab commit 9504aa7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ initials: DSH # optional
orcid: 0000-0002-3012-7446 # mandatory
twitter: dhimmel # optional
email: [email protected] # suggested
corresponding: true # optional, if set to true displays author's email for correspondence
affiliations: # as a list, strongly suggested
- Department of Systems Pharmacology and Translational Therapeutics, University of Pennsylvania
- Department of Biological & Medical Informatics, University of California, San Francisco
Expand Down
14 changes: 13 additions & 1 deletion content/00.front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ on {{manubot.date}}.

{## Template for listing authors ##}
{% for author in manubot.authors %}
+ **{{author.name}}**<br>
+ **{{author.name}}**
{% if author.corresponding is defined and author.corresponding == true -%}^[](#correspondence)^{%- endif -%}
<br>
{%- if author.orcid is defined and author.orcid is not none %}
![ORCID icon](images/orcid.svg){.inline_icon width=16 height=16}
[{{author.orcid}}](https://orcid.org/{{author.orcid}})
Expand All @@ -49,3 +51,13 @@ on {{manubot.date}}.
{%- endif %}
</small>
{% endfor %}

::: {#correspondence}
✉ — Correspondence possible via {% if manubot.ci_source is defined -%}[GitHub Issues](https://github.com/{{manubot.ci_source.repo_slug}}/issues){% else %}GitHub Issues{% endif %}
{% if manubot.authors|map(attribute='corresponding')|select|max -%}
or email to
{% for author in manubot.authors|selectattr("corresponding") -%}
{{ author.name }} \<{{ author.email }}\>{{ ", " if not loop.last else "." }}
{% endfor %}
{% endif %}
:::
1 change: 1 addition & 0 deletions content/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ authors:
affiliations:
- Department of Something, University of Whatever
- Department of Whatever, University of Something
corresponding: true

0 comments on commit 9504aa7

Please sign in to comment.