Skip to content

Commit e3337f8

Browse files
committed
Pull latest image in docker run snippets and fix docs anchors
Signed-off-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com>
1 parent 587edb4 commit e3337f8

13 files changed

Lines changed: 80 additions & 21 deletions

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ on:
55
push:
66
branches:
77
- main
8-
# Runs on pull requests targeting the default branch or the 1.0 release branch
8+
# Runs on pull requests targeting the default branch
99
pull_request:
1010
branches:
1111
- main
12-
- 1.0-release-readiness
1312
# Supersede in-flight runs for a pull request when new commits arrive, so a
1413
# rebase or force-push does not leave several runs racing on stale commits.
1514
# Pushes to main are never cancelled: every commit on the default branch

‎app/ai/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const metadata = getMetadata({
2727
],
2828
});
2929

30-
const quickRunCommand = `docker run -dt --name documentdb \\
30+
const quickRunCommand = `docker run -dt --pull always --name documentdb \\
3131
-p 127.0.0.1:10260:10260 \\
3232
-e USERNAME=admin \\
3333
-e PASSWORD=password \\

‎app/components/Markdown.tsx‎

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Link from "next/link";
66
import { useMemo } from 'react';
77
import type { ReactElement } from 'react';
88
import Code from './Code';
9-
import { headingAnchor } from '../lib/docsAnchors';
9+
import { githubHeadingAnchor, headingAnchor } from '../lib/docsAnchors';
1010
import { resolveMarkdownLink } from '../lib/markdownLinks';
1111
import { withBasePath } from '../services/sitePath';
1212

@@ -44,7 +44,7 @@ export default function Markdown({ content, sourcePath }: MarkdownProps) {
4444

4545
elements.push(
4646
<div key={`section-${index}`} className="bg-neutral-800/50 backdrop-blur-sm rounded-lg border border-neutral-700/50 p-6">
47-
<a className="invisible scroll-mt-24" id={headingAnchor(title)} />
47+
<HeadingAnchors title={title} />
4848
<h2 className="text-xl sm:text-2xl font-semibold text-white mb-4">
4949
{title}
5050
</h2>
@@ -66,6 +66,22 @@ export default function Markdown({ content, sourcePath }: MarkdownProps) {
6666
return <div className="space-y-8 break-words">{processedContent}</div>;
6767
}
6868

69+
// The site's own id plus GitHub's spelling, which in-page links in the docs Markdown use.
70+
function HeadingAnchors({ title }: { title: string }) {
71+
const anchor = headingAnchor(title);
72+
const githubAnchor = githubHeadingAnchor(title);
73+
return (
74+
<>
75+
<a className="invisible scroll-mt-24" id={anchor} />
76+
{githubAnchor !== anchor && <a className="invisible scroll-mt-24" id={githubAnchor} />}
77+
</>
78+
);
79+
}
80+
81+
function hastText(node: any): string {
82+
return node?.type === 'text' ? node.value : (node?.children ?? []).map(hastText).join('');
83+
}
84+
6985
function getMarkdownComponents(sourcePath: string) {
7086
return {
7187
// H1 headings (main page title from Markdown content)
@@ -86,17 +102,23 @@ function getMarkdownComponents(sourcePath: string) {
86102
),
87103

88104
// H3 sections (subsections within H2 cards)
89-
h3: ({ children, ...props }: any) => (
90-
<h3 className="text-lg font-medium text-white mb-3 mt-6">
91-
{children}
92-
</h3>
105+
h3: ({ children, node }: any) => (
106+
<>
107+
<HeadingAnchors title={hastText(node)} />
108+
<h3 className="text-lg font-medium text-white mb-3 mt-6">
109+
{children}
110+
</h3>
111+
</>
93112
),
94113

95114
// H4 subsections
96-
h4: ({ children, ...props }: any) => (
97-
<h4 className="text-base font-medium text-white mb-2 mt-4">
98-
{children}
99-
</h4>
115+
h4: ({ children, node }: any) => (
116+
<>
117+
<HeadingAnchors title={hastText(node)} />
118+
<h4 className="text-base font-medium text-white mb-2 mt-4">
119+
{children}
120+
</h4>
121+
</>
100122
),
101123

102124
// Unordered lists with consistent nested indentation

‎app/docs/[section]/[[...slug]]/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Markdown from "../../../components/Markdown";
1010
import MovedNotice from "../../../components/MovedNotice";
1111
import { aptTargetLabels } from "../../../lib/packageInstall";
1212

13-
const dockerQuickRunCommand = `docker run -dt --name documentdb \\
13+
const dockerQuickRunCommand = `docker run -dt --pull always --name documentdb \\
1414
-p 127.0.0.1:10260:10260 \\
1515
-e USERNAME='<YOUR_USERNAME>' \\
1616
-e PASSWORD='<YOUR_PASSWORD>' \\

‎app/lib/docsAnchors.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,17 @@ export function headingAnchor(title: string): string {
88
return kebabCase(title);
99
}
1010

11+
/**
12+
* The fragment GitHub gives the same heading. Docs Markdown is written against GitHub, so its
13+
* in-page links use this form (`#choosing-numcandidates`, not `#choosing-num-candidates`).
14+
*/
15+
export function githubHeadingAnchor(title: string): string {
16+
return title
17+
.trim()
18+
.toLowerCase()
19+
.replace(/[^\p{L}\p{N}\s_-]/gu, '')
20+
.replace(/\s/g, '-');
21+
}
22+
1123
export const vscodeExistingConnectionSectionTitle = 'Connect an existing instance';
1224
export const vscodeExistingConnectionSectionAnchor = headingAnchor(vscodeExistingConnectionSectionTitle);

‎app/packages/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {
2828
documentdbVsCodeLocalQuickStartDeepLink,
2929
} from "../services/externalLinks";
3030

31-
const dockerCommand = `docker run -dt --name documentdb \\
31+
const dockerCommand = `docker run -dt --pull always --name documentdb \\
3232
-p 127.0.0.1:10260:10260 \\
3333
-e USERNAME='<YOUR_USERNAME>' \\
3434
-e PASSWORD='<YOUR_PASSWORD>' \\

‎app/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type Capability = {
3737
linkLabel?: string;
3838
};
3939

40-
const quickRunCommand = `docker run -dt --name documentdb \\
40+
const quickRunCommand = `docker run -dt --pull always --name documentdb \\
4141
-p 127.0.0.1:10260:10260 \\
4242
-e USERNAME='<YOUR_USERNAME>' \\
4343
-e PASSWORD='<YOUR_PASSWORD>' \\

‎app/services/articleService.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ Use this if you want to manage the container yourself. If DocumentDB is already
782782
Start it with Docker:
783783
784784
\`\`\`bash
785-
docker run -dt --name documentdb \\
785+
docker run -dt --pull always --name documentdb \\
786786
-p 127.0.0.1:10260:10260 \\
787787
-e USERNAME='<YOUR_USERNAME>' \\
788788
-e PASSWORD='<YOUR_PASSWORD>' \\
@@ -890,7 +890,7 @@ Skip this if you installed Linux packages or already have a running instance. If
890890
export DOCUMENTDB_USERNAME='<YOUR_USERNAME>'
891891
export DOCUMENTDB_PASSWORD='<YOUR_PASSWORD>'
892892
893-
docker run -dt --name documentdb \\
893+
docker run -dt --pull always --name documentdb \\
894894
-p 127.0.0.1:10260:10260 \\
895895
-e USERNAME="\${DOCUMENTDB_USERNAME:?Set DOCUMENTDB_USERNAME}" \\
896896
-e PASSWORD="\${DOCUMENTDB_PASSWORD:?Set DOCUMENTDB_PASSWORD}" \\
@@ -1029,7 +1029,7 @@ Skip this if you installed Linux packages or already have a running instance. If
10291029
export DOCUMENTDB_USERNAME='<YOUR_USERNAME>'
10301030
export DOCUMENTDB_PASSWORD='<YOUR_PASSWORD>'
10311031
1032-
docker run -dt --name documentdb \\
1032+
docker run -dt --pull always --name documentdb \\
10331033
-p 127.0.0.1:10260:10260 \\
10341034
-e USERNAME="\${DOCUMENTDB_USERNAME:?Set DOCUMENTDB_USERNAME}" \\
10351035
-e PASSWORD="\${DOCUMENTDB_PASSWORD:?Set DOCUMENTDB_PASSWORD}" \\
@@ -1187,7 +1187,7 @@ ${clientInstancePrerequisiteContent}
11871187
Skip this if you installed Linux packages or already have a running instance. If you chose Docker and have [Docker](https://www.docker.com/) installed:
11881188
11891189
\`\`\`bash
1190-
docker run -dt --name documentdb \\
1190+
docker run -dt --pull always --name documentdb \\
11911191
-p 127.0.0.1:10260:10260 \\
11921192
-e USERNAME='<YOUR_USERNAME>' \\
11931193
-e PASSWORD='<YOUR_PASSWORD>' \\

‎blogs/_posts/2026-09-10-linux-packages.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ tags:
1919
{% assign blogs_at = blog_base | size | minus: 6 %}
2020
{% 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 %}
2121

22+
**Update, October 19, 2026:** DocumentDB 1.0 is the current release. [Read the announcement]({{ site.release_announcement_url | relative_url }}). Packages from v0.116 or v0.117 [upgrade in place]({{ site_root }}/docs/linux-packages/#upgrading).
23+
2224
Docker remains the fastest way to evaluate DocumentDB on Linux, macOS, or Windows. When you cannot use Docker, or need control over PostgreSQL, services, and configuration on a Linux host, Linux packages give you another option: familiar package managers, guided setup, and a choice about how much of the stack you manage.
2325

2426
DocumentDB is an open-source document database built on PostgreSQL. The Linux packages bring the PostgreSQL extension, gateway, setup tools, and systemd services together, so you can start with a complete installation instead of assembling individual components.

‎blogs/_posts/2026-10-07-why-document-databases-need-more-than-one-implementation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tags:
1212
- Community
1313
---
1414

15-
**Update, October 19, 2026:** DocumentDB 1.0 is now available. [Read the announcement]({{ site.release_announcement_url | relative_url }}).
15+
**Update, October 19, 2026:** DocumentDB 1.0 is now available, and the release candidate mentioned below is retired. [Read the announcement]({{ site.release_announcement_url | relative_url }}).
1616

1717
Choosing a document database is a long-term investment in how an application works. A team learns a query language, adopts drivers, and builds around particular behaviors. Those choices become part of the application, from routine reads to the way it recovers after a failed write.
1818

0 commit comments

Comments
 (0)