Skip to content

Commit 6d191c8

Browse files
devniedminimaluminiumrenovate[bot]JohnONolansanne-san
authored
Backport Casper 5.9.0 (#18)
* Improved Safari Reader support * Fixed bookmark card background color issue * v5.7.3 * Fixed bookmark card text color * v5.7.4 * Update dependency gscan to v4.43.1 * Fixed incorrect text color issue in dark mode * v5.7.5 * Improved multi-author support * Added custom fonts support (TryGhost#986) ref DES-968 * Rebuilt assets * v5.8.0 * Updated date formatting ref DES-937 - updated the format to DD MMM YYYY which is the preferred format in Ghost * v5.8.1 * 2025 Co-authored-by: Hannah Wolfe github.erisds@gmail.com * Added support for additional social links (TryGhost#991) ref https://linear.app/ghost/issue/PLG-413/add-helpers-to-official-themes * Added support for all of the new social links in Ghost * Added icon classes to social icons so that we can display an icon for each link * Switched to using the new social_url helper for all social links as it is cleaner * Replaced Twitter with X logo so it's up to date * Update dependency gscan to v4.48.0 (TryGhost#980) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Updated `caniuse-lite` browser list (#22907) (TryGhost#992) - Running the yarn test command was logging a bunch of warnings because our browser list hadn't been updated in 6 months ``` Browserslist: browsers data (caniuse-lite) is 6 months old. Please run: npx update-browserslist-db@latest Why you should do it regularly: https://github.com/browserslist/update-db#readme ``` - This commit fixes the warnings by updating the browsers list by running `npx update-browserslist-db@latest` in the root of the repo, and committing the result. * Revert "Updated `caniuse-lite` browser list (#22907) (TryGhost#992)" - This reverts commit e151531. - This change results in further changes when running gulp build that will need verifying separately * v5.9.0 * Rename theme from Casper to Michelin and update demo URL * Update GitHub Actions to use latest versions of checkout, setup-node, and cache actions --------- Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: John O'Nolan <john@onolan.org> Co-authored-by: Sanne de Vries <65487235+sanne-san@users.noreply.github.com> Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
1 parent aee37bc commit 6d191c8

19 files changed

Lines changed: 1422 additions & 870 deletions

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

1616
- name: Setup Node.js environment
17-
uses: actions/setup-node@v3
17+
uses: actions/setup-node@v4
1818
with:
19-
node-version: "16.x"
19+
node-version: "22.x"
2020

2121
- name: Get yarn cache directory path
2222
id: yarn-cache-dir-path
2323
run: echo "::set-output name=dir::$(yarn cache dir)"
2424

2525
- name: Cache yarn cache
26-
uses: actions/cache@v2
26+
uses: actions/cache@v4
2727
id: cache-yarn-cache
2828
with:
2929
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -33,7 +33,7 @@ jobs:
3333
3434
- name: Cache node_modules
3535
id: cache-node-modules
36-
uses: actions/cache@v2
36+
uses: actions/cache@v4
3737
with:
3838
path: node_modules
3939
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414

1515
- name: Setup Node.js environment
16-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4
1717
with:
18-
node-version: "16.x"
18+
node-version: "22.x"
1919

2020
- name: Get yarn cache directory path
2121
id: yarn-cache-dir-path
2222
run: echo "::set-output name=dir::$(yarn cache dir)"
2323

2424
- name: Cache yarn cache
25-
uses: actions/cache@v3
25+
uses: actions/cache@v4
2626
id: cache-yarn-cache
2727
with:
2828
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -32,7 +32,7 @@ jobs:
3232
3333
- name: Cache node_modules
3434
id: cache-node-modules
35-
uses: actions/cache@v3
35+
uses: actions/cache@v4
3636
with:
3737
path: node_modules
3838
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2013-2023 Ghost Foundation
1+
Copyright (c) 2013-2025 Ghost Foundation
22

33
Permission is hereby granted, free of charge, to any person
44
obtaining a copy of this software and associated documentation

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ You can add your own SVG icons in the same manner.
6666

6767
# Copyright & License
6868

69-
Copyright (c) 2013-2023 Ghost Foundation - Released under the [MIT license](LICENSE).
69+
Copyright (c) 2013-2025 Ghost Foundation - Released under the [MIT license](LICENSE).

assets/css/global.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ html {
272272
}
273273
body {
274274
color: var(--color-darkgrey);
275-
font-family: var(--font-sans);
275+
font-family: var(--gh-font-body, var(--font-sans));
276276
font-size: 1.6rem;
277277
line-height: 1.6em;
278278
font-weight: 400;
@@ -407,6 +407,7 @@ h5,
407407
h6 {
408408
margin-top: 0;
409409
line-height: 1.15;
410+
font-family: var(--gh-font-heading, var(--font-sans));
410411
font-weight: 600;
411412
text-rendering: optimizeLegibility;
412413
letter-spacing: -0.01em;

assets/css/screen.css

Lines changed: 57 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ production stylesheet in assets/built/screen.css
168168
font-weight: 800;
169169
}
170170

171-
.has-serif-title .site-title {
172-
font-family: var(--font-serif);
171+
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .site-title {
172+
font-family: var(--gh-font-heading, var(--font-serif));
173173
}
174174

175175
.has-cover .site-title {
@@ -193,6 +193,14 @@ production stylesheet in assets/built/screen.css
193193
line-height: 1.1;
194194
}
195195

196+
.site-description:first-child {
197+
font-family: var(--gh-font-heading, var(--font-sans));
198+
}
199+
200+
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .site-description:first-child {
201+
font-family: var(--gh-font-heading, var(--font-serif));
202+
}
203+
196204
:is(.site-logo, .site-title) + .site-description {
197205
max-width: 640px;
198206
margin-top: 16px;
@@ -406,6 +414,7 @@ production stylesheet in assets/built/screen.css
406414

407415
.gh-head-logo {
408416
display: block;
417+
font-family: var(--gh-font-heading, var(--font-sans));
409418
font-weight: 800;
410419
font-size: 2.6rem;
411420
letter-spacing: -0.02em;
@@ -986,8 +995,8 @@ production stylesheet in assets/built/screen.css
986995
margin-top: 0;
987996
}
988997

989-
.has-serif-title .post-card-title {
990-
font-family: var(--font-serif);
998+
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .post-card-title {
999+
font-family: var(--gh-font-heading, var(--font-serif));
9911000
letter-spacing: -0.005em;
9921001
}
9931002

@@ -1014,8 +1023,8 @@ production stylesheet in assets/built/screen.css
10141023
word-break: break-word;
10151024
}
10161025

1017-
.has-sans-body .post-card-excerpt {
1018-
font-family: var(--font-sans);
1026+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .post-card-excerpt {
1027+
font-family: var(--gh-font-body, var(--font-sans));
10191028
}
10201029

10211030
.post-card:not(.post-card-large):not(.post-card-full):not(.dynamic):not(.no-image) .post-card-excerpt {
@@ -1071,7 +1080,6 @@ production stylesheet in assets/built/screen.css
10711080

10721081
.author-list {
10731082
display: flex;
1074-
flex-wrap: wrap;
10751083
margin: 0 0 0 4px;
10761084
padding: 0;
10771085
list-style: none;
@@ -1251,8 +1259,8 @@ html.no-infinite-scroll .pagination {
12511259
color: var(--color-darkgrey);
12521260
}
12531261

1254-
.has-serif-title .article-title {
1255-
font-family: var(--font-serif);
1262+
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .article-title {
1263+
font-family: var(--gh-font-heading, var(--font-serif));
12561264
}
12571265

12581266
.article-excerpt {
@@ -1358,8 +1366,8 @@ headings, text, images and lists. We deal with cards lower down. */
13581366
color: var(--color-darkgrey);
13591367
}
13601368

1361-
.has-serif-title .gh-content > [id] {
1362-
font-family: var(--font-serif);
1369+
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .gh-content > [id] {
1370+
font-family: var(--gh-font-heading, var(--font-serif));
13631371
}
13641372

13651373
/* Add back a top margin to all headings, unless a heading
@@ -1396,7 +1404,7 @@ is the very first element in the post content */
13961404
.gh-content > ul,
13971405
.gh-content > dl,
13981406
.gh-content > p {
1399-
font-family: var(--font-serif);
1407+
font-family: var(--gh-font-body, var(--font-serif));
14001408
font-weight: 400;
14011409
font-size: 2rem;
14021410
line-height: 1.6em;
@@ -1440,16 +1448,16 @@ is the very first element in the post content */
14401448
font-size: 2.0rem;
14411449
}
14421450

1443-
.has-sans-body .gh-content > blockquote,
1444-
.has-sans-body .gh-content > ol,
1445-
.has-sans-body .gh-content > ul,
1446-
.has-sans-body .gh-content > dl,
1447-
.has-sans-body .gh-content > p,
1448-
.has-sans-body .gh-content .kg-callout-card .kg-callout-text,
1449-
.has-sans-body .gh-content .kg-toggle-card .kg-toggle-content > ol,
1450-
.has-sans-body .gh-content .kg-toggle-card .kg-toggle-content > ul,
1451-
.has-sans-body .gh-content .kg-toggle-card .kg-toggle-content > p {
1452-
font-family: var(--font-sans);
1451+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content > blockquote,
1452+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content > ol,
1453+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content > ul,
1454+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content > dl,
1455+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content > p,
1456+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content .kg-callout-card .kg-callout-text,
1457+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content .kg-toggle-card .kg-toggle-content > ol,
1458+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content .kg-toggle-card .kg-toggle-content > ul,
1459+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content .kg-toggle-card .kg-toggle-content > p {
1460+
font-family: var(--gh-font-body, var(--font-sans));
14531461
}
14541462

14551463
.gh-content > ul,
@@ -1569,8 +1577,8 @@ except for when immediately preceeded by a heading */
15691577
cursor: pointer;
15701578
}
15711579

1572-
.has-serif-title .kg-toggle-card .kg-toggle-heading-text {
1573-
font-family: var(--font-serif);
1580+
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .kg-toggle-card .kg-toggle-heading-text {
1581+
font-family: var(--gh-font-heading, var(--font-serif));
15741582
}
15751583

15761584
.gh-content .kg-callout-card-accent a {
@@ -1582,8 +1590,8 @@ except for when immediately preceeded by a heading */
15821590
color: var(--color-midgrey);
15831591
}
15841592

1585-
.has-sans-body .kg-blockquote-alt {
1586-
font-family: var(--font-sans);
1593+
.has-sans-body:not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .kg-blockquote-alt {
1594+
font-family: var(--gh-font-body, var(--font-sans));
15871595
}
15881596

15891597
.kg-card.kg-header-card.kg-style-dark {
@@ -1594,8 +1602,8 @@ except for when immediately preceeded by a heading */
15941602
color: color-mod(var(--color-darkgrey) l(-5%));
15951603
}
15961604

1597-
.has-serif-title .kg-header-card h2.kg-header-card-header {
1598-
font-family: var(--font-serif);
1605+
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .kg-header-card h2.kg-header-card-header {
1606+
font-family: var(--gh-font-heading, var(--font-serif));
15991607
}
16001608

16011609

@@ -1775,6 +1783,12 @@ iframe.instagram-media + script + :not([id]) {
17751783
}
17761784

17771785
@media (max-width: 767px) {
1786+
.article-byline-content {
1787+
flex-direction: column;
1788+
align-items: flex-start;
1789+
gap: 16px;
1790+
}
1791+
17781792
.article-byline-content .author-list {
17791793
padding-right: 12px;
17801794
}
@@ -1798,8 +1812,8 @@ iframe.instagram-media + script + :not([id]) {
17981812
font-weight: 800;
17991813
}
18001814

1801-
.has-serif-title .footer-cta-title {
1802-
font-family: var(--font-serif);
1815+
.has-serif-title:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]) .footer-cta-title {
1816+
font-family: var(--gh-font-heading, var(--font-serif));
18031817
}
18041818

18051819
.footer-cta-button {
@@ -1934,7 +1948,7 @@ iframe.instagram-media + script + :not([id]) {
19341948

19351949
.author-profile-meta {
19361950
display: flex;
1937-
gap: 10px;
1951+
gap: 12px;
19381952
}
19391953

19401954
.author-profile-social-link {
@@ -2257,14 +2271,6 @@ html.dark-mode .gh-content :not(pre) > code {
22572271
color: #fff;
22582272
}
22592273

2260-
html.dark-mode .gh-content strong {
2261-
color: #fff;
2262-
}
2263-
2264-
html.dark-mode .gh-content em {
2265-
color: #fff;
2266-
}
2267-
22682274
html.dark-mode .gh-content code {
22692275
color: #fff;
22702276
background: #000;
@@ -2323,6 +2329,12 @@ html.dark-mode .kg-header-card h3.kg-header-card-subheader {
23232329
color: #fff;
23242330
}
23252331

2332+
html.dark-mode .kg-bookmark-card a.kg-bookmark-container,
2333+
html.dark-mode .kg-bookmark-card a.kg-bookmark-container:hover {
2334+
background: var(--color-darkmode) !important;
2335+
color: #fff !important;
2336+
}
2337+
23262338
html.dark-mode .footer-cta-title {
23272339
color: #fff;
23282340
}
@@ -2453,14 +2465,6 @@ html.dark-mode .footer-cta-title {
24532465
color: #fff;
24542466
}
24552467

2456-
html.auto-color .gh-content strong {
2457-
color: #fff;
2458-
}
2459-
2460-
html.auto-color .gh-content em {
2461-
color: #fff;
2462-
}
2463-
24642468
html.auto-color .gh-content code {
24652469
color: #fff;
24662470
background: #000;
@@ -2519,6 +2523,12 @@ html.dark-mode .footer-cta-title {
25192523
color: #fff;
25202524
}
25212525

2526+
html.auto-color .kg-bookmark-card a.kg-bookmark-container,
2527+
html.auto-color .kg-bookmark-card a.kg-bookmark-container:hover {
2528+
background: var(--color-darkmode) !important;
2529+
color: #fff !important;
2530+
}
2531+
25222532
html.auto-color .footer-cta-title {
25232533
color: #fff;
25242534
}

author.hbs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,31 @@
5151
<a class="author-profile-social-link" href="{{website}}" target="_blank" rel="noopener">{{> "icons/linkedin"}}</a>
5252
{{/if}}
5353
{{#if twitter}}
54-
<a class="author-profile-social-link" href="{{twitter_url}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
54+
<a class="author-profile-social-link" href="{{social_url type="twitter"}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
5555
{{/if}}
5656
{{#if facebook}}
57-
<a class="author-profile-social-link" href="{{facebook_url}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
57+
<a class="author-profile-social-link" href="{{social_url type="facebook"}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
58+
{{/if}}
59+
{{#if linkedin}}
60+
<a class="author-profile-social-link" href="{{social_url type="linkedin"}}" target="_blank" rel="noopener">{{> "icons/linkedin"}}</a>
61+
{{/if}}
62+
{{#if bluesky}}
63+
<a class="author-profile-social-link" href="{{social_url type="bluesky"}}" target="_blank" rel="noopener">{{> "icons/bluesky"}}</a>
64+
{{/if}}
65+
{{#if threads}}
66+
<a class="author-profile-social-link" href="{{social_url type="threads"}}" target="_blank" rel="noopener">{{> "icons/threads"}}</a>
67+
{{/if}}
68+
{{#if mastodon}}
69+
<a class="author-profile-social-link" href="{{social_url type="mastodon"}}" target="_blank" rel="noopener">{{> "icons/mastodon"}}</a>
70+
{{/if}}
71+
{{#if tiktok}}
72+
<a class="author-profile-social-link" href="{{social_url type="tiktok"}}" target="_blank" rel="noopener">{{> "icons/tiktok"}}</a>
73+
{{/if}}
74+
{{#if youtube}}
75+
<a class="author-profile-social-link" href="{{social_url type="youtube"}}" target="_blank" rel="noopener">{{> "icons/youtube"}}</a>
76+
{{/if}}
77+
{{#if instagram}}
78+
<a class="author-profile-social-link" href="{{social_url type="instagram"}}" target="_blank" rel="noopener">{{> "icons/instagram"}}</a>
5879
{{/if}}
5980
</div>
6081
</footer>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "michelin",
33
"description": "Michelin default theme for Ghost publishing platform",
44
"demo": "https://blogit.michelin.io/",
5-
"version": "5.7.2",
5+
"version": "5.9.0",
66
"engines": {
77
"ghost": ">=5.0.0"
88
},
@@ -49,7 +49,7 @@
4949
"autoprefixer": "10.4.7",
5050
"beeper": "2.1.0",
5151
"cssnano": "5.1.12",
52-
"gscan": "4.36.1",
52+
"gscan": "4.48.0",
5353
"gulp": "4.0.2",
5454
"gulp-concat": "2.6.1",
5555
"gulp-livereload": "4.0.2",

partials/icons/bluesky.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<svg class="icon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2+
<path d="M11.8868 11.3624C10.8107 9.1288 7.87874 4.96656 5.15331 2.91348C3.18679 1.43245 0 0.28612 0 3.93314C0 4.66121 0.416033 10.0519 0.660462 10.927C1.50889 13.9693 4.60131 14.7453 7.352 14.2758C2.54378 15.0967 1.32092 17.8158 3.9624 20.535C8.97901 25.6994 11.1728 19.2393 11.7346 17.584C11.8385 17.2784 11.8868 17.1365 11.8868 17.262C11.8868 17.1365 11.9351 17.2784 12.0391 17.584C12.6008 19.2393 14.7946 25.6994 19.8113 20.535C22.4527 17.8158 21.2298 15.0967 16.4217 14.2758C19.1723 14.7453 22.2648 13.9693 23.1132 10.927C23.3576 10.0519 23.7736 4.66121 23.7736 3.93314C23.7736 0.28612 20.5872 1.43245 18.6204 2.91348C15.8949 4.96656 12.963 9.1288 11.8868 11.3624Z" fill="currentColor"/>
3+
</svg>

0 commit comments

Comments
 (0)