Skip to content

Commit 6ebce05

Browse files
committed
fix: replace build-time OG generation with docs-og microservice
1 parent f723ce3 commit 6ebce05

352 files changed

Lines changed: 230 additions & 370 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/content/quickstart/quickstart-going-further.mdx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
---
2-
title: Make it yours
2+
title: Deploy Your First App
33
description: Swap the recipe for your own code, deploy the feedback app, and connect GitHub for auto-deploy.
4-
sidebar_label: Make it yours
5-
sidebar_class_name: hidden
6-
slug: /quickstart/quickstart-going-further
7-
unlisted: true
4+
sidebar_label: Deploy Your First App
5+
slug: /quickstart/deploy-your-first-app
6+
87
custom_edit_url: null
98
---
109

1110
import Tabs from '@theme/Tabs';
1211
import TabItem from '@theme/TabItem';
1312

14-
The guided part ends here. Everything below is for when you're ready to swap this recipe for your own code, the feedback app we showed you in the quickstart, or whatever you're building.
13+
You've got a live app running on Zerops. Now let's make it actually yours.
14+
15+
This page walks you through deploying the feedback app we showed you at the top of the quickstart - a Node.js app with a PostgreSQL database, auto-deploy on every git push, and a wall of everyone who's made it through. If you'd rather skip straight to your own code, there's a note at the bottom for that.
1516

1617
### Deploy the feedback app
1718

@@ -443,7 +444,7 @@ Variable names are derived from your database service hostname. If your db servi
443444
</Tabs>
444445

445446
:::tip Debug locally with VPN
446-
Install zcli first (see [CLI reference](/references/cli)), then run `zcli vpn up [your-project-id]` and your laptop joins the project's private network. You can connect to `db:5432` directly from your local machine using TablePlus, psql, or any database client. Disable SSL when connecting over VPN, security is handled by the tunnel itself. If `db` doesn't resolve, try `db.zerops` instead.
447+
Install zcli first (see [CLI reference](/references/cli)), then run `zcli vpn up [your-project-id]` and your machine joins the project's private network. You can connect to `db:5432` directly from your local machine using TablePlus, psql, or any database client. You can disable SSL when connecting over VPN - the tunnel itself handles security either way. If `db` doesn't resolve, try `db.zerops` instead.
447448
:::
448449

449450
### What's next

apps/docs/content/quickstart/quickstart.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ When you're ready for production, point a custom domain at your app. Zerops hand
9999
Here's what's running:
100100

101101
- A real app on production infrastructure
102-
- A managed PostgreSQL database with no setup, no connection strings, no SDK
102+
- A managed PostgreSQL database, ready to use
103103
- All services on a private network, secure by default
104-
- Full Linux containers you can SSH into and install anything on
104+
- Full Linux containers for your app — SSH in anytime, install anything
105105

106106
None of the infrastructure needed manual configuration.
107107

@@ -111,4 +111,6 @@ Jump into the [Zerops Discord](https://docs.zerops.io/discord). The community is
111111

112112
---
113113

114-
Ready to swap the recipe for your own code or deploy the feedback app we showed you at the top? [Make it yours →](/quickstart/quickstart-going-further)
114+
Your app is live and the infrastructure is running.
115+
116+
**Next up:** Swap the recipe for the feedback app we showed you, connect GitHub for auto-deploy, and add yourself to the wall. [Deploy your first app →](/quickstart/deploy-your-first-app)

apps/docs/docusaurus.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const config = {
3131
],
3232
plugins: [
3333
'./src/plugins/markdown-source',
34-
'./src/plugins/og-images',
3534
require.resolve("docusaurus-plugin-image-zoom"),
3635
async function tailwindPlugin() {
3736
return {

apps/docs/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"lint": "eslint --ext .js,.jsx,.ts,.tsx . --fix",
1818
"lint:content": "eslint --no-eslintrc -c .content.eslintrc.js content --fix",
1919
"diagram2code:generate": "docusaurus diagram2code:generate",
20-
"generate:og": "tsx scripts/generate-og.ts",
2120
"test": "node --test src/plugins/markdown-source/__tests__/*.test.js"
2221
},
2322
"dependencies": {
@@ -74,11 +73,9 @@
7473
"@docusaurus/module-type-aliases": "3.4.0",
7574
"@docusaurus/tsconfig": "3.4.0",
7675
"@docusaurus/types": "3.4.0",
77-
"@resvg/resvg-js": "^2.6.2",
7876
"@types/react": "^18.2.0",
7977
"@types/react-dom": "^18.2.0",
8078
"@types/react-transition-group": "^4.4.6",
81-
"satori": "^0.12.2",
8279
"swc-loader": "^0.2.3",
8380
"typescript": "~5.2.2"
8481
},

apps/docs/scripts/generate-og.ts

Lines changed: 0 additions & 217 deletions
This file was deleted.

apps/docs/sidebars.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,23 @@ module.exports = {
2727
className: 'homepage-sidebar-item',
2828
},
2929
{
30-
type: 'doc',
31-
id: 'quickstart/quickstart',
30+
type: 'category',
3231
label: 'Quickstart',
32+
link: {
33+
type: 'doc',
34+
id: 'quickstart/quickstart',
35+
},
3336
customProps: {
3437
sidebar_icon: 'rocket-launch',
3538
},
3639
className: 'homepage-sidebar-item',
40+
items: [
41+
{
42+
type: 'doc',
43+
id: 'quickstart/quickstart-going-further',
44+
label: 'Deploy Your First App',
45+
},
46+
],
3747
},
3848
{
3949
type: 'html',
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
'use strict';
2+
3+
const test = require('node:test');
4+
const assert = require('node:assert/strict');
5+
const {
6+
sourceToRelativePath,
7+
normalizePermalinkKey,
8+
permalinkToDestRelative,
9+
buildPermalinkToSourceMap,
10+
} = require('../index');
11+
12+
test('sourceToRelativePath strips @site/content/ prefix', () => {
13+
assert.equal(
14+
sourceToRelativePath('@site/content/quickstart/quickstart-going-further.mdx'),
15+
'quickstart/quickstart-going-further.mdx',
16+
);
17+
});
18+
19+
test('normalizePermalinkKey handles custom slug .md URLs', () => {
20+
assert.equal(
21+
normalizePermalinkKey('/quickstart/deploy-your-first-app.md'),
22+
'/quickstart/deploy-your-first-app',
23+
);
24+
assert.equal(normalizePermalinkKey('/.md'), '/');
25+
assert.equal(normalizePermalinkKey('/guides/backup/'), '/guides/backup');
26+
});
27+
28+
test('permalinkToDestRelative maps homepage and nested paths', () => {
29+
assert.equal(permalinkToDestRelative('/'), '.md');
30+
assert.equal(
31+
permalinkToDestRelative('/quickstart/deploy-your-first-app'),
32+
'quickstart/deploy-your-first-app.md',
33+
);
34+
});
35+
36+
test('buildPermalinkToSourceMap uses doc permalink, not file path', () => {
37+
const map = buildPermalinkToSourceMap(
38+
{
39+
'docusaurus-plugin-content-docs': {
40+
default: {
41+
loadedVersions: [
42+
{
43+
docs: [
44+
{
45+
permalink: '/quickstart/deploy-your-first-app',
46+
source:
47+
'@site/content/quickstart/quickstart-going-further.mdx',
48+
},
49+
{
50+
permalink: '/quickstart/quickstart',
51+
source: '@site/content/quickstart/quickstart.mdx',
52+
},
53+
],
54+
},
55+
],
56+
},
57+
},
58+
},
59+
'/',
60+
);
61+
62+
assert.equal(
63+
map['/quickstart/deploy-your-first-app'],
64+
'quickstart/quickstart-going-further.mdx',
65+
);
66+
assert.equal(map['/quickstart/quickstart'], 'quickstart/quickstart.mdx');
67+
});

0 commit comments

Comments
 (0)