Skip to content

Commit e0e0a05

Browse files
committed
Upgrade Docusaurus to v3.7.0 and migrate to Bun package manager
- Upgrade Docusaurus from 2.4.3 to 3.7.0 - Update React to 18.x and MDX to v3 - Migrate from npm to Bun for faster package management - Fix theme customizations for Docusaurus 3 compatibility: - Update imports from @docusaurus/theme-common/internal to new client packages - Add BlogPostPageStructuredData and ContentVisibility components - Fix MDX v3 breaking changes: - Escape angle brackets (<2, <10, <pool_name>) with backticks or HTML entities - Escape dollar signs ($name, ${name}) in code documentation - Update prism-react-renderer import path for v2 - Add format: 'detect' to markdown config for CommonMark support - Remove unused ShareLinks import from BlogFooter
1 parent ef90db9 commit e0e0a05

17 files changed

Lines changed: 1006 additions & 24907 deletions

File tree

.ci/validate-feeds.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -e
55

66
echo "Building site to generate feeds..."
7-
npm run build
7+
bun run build
88

99
echo ""
1010
echo "Validating RSS/Atom feeds..."

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ variables:
2424
# Validate RSS/Atom feeds before building and deploying
2525
validate_feeds:
2626
stage: validate
27-
image: node:18
27+
image: oven/bun:1.1
2828
before_script:
2929
# Install xmllint for XML validation
3030
- apt-get update && apt-get install -y libxml2-utils jq
31-
- npm ci
31+
- bun install --frozen-lockfile
3232
script:
3333
- bash .ci/validate-feeds.sh
3434
artifacts:

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.20
1+
FROM oven/bun:1.1
22

33
ARG ARG_REACT_APP_API_SERVER
44
ENV REACT_APP_API_SERVER=$ARG_REACT_APP_API_SERVER
@@ -27,14 +27,14 @@ ENV UMAMI_SCRIPT_URL=$ARG_UMAMI_SCRIPT_URL
2727
WORKDIR /docs
2828

2929
COPY package.json ./
30-
COPY package-lock.json ./
31-
RUN npm ci
30+
COPY bun.lock ./
31+
RUN bun install --frozen-lockfile
3232

3333
COPY . .
3434
# Make cache folder if not exists.
3535
RUN mkdir -p .cache
3636
RUN mv .cache node_modules
37-
RUN npm run build
37+
RUN bun run build
3838

3939
EXPOSE 3000
40-
CMD ["npm", "run", "serve"]
40+
CMD ["bun", "run", "serve"]

blog/20250721-dblab-engine-4-0-released.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ When creating a branch or a clone takes a second and costs nothing extra, teams
226226
## Performance at scale
227227

228228
Testing with production workloads demonstrates:
229-
- **Clone creation**: <2 seconds for any database, regardless of size (even if it's 50 TiB!)
229+
- **Clone creation**: &lt;2 seconds for any database, regardless of size (even if it's 50 TiB!)
230230
- **Snapshot creation**: O(1) operation regardless of database size
231231
- **Branch switching**: Instant (pointer update only)
232232
- **Concurrent users**: 15 users on 10 TiB database with 30-second clone creation under load

blog/20251105-postgres-marathon-2-012.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ time pgbackrest \
150150
# Start with --process-max=8 for a balance of speed and resource usage
151151
# Increase to 16-32 for maximum speed on fast networks (10+ Gbps)
152152
# Network compression (--compress-level-network=1) provides minimal benefit
153-
# on fast networks (<6% improvement) but is useful for slower networks (<10 Gbps)
153+
# on fast networks (<6% improvement) but is useful for slower networks (&lt;10 Gbps)
154154
```
155155

156156
If CPU resources are constrained on the source server, reduce priority for pgBackRest processes on the primary:
@@ -297,7 +297,7 @@ For production deployments:
297297

298298
1. Start with `--process-max=$(($(nproc)/2))` to balance performance with system load
299299
2. Monitor CPU usage on both source and destination during backup
300-
3. Network compression (`--compress-level-network=1`) doesn't seem to be providing a significant improvement on fast networks (10+ Gbps). Use it for slower networks (<10 Gbps) where it can be more beneficial
300+
3. Network compression (`--compress-level-network=1`) doesn't seem to be providing a significant improvement on fast networks (10+ Gbps). Use it for slower networks (&lt;10 Gbps) where it can be more beneficial
301301
4. Consider using `renice` on the source server if CPU contention affects production workload
302302
5. Ensure sufficient I/O capacity on the destination to handle parallel writes
303303
6. For high parallelism (64+), increase SSH limits: `MaxStartups=200:30:300` and `MaxSessions=200` in `/etc/ssh/sshd_config`. Alternatively, SSH ControlMaster creates a single persistent connection that all subsequent SSH sessions multiplex through — we haven't tested this approach yet, but it's worth exploring for reducing connection overhead at high parallelism levels

bun.lock

Lines changed: 950 additions & 1580 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dblab-howtos/administration/ci-observer-postgres-log-masking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Replacement rules are applied to all log fields of the incoming PostgreSQL CSV l
5656
## Regular expressions
5757
The syntax of the regular expressions accepted is the same general syntax used by Perl, Python, and other languages. You can find syntax details here: https://github.com/google/re2/wiki/Syntax.
5858

59-
In a template, a variable is denoted by a substring of the form $name or ${name}, where name is a non-empty sequence of letters, digits, and underscores.
60-
A purely numeric name like `$1` refers to a submatch with the corresponding index; other names refer to capturing parentheses named with the `(?P<name>...)` syntax.
59+
In a template, a variable is denoted by a substring of the form `$name` or `${name}`, where name is a non-empty sequence of letters, digits, and underscores.
60+
A purely numeric name like `$1` refers to a submatch with the corresponding index; other names refer to capturing parentheses named with the `(?P<name>...)` syntax.
6161
A reference to an out-of-range or unmatched index or a name that is not present in the regular expression is replaced by an empty string.
6262

6363
To insert a literal `$` in the output, use `$$` in the template.

docs/reference-guides/database-lab-engine-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The clone's container name is associated with its port number, such as `dblab_cl
2929

3030
#### Container labels
3131
- `dblab_clone`
32-
- <pool_name>
32+
- `<pool_name>`
3333

3434
#### Responsibility
3535
- Provides a thin clone: an independent PostgreSQL database server with thinly cloned / branched data directory

docusaurus.config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ module.exports = {
3939
organizationName: 'postgres-ai',
4040
projectName: 'docs',
4141

42+
// Use CommonMark for .md files to avoid MDX parsing issues
43+
markdown: {
44+
format: 'detect',
45+
},
46+
4247
customFields: {
4348
signInUrl: SIGN_IN_URL,
4449
apiUrlPrefix: API_URL_PREFIX,
@@ -379,8 +384,8 @@ module.exports = {
379384
},
380385

381386
prism: {
382-
theme: require('prism-react-renderer/themes/nightOwlLight'),
383-
darkTheme: require('prism-react-renderer/themes/nightOwl'),
387+
theme: require('prism-react-renderer').themes.nightOwlLight,
388+
darkTheme: require('prism-react-renderer').themes.nightOwl,
384389
},
385390
},
386391

@@ -605,6 +610,7 @@ module.exports = {
605610
showReadingTime: true,
606611
editUrl: 'https://gitlab.com/postgres-ai/docs/-/edit/master/',
607612
path: 'blog',
613+
onInlineTags: 'ignore',
608614
routeBasePath: 'blog',
609615
postsPerPage: 10,
610616
blogSidebarTitle: 'Categories',

0 commit comments

Comments
 (0)