Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenGraph and TwitterCards #1002

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"MD026": false,
"MD033": false,
"MD024": false,
"MD007": false
"MD007": false,
"MD025": {
front_matter_title: ""
}
}
4 changes: 4 additions & 0 deletions docs/discover/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Discover – What is Pony?
description: Pony is an open-source, object-oriented, actor-model, capabilities-secure, high-performance programming language.
---
# What is Pony?

Pony is an open-source, object-oriented, [actor-model](https://en.wikipedia.org/wiki/Actor_model), [capabilities-secure](https://en.wikipedia.org/wiki/Capability-based_security), high-performance programming language.
Expand Down
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
site_name: Pony
site_description: "This is the website for the Pony programming language. Pony is an open-source, object-oriented, actor-model, capabilities-secure, high-performance programming language."

copyright: Copyright © 2024 The Pony Developers
edit_uri: edit/main/docs/
Expand Down Expand Up @@ -28,6 +29,7 @@ markdown_extensions:
- smarty
- toc:
permalink: true
- meta

plugins:
- blog:
Expand Down Expand Up @@ -62,6 +64,7 @@ plugins:

theme:
name: material
custom_dir: overrides

favicon: assets/logo.png

Expand Down
23 changes: 23 additions & 0 deletions overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% 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 %}
{% set description = config.site_description %}
{% if page and page.meta and page.meta.description %}
{% set description = page.meta.description %}
{% endif %}
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:description" content="{{ description }}" />
<meta property="og:url" content="{{ page.canonical_url }}" />
<meta name="twitter:card" content="app" />
<meta name="twitter:site" content="ponylang" />
<meta name="twitter:creator" content="ponylang" />
<meta name="twitter:title" content="{{ title }}" />
<meta name="twitter:description" content="{{ description }}" />
{% endblock %}
Loading