Skip to content

Commit 35f4c65

Browse files
committed
Merge branch 'master' into dev
2 parents 6fda5af + ad39d02 commit 35f4c65

File tree

7 files changed

+47
-2
lines changed

7 files changed

+47
-2
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,20 @@ Just use the liquid tags `{% highlight python %}` and `{% endhighlight %}` to de
9898
</a>
9999
</p>
100100

101+
#### Social media previews
102+
The al-folio theme optionally supports preview images on social media.
103+
To enable this functionality you will need to set `serve_og_meta` to `true` in
104+
your `_config.yml`. Once you have done so, all your site's pages will include
105+
Open Graph data in the HTML head element.
106+
107+
You will then need to configure what image to display in your site's social
108+
media previews. This can be configured on a per-page basis, by setting the
109+
`og_image` page variable. If for an individual page this variable is not set,
110+
then the theme will fall back to a site-wide `og_image` variable, configurable
111+
in your `_config.yml`. In both the page-specific and site-wide cases, the
112+
`og_image` variable needs to hold the URL for the image you wish to display in
113+
social media previews.
114+
101115
## Contributing
102116

103117
Feel free to contribute new features and theme improvements by sending a pull request.

_bibliography/papers.bib

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ @article{PhysRev.47.777
3434
month={May},
3535
publisher=aps,
3636
doi={10.1103/PhysRev.47.777},
37-
url={http://link.aps.org/doi/10.1103/PhysRev.47.777}
37+
url={http://link.aps.org/doi/10.1103/PhysRev.47.777},
38+
html={https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777},
39+
pdf={example_pdf.pdf}
3840
}
3941

4042
@article{einstein1905molekularkinetischen,

_config.yml

+14
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ navbar_fixed: true
2323
footer_fixed: true
2424
# TODO: add layout settings (single page vs. multi-page)
2525

26+
# -----------------------------------------------------------------------------
27+
# Open Graph
28+
# -----------------------------------------------------------------------------
29+
# Display links to the page with a preview object on social media.
30+
# To achieve this, change serve_og_meta to true and then provide the URL of the
31+
# preview image as the value of og_image.
32+
serve_og_meta: false # Include Open Graph meta tags in the HTML head
33+
og_image: # The site-wide (default for all links) Open Graph preview image
2634
# -----------------------------------------------------------------------------
2735
# Social integration
2836
# -----------------------------------------------------------------------------
@@ -32,6 +40,12 @@ twitter_username: # your Twitter handle
3240
linkedin_username: # your LinkedIn user name
3341
scholar_userid: # your Google Scholar ID
3442
orcid_id: # your ORCID ID
43+
medium_username: # your Medium username
44+
quora_username: # your Quora username
45+
publons_id: # your ID on Publons
46+
research_gate_profile: # your profile on ResearchGate
47+
blogger_url: # your blogger URL
48+
3549
contact_note: >
3650
You can even add a little note about which of these is the best way to reach you.
3751

_includes/head.html

+10
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@
1919
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
2020

2121
<link rel="canonical" href="{{ page.url | replace:'index.html','' | relative_url }}">
22+
23+
<!-- Open Graph -->
24+
{% if site.serve_og_meta %}
25+
<meta property="og:site_name" content="{{ site.description }}" />
26+
<meta property="og:type" content="object" />
27+
<meta property="og:title" content="{{ site.name }}" />
28+
<meta property="og:url" content="{{ page.url | prepend: site.baseurl | prepend: site.url }}" />
29+
<meta property="og:description" content="{{ page.title }}" />
30+
<meta property="og:image" content="{%- if page.og_image -%}{{ page.og_image }}{%- else -%}{{ site.og_image }}{%- endif -%}" />
31+
{% endif %}

_includes/social.html

+5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
<a href="mailto:{{ site.email | encode_email }}"><i class="fas fa-envelope"></i></a>
33
{% if site.orcid_id %}<a href="https://orcid.org/{{ site.orcid_id }}" target="_blank" title="ORCID"><i class="ai ai-orcid"></i></a>{% endif %}
44
{% if site.scholar_userid %}<a href="https://scholar.google.com/citations?user={{ site.scholar_userid }}" target="_blank" title="Google Scholar"><i class="ai ai-google-scholar"></i></a>{% endif %}
5+
{% if site.publons_id %}<a href="https://publons.com/a/{{ site.publons_id }}/" target="_blank" title="Publons"><i class="ai ai-publons"></i></a>{% endif %}
6+
{% if site.research_gate_profile %}<a href="https://www.researchgate.net/profile/{{site.research_gate_profile}}/" target="_blank" title="ResearchGate"><i class="ai ai-researchgate"></i></a>{% endif %}
57
{% if site.github_username %}<a href="https://github.com/{{ site.github_username }}" target="_blank" title="GitHub"><i class="fab fa-github"></i></a>{% endif %}
68
{% if site.linkedin_username %}<a href="https://www.linkedin.com/in/{{ site.linkedin_username }}" target="_blank" title="LinkedIn"><i class="fab fa-linkedin"></i></a>{% endif %}
79
{% if site.twitter_username %}<a href="https://twitter.com/{{ site.twitter_username }}" target="_blank" title="Twitter"><i class="fab fa-twitter"></i></a>{% endif %}
10+
{% if site.medium_username %}<a href="https://medium.com/@{{ site.medium_username }}" target="_blank" title="Medium"><i class="fab fa-medium"></i></a>{% endif %}
11+
{% if site.quora_username %}<a href="https://www.quora.com/profile/{{ site.quora_username }}" target="_blank" title="Quora"><i class="fab fa-quora"></i></a>{% endif %}
12+
{% if site.blogger_url %}<a href="{{ site.blogger_url }}" target="_blank" title="Blogger"><i class="fab fa-blogger-b"></i></a>{% endif %}
813
{% if site.strava_userid %}<a href="https://www.strava.com/athletes/{{ site.strava_userid }}" target="_blank" title="Strava"><i class="fab fa-strava"></i></a>{% endif %}
914
</span>

_sass/_base.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Styles for the base elements of the theme.
33
******************************************************************************/
44

5-
// Typography
5+
// Typography
66

77
a, table.table a {
88
color: $theme-color;

assets/pdf/example_pdf.pdf

15.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)