Skip to content

Commit

Permalink
Merge pull request #81 from scottsweb/add/fediverse-creator
Browse files Browse the repository at this point in the history
Add support for fediverse:creator
  • Loading branch information
scottsweb authored Oct 9, 2024
2 parents 9f5d8b5 + d061012 commit e1343db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion content/_data/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"email": "[email protected]",
"url": "https://scott.ee",
"location": "Stockholm, Sweden",
"fediverseProfile": "https://toot.scott.ee/@scott"
"fediverseProfile": "https://toot.scott.ee/@scott",
"fediverseUsername": "@[email protected]"
},
"meta": {
"separator": "",
Expand Down
5 changes: 3 additions & 2 deletions theme/_layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<meta property="og:type" content="website">
<meta property="og:url" content="{{ u }}">
<meta property="og:image" content="{{ i | cdnify }}">
<meta property="og:image:alt" content="{{ ia }}"/>
<meta property="og:image:alt" content="{{ ia }}">

<!-- icons -->
<link rel="icon" href="{{ "/favicon.ico" | htmlBaseUrl(settings.url) }}" sizes="any">
Expand All @@ -48,8 +48,9 @@
<link rel="manifest" href="{{ "/site.webmanifest" | locale_url | htmlBaseUrl(settings.url) }}">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="{{ settings.themeColorLight }}">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="{{ settings.themeColorDark }}">
{% if settings.isStaging or noIndex %}<meta name="robots" content="noindex, nofollow" />{% endif %}
{% if settings.isStaging or noIndex %}<meta name="robots" content="noindex, nofollow">{% endif %}
{% if settings.author.fediverseProfile %}<link href="{{ settings.author.fediverseProfile }}" rel="me">{% endif %}
{% if settings.author.fediverseUsername %}<meta name="fediverse:creator" content="{{ settings.author.fediverseUsername }}">{% endif %}

<!-- set theme before page renders to stop fouc -->
<script>document.documentElement.dataset.theme = localStorage.getItem('theme') === null ? window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' : localStorage.getItem('theme')</script>
Expand Down

0 comments on commit e1343db

Please sign in to comment.