Skip to content

Commit 88afff9

Browse files
lionelcLei JiangCopilot
authored
separate blogs and announcements; llms.txt (#232)
Co-authored-by: Lei Jiang <jianglei@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5b082c4 commit 88afff9

24 files changed

Lines changed: 458 additions & 134 deletions

‎.github/workflows/continuous-deployment.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ jobs:
156156
env:
157157
JEKYLL_BASE_PATH: /blogs
158158
run: npm run build
159-
- name: Verify exported documentation pages
159+
- name: Verify exported site pages
160160
# A partially failed content compile must never reach production as a
161161
# docs-less site. compile-content fails the build on clone/copy errors;
162162
# this is the independent belt-and-braces check on the final artifact.
163163
run: |
164164
set -euo pipefail
165-
for page in out/index.html out/docs/index.html out/docs/getting-started/index.html out/docs/reference/index.html; do
165+
for page in out/index.html out/docs/index.html out/docs/getting-started/index.html out/docs/reference/index.html out/blogs/index.html out/announcements/index.html; do
166166
if [ ! -f "$page" ]; then
167167
echo "Missing expected page: $page"
168168
exit 1

‎.github/workflows/continuous-integration.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
node-version: 24
5252
cache: npm
5353
- name: Setup Ruby
54-
# The full site build now includes the Jekyll-powered blogs section.
54+
# The full site build includes the Jekyll-powered content sections.
5555
uses: ruby/setup-ruby@v1
5656
with:
5757
ruby-version: 3.3

‎announcements/index.html‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Announcements
3+
description: DocumentDB project news, releases, and community milestones.
4+
section: announcements
5+
kicker: Project news
6+
---
7+
{% include post-listing.html %}

‎app/components/Navbar.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const navItems: NavItem[] = [
4040
newTab: true,
4141
},
4242
{ label: "K8s Operator", href: "/kubernetes-operator", kind: "link" },
43+
{ label: "Announcements", href: withBasePath("/announcements/"), kind: "anchor" },
4344
{ label: "Blogs", href: withBasePath("/blogs/"), kind: "anchor" },
4445
{ label: "Samples", href: "/samples", kind: "link" },
4546
];
@@ -119,7 +120,7 @@ export default function Navbar() {
119120
<span>DocumentDB</span>
120121
</Link>
121122

122-
<div className="hidden items-center space-x-6 xl:flex xl:space-x-8">
123+
<div className="hidden items-center gap-4 xl:flex">
123124
{navItems.map((item) =>
124125
renderNavItem(
125126
item,

‎app/services/externalLinks.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const documentdbVsCodeLocalQuickStartDeepLink =
1919

2020
// Where the 1.0 banner sends readers: a site-root path or an absolute URL.
2121
// blogs/_config.yml holds the same target as `release_announcement_url`,
22-
// relative to the blog.
22+
// relative to the site root.
2323
export const documentdbReleaseAnnouncementUrl = '/blogs/posts/documentdb-1-0/';
2424

2525
// The one link to promote for 1.0; the site and blog banners point here.

‎blogs/_config.yml‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ description: Insights, updates, and deep dives into the world of document databa
33
# Shared external links. The Next.js app keeps the same values in
44
# app/services/externalLinks.ts; update both when one changes.
55
discord_url: https://discord.gg/vH7bYu524D
6-
# Where the 1.0 banner and update notes send readers: a blog path (resolved
7-
# under baseurl) or an absolute URL. app/services/externalLinks.ts holds the
8-
# site-root form.
9-
release_announcement_url: /posts/documentdb-1-0/
10-
baseurl: /blogs
6+
# Shared release announcement target. app/services/externalLinks.ts holds
7+
# the same site-root path.
8+
release_announcement_url: /blogs/posts/documentdb-1-0/
9+
baseurl: ""
10+
layouts_dir: blogs/_layouts
11+
includes_dir: blogs/_includes
12+
data_dir: blogs/_data
1113
# Absolute host for og:url, og:image, and the Atom feed's permanent IDs.
1214
url: "https://documentdb.io"
1315
permalink: pretty
@@ -27,4 +29,5 @@ defaults:
2729
values:
2830
layout: post
2931
category: documentdb-blog
30-
permalink: /posts/:title/
32+
section: blogs
33+
permalink: /blogs/posts/:title/

‎blogs/_data/posts.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
- title: |-
22
DocumentDB Joins the Linux Foundation
33
category: microsoft-open-source-blog
4+
section: announcements
45
featured: true
56
description: |-
67
Today, we are excited to announce yet another milestone in DocumentDB’s journey: the project is officially joining the Linux Foundation.
@@ -12,6 +13,7 @@
1213
- title: |-
1314
AWS : DocumentDB Project Announcement
1415
category: aws-blog
16+
section: announcements
1517
description: |-
1618
AWS joins the DocumentDB project to build interoperable, open source document database technology
1719
tags:
@@ -21,6 +23,7 @@
2123
- title: |-
2224
DocumentDB: Open-Source Announcement
2325
category: azure-cosmos-db-blog
26+
section: announcements
2427
description: |-
2528
We are excited to announce the official release of DocumentDB—an open-source document database platform and the engine powering Azure Cosmos DB for MongoDB (vCore), built on PostgreSQL. This marks a significant milestone in creating an interoperable, portable, and fully supported production-ready document data store.
2629
tags:
@@ -30,6 +33,7 @@
3033
- title: |-
3134
DocumentDB is Gaining Momentum in the Open-Source Database World
3235
category: azure-cosmos-db-blog
36+
section: announcements
3337
description: |-
3438
DocumentDB has quickly caught the attention of major tech publications and earned significant community engagement. In just under a week, our project earned 1000 GitHub stars, nearly 50 forks, and multiple pull requests.
3539
tags:
@@ -39,6 +43,7 @@
3943
- title: |-
4044
MongoDB API in YugabyteDB
4145
category: yugabytedb-blog
46+
section: blogs
4247
description: |-
4348
Learn how YugabyteDB now offers a MongoDB-compatible API with the support of the DocumentDB PostgreSQL extension, providing developers with an open source alternative for MongoDB workloads.
4449
tags:

‎blogs/_includes/post-listing.html‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{% assign section_local_posts = site.posts | where: "section", page.section %}
2+
{% assign section_external_posts = site.data.posts | where: "section", page.section %}
3+
{% assign featured_local_posts = section_local_posts | where: "featured", true %}
4+
{% assign featured_external_posts = section_external_posts | where: "featured", true %}
5+
{% assign local_posts = section_local_posts | where_exp: "post", "post.featured != true" %}
6+
{% assign external_posts = section_external_posts | where_exp: "post", "post.featured != true" %}
7+
8+
<section class="blog-hero">
9+
<p class="blog-hero__kicker">{{ page.kicker }}</p>
10+
<h1 class="blog-hero__title">{{ page.title }}</h1>
11+
<p class="blog-hero__description">{{ page.description }}</p>
12+
{% if page.section == 'announcements' %}
13+
<a class="blog-hero__cta" href="{{ site.release_announcement_url | relative_url }}">Read the DocumentDB 1.0 announcement <span aria-hidden="true">&rarr;</span></a>
14+
{% endif %}
15+
</section>
16+
17+
{% if featured_local_posts.size > 0 or featured_external_posts.size > 0 %}
18+
<section class="posts-group" aria-labelledby="featured-posts-title">
19+
<div class="posts-group__header">
20+
<h2 class="posts-group__title" id="featured-posts-title">Featured</h2>
21+
<p class="posts-group__description">Highlights from the DocumentDB team and community.</p>
22+
</div>
23+
24+
<div class="posts-list" aria-label="Featured {{ page.section }}">
25+
{% for post in featured_local_posts %}
26+
{% include post-card.html post=post featured=true %}
27+
{% endfor %}
28+
29+
{% for post in featured_external_posts %}
30+
{% include post-card.html post=post featured=true %}
31+
{% endfor %}
32+
</div>
33+
</section>
34+
{% endif %}
35+
36+
{% if local_posts.size > 0 %}
37+
<section class="posts-group" aria-labelledby="published-here-title">
38+
<div class="posts-group__header">
39+
<h2 class="posts-group__title" id="published-here-title">Published here</h2>
40+
<p class="posts-group__description">Posts from the DocumentDB team.</p>
41+
</div>
42+
43+
<div class="posts-list" aria-label="Repository-authored {{ page.section }}">
44+
{% for post in local_posts %}
45+
{% include post-card.html post=post featured=false %}
46+
{% endfor %}
47+
</div>
48+
</section>
49+
{% endif %}
50+
51+
{% if external_posts.size > 0 %}
52+
<section class="posts-group" aria-labelledby="external-posts-title">
53+
<div class="posts-group__header">
54+
<h2 class="posts-group__title" id="external-posts-title">From around the web</h2>
55+
<p class="posts-group__description">Curated partner and community articles hosted outside this repository.</p>
56+
</div>
57+
58+
<div class="posts-list" aria-label="External {{ page.section }}">
59+
{% for post in external_posts %}
60+
{% include post-card.html post=post featured=false %}
61+
{% endfor %}
62+
</div>
63+
</section>
64+
{% endif %}

‎blogs/_layouts/default.html‎

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,18 @@
3636
<meta name="twitter:description" content="{{ social_description | escape }}">
3737
<meta name="twitter:image" content="{{ social_image }}">
3838

39-
<link rel="alternate" type="application/atom+xml" title="DocumentDB Blog" href="{{ '/feed.xml' | relative_url }}">
40-
<link rel="stylesheet" href="{{ '/assets/blog.css' | relative_url }}">
39+
<link rel="alternate" type="application/atom+xml" title="DocumentDB Blog" href="{{ '/blogs/feed.xml' | relative_url }}">
40+
<link rel="stylesheet" href="{{ '/blogs/assets/blog.css' | relative_url }}">
4141
</head>
4242
<body>
43-
{% assign blog_base = site.baseurl %}
44-
{% assign blog_base_last = blog_base | slice: -1, 1 %}
45-
{% if blog_base_last == '/' %}{% assign blog_base_end = blog_base | size | minus: 1 %}{% assign blog_base = blog_base | slice: 0, blog_base_end %}{% endif %}
46-
{% assign site_root = blog_base %}
47-
{% assign blogs_at = blog_base | size | minus: 6 %}
48-
{% if blogs_at >= 0 %}{% assign blogs_tail = blog_base | slice: blogs_at, 6 %}{% if blogs_tail == '/blogs' %}{% assign site_root = blog_base | slice: 0, blogs_at %}{% endif %}{% endif %}
49-
{% if site_root == '' %}
50-
{% assign site_root = '/' %}
51-
{% endif %}
52-
53-
{% assign home_href = site_root | append: '/' | replace: '//', '/' %}
54-
{% assign docs_href = site_root | append: '/docs' | replace: '//', '/' %}
55-
{% assign packages_href = site_root | append: '/packages' | replace: '//', '/' %}
56-
{% assign operator_href = site_root | append: '/kubernetes-operator' | replace: '//', '/' %}
57-
{% assign logo_href = site_root | append: '/images/DocumentDB Logo - background removed.png' | replace: '//', '/' %}
58-
{% assign blogs_href = site.baseurl | append: '/' | replace: '//', '/' %}
43+
{% assign home_href = '/' | relative_url %}
44+
{% assign docs_href = '/docs' | relative_url %}
45+
{% assign packages_href = '/packages' | relative_url %}
46+
{% assign operator_href = '/kubernetes-operator' | relative_url %}
47+
{% assign logo_href = '/images/DocumentDB Logo - background removed.png' | relative_url %}
48+
{% assign blogs_href = '/blogs/' | relative_url %}
49+
{% assign announcements_href = '/announcements/' | relative_url %}
50+
{% assign current_section = page.section | default: 'blogs' %}
5951

6052
{% capture nav_links %}
6153
<a href="{{ home_href }}">Home</a>
@@ -65,10 +57,11 @@
6557
<a href="{{ packages_href }}">Download</a>
6658
<a href="https://github.com/Azure/documentdb-agent-kit" target="_blank" rel="noopener noreferrer">Agent-Kit</a>
6759
<a href="{{ operator_href }}">K8s Operator</a>
68-
<a href="{{ blogs_href }}" aria-current="page">Blogs</a>
60+
<a href="{{ announcements_href }}"{% if current_section == 'announcements' %} aria-current="page"{% endif %}>Announcements</a>
61+
<a href="{{ blogs_href }}"{% if current_section == 'blogs' %} aria-current="page"{% endif %}>Blogs</a>
6962
{% endcapture %}
7063

71-
{% assign release_page_href = site_root | append: '/v1/' | replace: '//', '/' %}
64+
{% assign release_page_href = '/v1/' | relative_url %}
7265
<div class="site-shell">
7366
<a class="release-bar" href="{{ release_page_href }}">
7467
<span class="release-bar__badge">New</span>

‎blogs/_layouts/post.html‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55

66
<article class="blog-post">
77
<p class="blog-post__back">
8-
<a href="{{ '/' | relative_url }}">&larr; Back to all blog posts</a>
8+
{% if page.section == 'announcements' %}
9+
<a href="{{ '/announcements/' | relative_url }}">&larr; Back to all announcements</a>
10+
{% else %}
11+
<a href="{{ '/blogs/' | relative_url }}">&larr; Back to all blog posts</a>
12+
{% endif %}
913
</p>
1014

1115
<header class="blog-post__header">

0 commit comments

Comments
 (0)