Skip to content

Commit 2d6651a

Browse files
authored
Merge pull request #1091 from ApolloAutomation/dev
Sync dev to main: link embed metadata
2 parents b7ca6ef + 57add6a commit 2d6651a

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

‎layouts/apollo.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ definitions:
5454
- &site_name >-
5555
{{ config.site_name }}
5656

57-
# Page title with site name
58-
- &page_title_with_site_name >-
57+
# Page title. No site name suffix: `og:site_name` already prints "Apollo
58+
# Docs" on its own line directly above the title in an embed.
59+
- &page_title >-
5960
{%- if not page.is_homepage -%}
60-
{{ page.meta.get("title", page.title) }} - {{ config.site_name }}
61+
{{ page.meta.get("title", page.title) }}
6162
{%- else -%}
6263
{{ config.site_name }}
6364
{%- endif -%}
@@ -83,7 +84,8 @@ tags:
8384

8485
# Open Graph
8586
og:type: website
86-
og:title: *page_title_with_site_name
87+
og:site_name: *site_name
88+
og:title: *page_title
8789
og:description: *page_description
8890
og:image: "{{ image.url }}"
8991
og:image:type: "{{ image.type }}"
@@ -93,7 +95,7 @@ tags:
9395

9496
# Twitter
9597
twitter:card: summary
96-
twitter:title: *page_title_with_site_name
98+
twitter:title: *page_title
9799
twitter:description: *page_description
98100
twitter:image: "{{ image.url }}"
99101

‎mkdocs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ extra_css:
88
- stylesheets/osano.css
99
- stylesheets/pmm.css
1010
site_name: Apollo Docs
11+
site_description: Setup guides, troubleshooting, and firmware documentation for Apollo Automation sensors.
1112
#site_url: https://apolloautomation.github.io/
1213
site_url: https://wiki.apolloautomation.com
1314
repo_url: https://github.com/ApolloAutomation/docs

‎overrides/main.html‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends "base.html" %}
2+
3+
{% block extrahead %}
4+
{{ super() }}
5+
6+
{#-
7+
Discord tints the vertical stripe on the left edge of a link embed with
8+
this tag. Material does not emit one, because the palette here uses a
9+
custom primary rather than a named color. It must be `name=` rather than
10+
`property=`, so it cannot come from the social card layout, which emits
11+
`property=` for everything.
12+
-#}
13+
<meta name="theme-color" content="#9ABC31">
14+
{% endblock %}

0 commit comments

Comments
 (0)