Skip to content
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
3 changes: 2 additions & 1 deletion blogs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
title: DocumentDB Blog
description: Insights, updates, and deep dives into the world of document databases and open-source innovation.
baseurl: /blogs
url: ""
# Absolute host for og:url, og:image, and the Atom feed's permanent IDs.
url: "https://documentdb.io"
permalink: pretty
markdown: kramdown
kramdown:
Expand Down
27 changes: 27 additions & 0 deletions blogs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,33 @@
<title>{% if page.title %}{{ page.title }} · {% endif %}DocumentDB</title>
<meta name="description" content="{{ page.description | default: site.description | escape }}">
<meta name="theme-color" content="#09090b">

{% assign social_title = page.title | default: site.title %}
{% assign social_description = page.description | default: site.description %}
{% if page.cover_image %}
{% if page.cover_image contains '://' %}
{% assign social_image = page.cover_image %}
{% else %}
{% assign social_image = page.cover_image | absolute_url %}
{% endif %}
{% else %}
{% assign social_image = site.url | append: '/images/social-card.png' %}
{% endif %}
<meta property="og:site_name" content="DocumentDB">
<meta property="og:type" content="{% if page.date %}article{% else %}website{% endif %}">
<meta property="og:title" content="{{ social_title | escape }}">
<meta property="og:description" content="{{ social_description | escape }}">
<meta property="og:url" content="{{ page.url | absolute_url }}">
<meta property="og:image" content="{{ social_image }}">
{% if page.date %}
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
{% endif %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ social_title | escape }}">
<meta name="twitter:description" content="{{ social_description | escape }}">
<meta name="twitter:image" content="{{ social_image }}">

<link rel="alternate" type="application/atom+xml" title="DocumentDB Blog" href="{{ '/feed.xml' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/blog.css' | relative_url }}">
</head>
<body>
Expand Down
28 changes: 28 additions & 0 deletions blogs/feed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# layout: null opts out of the site-wide `layout: default` front-matter
# default, which would otherwise wrap this XML in the HTML shell.
layout: null
permalink: /feed.xml
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title | xml_escape }}</title>
<subtitle>{{ site.description | xml_escape }}</subtitle>
<id>{{ '/' | absolute_url }}</id>
<link href="{{ '/' | absolute_url }}"/>
<link href="{{ '/feed.xml' | absolute_url }}" rel="self"/>
<updated>{% if site.posts.size > 0 %}{{ site.posts.first.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}</updated>
<author><name>DocumentDB</name></author>
{% for post in site.posts %}
<entry>
<title>{{ post.title | xml_escape }}</title>
<id>{{ post.url | absolute_url }}</id>
<link href="{{ post.url | absolute_url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
{% if post.author %}<author><name>{{ post.author | xml_escape }}</name></author>{% endif %}
{% if post.description %}<summary>{{ post.description | xml_escape }}</summary>{% endif %}
<content type="html">{{ post.content | xml_escape }}</content>
{% for tag in post.tags %}<category term="{{ tag | xml_escape }}"/>{% endfor %}
</entry>
{% endfor %}
</feed>