Skip to content

Commit e801fed

Browse files
authored
add open graph meta tags (#295)
1 parent 95264d9 commit e801fed

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

pgml-docs/docs/blog/data-is-living-and-relational.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
author: Montana Low
3+
description: A common problem with data science and machine learning tutorials is the published and studied datasets are often nothing like what you’ll find in industry.
4+
image: https://postgresml.org/images/illustrations/uml.png
5+
image_alt: Data is relational and growing in multiple dimensions
6+
---
7+
8+
19
<style>
210
img.float-right {
311
margin: 0 16px !important;

pgml-docs/docs/blog/postgres-full-text-search-is-awesome.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
author: Montana Low
3+
description: If you want to improve your search results, don't rely on expensive O(n*m) word frequency statistics. Get new sources of data instead. It's the relational nature of relevance that underpins why a relational database forms the ideal search engine.
4+
image: https://postgresml.org/blog/images/delorean.jpg
5+
image_alt: We were promised flying cars
6+
---
7+
8+
19
<h1>Postgres Full Text Search is Awesome!</h1>
210

311
<p class="author">

pgml-docs/overrides/main.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,38 @@
44
<a class="navbar-brand" href="{{ nav.homepage.url|url }}">Postgres<span style="color: dodgerblue">ML</span></a>
55
{%- endblock %}
66

7+
{% block site_meta %}
8+
{{ super() }}
9+
<meta name="og:site_name" content="PostgresML">
10+
{% if page.meta and page.meta.title %}
11+
<meta name="og:title" content="{{ page.meta.title }}">
12+
{% elif page.title %}
13+
<meta name="og:title" content="{{ page.title | striptags }}">
14+
{% endif %}
15+
{% if page.meta and page.meta.type %}
16+
<meta name="og:type" content="{{ page.meta.type }}">
17+
{% endif %}
18+
{% if page.meta and page.meta.description %}
19+
<meta name="og:description" content="{{ page.meta.description }}">
20+
{% elif config.site_description %}
21+
<meta name="og:description" content="{{ config.site_description }}">
22+
{% endif %}
23+
{% if page.meta and page.meta.author %}
24+
<meta name="og:author" content="{{ page.meta.author }}">
25+
{% endif %}
26+
{% if page.meta and page.meta.image %}
27+
<meta name="og:image" content="{{ page.meta.image }}">
28+
{% endif %}
29+
{% if page.meta and page.meta.image_alt %}
30+
<meta name="og:image:alt" content="{{ page.meta.image_alt }}">
31+
{% endif %}
32+
{% if page.meta and page.meta.type %}
33+
<meta name="og:type" content="{{ page.meta.type }}">
34+
{% else %}
35+
<meta name="og:type" content="article">
36+
{% endif %}
37+
{% endblock %}
38+
739
{%- block content %}
840
{{ super() }}
941

0 commit comments

Comments
 (0)