Skip to content
Merged
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
7 changes: 2 additions & 5 deletions .github/workflows/lost-pixel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ jobs:
run: npm install

- name: Build docs
run: npm run clean & npm run build
run: npm run clean && npm run build

- name: Start docs
run: npm run serve &

- name: Generate sitemap
run: npx lost-pixel page-sitemap-gen http://172.17.0.1:3000/sitemap.xml "./lost-pixel-pages.json"

- name: Edit sitemap urls
run: sed -i -e 's|"/docs|"|g' lost-pixel-pages.json

- name: Edit page names
run: sed -i -e 's/_/\//g' -e 's|prisma\.io\/docs||g' -re 's/(name.+)(\/)(\")/\1-\3/g' lost-pixel-pages.json
run: sed -i -e 's/_/\//g' -e 's|prisma\.io||g' -re 's/(name.+)(\/)(\")/\1-\3/g' lost-pixel-pages.json

- name: Lost Pixel
uses: lost-pixel/lost-pixel@v3.16.0
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const config: Config = {
url: 'https://www.prisma.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
baseUrl: process.env.DOCUSAURUS_BASE_URL ?? '/',

trailingSlash: false,
onBrokenLinks: 'warn',
Expand Down
78 changes: 39 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build && sed -re 's|(prisma\\.io)|\\1/docs|g' build/sitemap.xml > build/sitemap.xml.tmp && mv build/sitemap.xml.tmp build/sitemap.xml",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"deploy": "npm run build && wrangler pages deploy ./build",
"clean": "docusaurus clear",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc",
"pages:dev": "wrangler pages dev --compatibility-date=2024-01-17 --proxy 3000 -- npm run start",
"pages:deploy": "npm run build && wrangler pages deploy ./build"
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^3.1.1",
Expand All @@ -37,7 +35,7 @@
"@docusaurus/tsconfig": "^3.1.1",
"@docusaurus/types": "^3.1.1",
"typescript": "~5.2.2",
"wrangler": "^3.28.2"
"wrangler": "^3.48.0"
},
"browserslist": {
"production": [
Expand Down
10 changes: 10 additions & 0 deletions wrangler.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Generated by Wrangler on Fri Apr 05 2024 19:27:05 GMT-0500 (Central Daylight Time)
name = "docs"
pages_build_output_dir = "build"
compatibility_date = "2024-03-18"

[vars]
DOCUSAURUS_BASE_URL='/'

[env.production.vars]
DOCUSAURUS_BASE_URL='/docs/'