Skip to content

Commit

Permalink
improve og:image resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed May 23, 2024
1 parent 35c6740 commit 67ba7ef
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
<meta property="og:description" content="{{ og_desc }}">

{%- if page.cover %}{% assign coverimage = page.cover %}
{%- elsif page.tags contains "cofest" %}{% assign coverimage = "/assets/images/cofest.png" %}
{%- elsif page.tags contains "galaxy" %}{% assign coverimage = "/assets/images/GalaxyNews.png" %}
{%- elsif page.tags contains "gat" %}{% assign coverimage = "/assets/images/gat.png" %}
{%- else %}{% assign coverimage = "/assets/images/GTNLogo1000.png" %}{% endif %}
{% assign og_image = page.og_image | default: page['cover-image'] | default: topic.og_image | default: coverimage | default: "/assets/images/GTNLogo1000.png" %}
<meta property="og:image" content="{{ og_image | prepend: site.baseurl }}">
{%- elsif page.tags contains "cofest" %}{% assign coverimage = "assets/images/cofest.png" %}
{%- elsif page.tags contains "galaxy" %}{% assign coverimage = "assets/images/GalaxyNews.png" %}
{%- elsif page.tags contains "gat" %}{% assign coverimage = "assets/images/gat.png" %}
{%- else %}{% assign coverimage = "assets/images/GTNLogo1000.png" %}{% endif %}
{% assign og_image = page.og_image | default: page['cover-image'] | default: topic.og_image | default: coverimage | default: "assets/images/GTNLogo1000.png" %}
<meta property="og:image" content="{% if og_image contains 'https://' %}{{ og_image }}{% else %}{{ site.baseurl }}/{{ og_image }}{% endif %}">

{%- if page.layout == "tutorial_hands_on" -%}
<script type="application/ld+json">
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/io1.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ title: Gallantries Grant - Intellectual Output 1 - Introduction to data analysis
description: |
This Learning Pathway collects the results of Intellectual Output 1 in the Gallantries Project
cover-image: ./shared/images/Gallantries_logo.png
cover-image: shared/images/Gallantries_logo.png
cover-image-alt: "Gallantries logo with the carpentries wrench in galaxy 2 stripes 1 strip colour scheme."

priority: 5
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/io2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ title: Gallantries Grant - Intellectual Output 2 - Large-scale data analysis, an
description: |
This Learning Pathway collects the results of Intellectual Output 2 in the Gallantries Project
cover-image: ./shared/images/Gallantries_logo.png
cover-image: shared/images/Gallantries_logo.png
cover-image-alt: "Gallantries logo with the carpentries wrench in galaxy 2 stripes 1 strip colour scheme."

priority: 5
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/io3.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ title: Gallantries Grant - Intellectual Output 3 - Data stewardship, federation,
description: |
This Learning Pathway collects the results of Intellectual Output 3 in the Gallantries Project
cover-image: ./shared/images/Gallantries_logo.png
cover-image: shared/images/Gallantries_logo.png
cover-image-alt: "Gallantries logo with the carpentries wrench in galaxy 2 stripes 1 strip colour scheme."

priority: 5
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/io4.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ title: Gallantries Grant - Intellectual Output 4 - Data analysis and modelling f
description: |
This Learning Pathway collects the results of Intellectual Output 4 in the Gallantries Project
cover-image: ./shared/images/Gallantries_logo.png
cover-image: shared/images/Gallantries_logo.png
cover-image-alt: "Gallantries logo with the carpentries wrench in galaxy 2 stripes 1 strip colour scheme."

priority: 5
Expand Down
2 changes: 1 addition & 1 deletion learning-pathways/io5.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ title: Gallantries Grant - Intellectual Output 5 - Train-the-Trainer and mentori
description: |
This Learning Pathway collects the results of Intellectual Output 5 in the Gallantries Project
cover-image: ./shared/images/Gallantries_logo.png
cover-image: shared/images/Gallantries_logo.png
cover-image-alt: "Gallantries logo with the carpentries wrench in galaxy 2 stripes 1 strip colour scheme."

priority: 5
Expand Down
2 changes: 1 addition & 1 deletion news/_posts/2024-05-22-introducing-gtn-event-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contributions:
- shiltemann
- hexylena
cover: news/images/gtn-event-screenshot.png
cover_alt: A screenshot of a GTN event page showing the program tab. It looks very similar to GTN topic pages.
coveralt: A screenshot of a GTN event page showing the program tab. It looks very similar to GTN topic pages.
---

Are you organizing a training event using GTN materials? You can now add your event directly to the GTN!
Expand Down

0 comments on commit 67ba7ef

Please sign in to comment.