Skip to content

Commit a240a57

Browse files
author
Hugues Tennier
authored
Merge pull request #373 from jamstack/ht/last-improvements-before-launch
Add new OG image
2 parents cb269ec + 16bf772 commit a240a57

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

src/css/tailwind.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ footer p a:focus {
199199
}
200200
.list-jams-logo-pink > li:after {
201201
background-image: url("data:image/svg+xml,%3Csvg width='8' viewBox='0 0 12 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 0C2.68226 0 0 2.90578 0 6.5C0 10.0942 2.68226 13 6 13C9.31774 13 12 10.0942 12 6.5V0H6Z' fill='%23F0047F'/%3E%3C/svg%3E%0A");
202-
left: 1em;
202+
left: 1.5em;
203203
}
204204
.list-jams-logo-border > li:before {
205205
@apply text-gray-400;

src/site/_data/netlify.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const PROD_URL = "https://www.jamstack.org";
2+
3+
module.exports = {
4+
/*
5+
See also Netlify ENV variables:
6+
process.env.CONTEXT === "production" ||
7+
process.env.CONTEXT === "deploy-preview" ||
8+
process.env.CONTEXT === "branch-deploy"
9+
10+
via https://docs.netlify.com/configure-builds/environment-variables/
11+
12+
*/
13+
deployUrl: process.env.CONTEXT === "production" ? PROD_URL : process.env.DEPLOY_PRIME_URL
14+
};

src/site/_includes/layouts/base.njk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: Jamstack | JavaScript, APIs, and Markup
33
description: What is the Jamstack? Why use the Jamstack? How do I get started? Learn what the Jamstack is all about and why it's the best approach for building faster, more secure websites.
4+
ogimage: "/img/og/default-og-image.png"
45
---
6+
57
<!doctype html>
68
<html lang="en">
79
<head>
@@ -18,12 +20,12 @@ description: What is the Jamstack? Why use the Jamstack? How do I get started? L
1820
<meta property="og:url" content="https://jamstack.org/">
1921
<meta property="og:description" content="{{ description }}">
2022
<meta property="og:type" content="website">
21-
<meta property="og:image" content="">
23+
<meta property="og:image" content="{{ netlify.deployUrl }}{{ ogimage }}">
2224
<meta property="twitter:card" content="summary_large_image">
2325
<meta property="twitter:url" content="https://jamstack.org/">
2426
<meta property="twitter:title" content="{{ title }} | Jamstack">
2527
<meta property="twitter:description" content="{{ description }}">
26-
<meta property="twitter:image" content="">
28+
<meta property="twitter:image" content="{{ netlify.deployUrl }}{{ ogimage }}">
2729
</head>
2830
<body class="bg-blue-900 text-blue-100 leading-relaxed antialiased">
2931
<svg width="0" height="0" aria-hidden="true" style="position: absolute;">

src/site/_includes/navigation-links.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% for link in linkList %}
33
<li>
44
<a href="{{ link.url }}"
5-
class="block font-bold text-sm text-white hover:underline py-2 px-8 {% if page.url.split("/")[1] == link.url.split("/")[1] %} bg-gray-900{% endif %}">
5+
class="block font-bold text-sm text-white hover:underline py-2 px-10 {% if page.url.split("/")[1] == link.url.split("/")[1] %} bg-gray-900{% endif %}">
66
{{ link.text }}
77
</a>
88
</li>
172 KB
Loading

0 commit comments

Comments
 (0)