Skip to content

Commit

Permalink
add opengraph metadata for discourse links
Browse files Browse the repository at this point in the history
  • Loading branch information
marph91 committed Aug 4, 2024
1 parent 2f2f6e7 commit 4eb5752
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends "base.html" %}

{% block extrahead %}
{% set title = config.site_name %}
{% if page and page.meta and page.meta.title %}
{% set title = title ~ " - " ~ page.meta.title %}
{% elif page and page.title and not page.is_homepage %}
{% set title = title ~ " - " ~ page.title | striptags %}
{% endif %}
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:description" content="{{ config.site_description }}" />
<meta property="og:url" content="{{ page.canonical_url }}" />
<meta property="og:image" content="<TODO>" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
{% endblock %}
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
site_name: jimmy
site_description: A tool to import your notes from various formats to Joplin.

# Repository
repo_name: marph91/jimmy
repo_url: https://github.com/marph91/jimmy

theme:
name: material
# add open graph metadata (for example for discourse links)
# https://mrkeo.github.io/reference/meta-tags/#customization
custom_dir: docs/overrides
features:
# index.html for collapsible sections
- navigation.indexes
Expand Down

0 comments on commit 4eb5752

Please sign in to comment.