Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docusaurus: feat:DA-250 improve 404 page #5834

Closed
wants to merge 171 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
cba17c1
base docusaurus project
jharrell Feb 13, 2024
581df74
Add ORM docs (#5635)
jharrell Feb 14, 2024
bbd1776
enable "docs only" mode (#5636)
jharrell Feb 14, 2024
5abef8d
Deploy docusaurus to cloudflare pages (#5637)
jharrell Feb 14, 2024
4b94d1f
quick tweak
jharrell Feb 14, 2024
0132e31
add accelerate docs and organize static imports (#5641)
jharrell Feb 15, 2024
20e2c22
add pulse and platform docs (#5642)
jharrell Feb 15, 2024
1131d4e
Docusaurus-add-about-docs (#5643)
jharrell Feb 15, 2024
bb97d04
Docusaurus: add getting started docs (#5648)
jharrell Feb 16, 2024
d2a9790
Docusaurus: Update navbar (#5655)
jharrell Feb 20, 2024
336a08d
Docusaurus: update footer (#5662)
jharrell Feb 20, 2024
93785db
Docusaurus: make parallel blocks functional (#5663)
jharrell Feb 20, 2024
b1ff4ae
Docusaurus: styling the layout (#5672)
carlagn Feb 22, 2024
3d8f18f
Docusaurus: merge in Prisma ORM name change (#5671)
jharrell Feb 22, 2024
c6a5d95
update mobile layout for navbars (#5682)
carlagn Feb 29, 2024
679ae93
Docusaurus: fix sidebars (#5689)
jharrell Mar 2, 2024
965415d
Docusaurus: add gtag and gtm (#5691)
jharrell Mar 4, 2024
48bd961
feat: docusaurus homepage (#5688)
carlagn Mar 4, 2024
12cc907
fixed
jharrell Mar 4, 2024
75d13c7
revert tsx icons to use svg files (#5694)
carlagn Mar 4, 2024
8bdf781
(docusaurus) fix: Split homepage section into homepageFeatures (#5695)
carlagn Mar 4, 2024
dbbddd0
Docusaurus: generate sitemap (#5704)
jharrell Mar 8, 2024
22e2184
Docusaurus: update algolia app (#5754)
jharrell Mar 27, 2024
fbf4baf
fix: (docusaurus) fix remaining UI (#5755)
carlagn Mar 28, 2024
d4230ff
update menu padding
carlagn Mar 28, 2024
b8f355b
update footer links
carlagn Mar 28, 2024
27b35e8
feat: techswitcher page poc (#5740)
carlagn Mar 28, 2024
3b2e431
update footer icons
carlagn Mar 28, 2024
bbd4115
revert color of menu__link
carlagn Mar 28, 2024
9e53943
update theming name
carlagn Mar 28, 2024
898f4e5
update admonition
carlagn Mar 28, 2024
3d19fdb
update tabs width
carlagn Mar 28, 2024
d891b30
fix: Continuing ui fixes (#5757)
carlagn Mar 28, 2024
6be2984
feat: (docusaurus) Footer newsletter (#5756)
carlagn Mar 28, 2024
dc9fe64
hide all results
carlagn Mar 28, 2024
ac4de2e
hide all results
carlagn Mar 28, 2024
c82129e
Add robots.txt and Prisma syntax highlighting. (#5758)
jharrell Mar 28, 2024
4263af9
Docusaurus: more random things (#5759)
jharrell Mar 29, 2024
434ec0c
revert baseUrl change
jharrell Mar 29, 2024
fb17ffb
Docusaurus: don't use styled-components on homepage (#5760)
jharrell Apr 1, 2024
e095ab2
Docusaurus: Fix links on getting started page (#5763)
jharrell Apr 1, 2024
3edb5f3
Docusaurus: Feat/da 139 finish tech switcher (#5762)
carlagn Apr 1, 2024
3404db8
Revert "Docusaurus: Feat/da 139 finish tech switcher" (#5764)
jharrell Apr 1, 2024
fb25c4f
Revert "Revert "Docusaurus: Feat/da 139 finish tech switcher"" (#5765)
jharrell Apr 1, 2024
5d6012f
fix some issues from recent feedback (#5766)
carlagn Apr 1, 2024
44feea3
update tabbed content styling
carlagn Apr 1, 2024
bbf9979
Docusaurus: add sass plugin (#5767)
jharrell Apr 1, 2024
d084cd8
update table widths
carlagn Apr 1, 2024
7f2e013
Docusaurus: migrate homepage css to sass (#5768)
jharrell Apr 1, 2024
8f5c4d4
remove all references to styled-components (#5770)
carlagn Apr 1, 2024
1f97e19
Docusaurus: fix image links (#5772)
jharrell Apr 1, 2024
4949d49
Docusaurus: add topblock back (#5771)
jharrell Apr 1, 2024
b80c322
Docusaurus: issues from review (#5774)
jharrell Apr 1, 2024
0c93d3f
update footer on mobile (#5776)
carlagn Apr 2, 2024
47667a2
update pages with hide_toc (#5769)
carlagn Apr 2, 2024
a839504
update font size for preview badge (#5779)
carlagn Apr 2, 2024
64f8124
add external link svg (#5777)
carlagn Apr 2, 2024
5f1c49c
update top position of arrow for collapsible box (#5780)
carlagn Apr 2, 2024
378fff0
Docusaurus: fix:DA-167 remove last breadcrumb (#5782)
carlagn Apr 2, 2024
e032bb5
update spacing on main element
carlagn Apr 2, 2024
50346f9
update width of code blocks and admonition blocks (#5773)
carlagn Apr 2, 2024
556466d
remove mobile padding
carlagn Apr 2, 2024
b445ced
update subsections components (#5783)
carlagn Apr 2, 2024
9984991
Docusarusu: fix:DA-175 mobile sidebar (#5784)
carlagn Apr 2, 2024
6bd380a
Trigger Build
carlagn Apr 2, 2024
4a26e53
revert external icon
carlagn Apr 2, 2024
4bfb963
update font size for badge
carlagn Apr 2, 2024
ddcc00b
update zindex of search
carlagn Apr 2, 2024
97fccb9
update collapsible box
carlagn Apr 2, 2024
fa503a6
update collapsible box
carlagn Apr 2, 2024
6a5dabf
attempt update on mdx link
carlagn Apr 2, 2024
02e1d46
update link
carlagn Apr 2, 2024
e0e1525
add link
carlagn Apr 2, 2024
04a779b
add link
carlagn Apr 2, 2024
264a670
update underline links
carlagn Apr 2, 2024
c0ac61d
Docusaurus: introduce _redirects file (#5775)
jharrell Apr 2, 2024
d134fef
add missing header/top section on pages (#5786)
carlagn Apr 2, 2024
e2796b3
add missing header/top section on pages (#5786) (#5787)
carlagn Apr 2, 2024
bb0852e
update getting started tab
carlagn Apr 2, 2024
5fe9f7c
update code block bg
carlagn Apr 2, 2024
48faf62
remove extra padding-top from pre
carlagn Apr 2, 2024
f01aa1d
update styling of cards at homepage (#5788)
carlagn Apr 2, 2024
629c7e0
remove margin on h1
carlagn Apr 2, 2024
5a62be6
Idea 1: move everything under 'docs'
jharrell Apr 2, 2024
c0938df
Idea 2: try baseUrl again
jharrell Apr 2, 2024
a6996de
Revert "Idea 2: try baseUrl again"
jharrell Apr 2, 2024
7e0a928
try Idea 2 again
jharrell Apr 3, 2024
606bf4f
revert ideas around path issues
jharrell Apr 3, 2024
4519050
fix codeblock issues (#5793)
carlagn Apr 3, 2024
68f4e73
add missing theme
carlagn Apr 3, 2024
ae26876
update themings
carlagn Apr 3, 2024
2e456a1
revert json to json5 (#5795)
carlagn Apr 3, 2024
f446ce8
Docusaurus: remove docs substring in search results (#5789)
jharrell Apr 3, 2024
b3ec13d
update pagination_next for techswitcher files (#5796)
carlagn Apr 3, 2024
a8b9421
update docs footer
carlagn Apr 3, 2024
f2d30a8
update code in anchor link
carlagn Apr 3, 2024
53b2140
Docusaurus: serve docs content from... content (#5803)
jharrell Apr 3, 2024
a7d2fd9
Docusaurus: lost pixel (#5797)
jharrell Apr 4, 2024
865b67f
DA-118: fix repeated link on subsection
carlagn Apr 4, 2024
bcd95f4
DA-128: update landing page gradients
carlagn Apr 4, 2024
bb80a7d
DA-149: fix tables inside tab containers
carlagn Apr 4, 2024
149e798
DA-187: fix subsections
carlagn Apr 4, 2024
9cbd789
DA-184: linking from getting-started
carlagn Apr 4, 2024
3a9bcec
update font size
carlagn Apr 4, 2024
87856b5
update text size adjust
carlagn Apr 4, 2024
d5d04a0
update admonition
carlagn Apr 4, 2024
f22f36a
Docusaurus: fix:DA-199 update code highlighting name (#5794)
carlagn Apr 4, 2024
7e00317
Revert "Docusaurus: fix:DA-199 update code highlighting name (#5794)"…
carlagn Apr 4, 2024
b9477c3
Docusaurus: start work on more github actions (#5809)
jharrell Apr 4, 2024
133db47
Revert "Revert "Docusaurus: fix:DA-199 update code highlighting name"…
carlagn Apr 4, 2024
651b01d
update pre block padding
carlagn Apr 4, 2024
d63876d
Docusaurus: adds back image optimization GHA (#5813)
jharrell Apr 4, 2024
866b246
Docusaurus: add og image (#5812)
jharrell Apr 4, 2024
335216e
Docusaurus: correct broken image links (#5814)
jharrell Apr 5, 2024
7cd3ee9
update icon size for admonition blocks
carlagn Apr 5, 2024
e25b699
update icon size for admonition blocks
carlagn Apr 5, 2024
bbae6a6
update heading for admonition
carlagn Apr 5, 2024
e4d3c8f
update admonition
carlagn Apr 5, 2024
78cba63
try to add br
carlagn Apr 5, 2024
7a3517d
fix dark highlight on code label for toc element (#5816)
carlagn Apr 5, 2024
8bd9043
update code font size for headings
carlagn Apr 5, 2024
a0c1153
Docusaurus: Fix/da 199 code highlight (#5817)
meletj Apr 5, 2024
ba65477
try to fix tables
carlagn Apr 5, 2024
c6f1b3c
fix extra padding
carlagn Apr 5, 2024
b482618
Docusaurus: rebase docs from main (#5818)
jharrell Apr 5, 2024
9ec8a9e
some fixes
carlagn Apr 5, 2024
2f036cc
update language-terminal
carlagn Apr 5, 2024
f33e0fb
category for pulse
carlagn Apr 5, 2024
aca00bf
update docusaurus + usage of
carlagn Apr 5, 2024
768a001
update docu
carlagn Apr 5, 2024
16b7796
update some shell to bash codeblocks
carlagn Apr 5, 2024
8587346
Docusaurus: sitemap work + remove old markdown page (#5819)
jharrell Apr 5, 2024
9c046a2
correct sitemap sed command
jharrell Apr 5, 2024
dfc1b85
Fix/da 222/admonitions (#5820)
meletj Apr 5, 2024
3952d45
Docusaurus: lots of little feedback(s) (#5822)
jharrell Apr 6, 2024
3b83f69
update wrangler and add wrangler.toml (#5824)
jharrell Apr 6, 2024
1e5192a
change production baseUrl for now
jharrell Apr 6, 2024
3a5f6fe
bump docusaurus versions
jharrell Apr 7, 2024
a980003
update bash type codeblock
carlagn Apr 8, 2024
527e2bb
DA-221: fix code blocks
carlagn Apr 8, 2024
c11e879
DA-221: fix center alignment and consequent code block issues
carlagn Apr 8, 2024
5dd6cf7
fix cli
carlagn Apr 8, 2024
5416812
DA-246: center video
carlagn Apr 8, 2024
88cd395
DA-239: add prop to blockcontent
carlagn Apr 8, 2024
050e77a
DA-236: update output name of cmdresult
carlagn Apr 8, 2024
cc77784
DA-235: update spacing on cmdresults
carlagn Apr 8, 2024
1aa617c
DA-247: fix cmd result inside tabs container
carlagn Apr 8, 2024
731f2f0
DA-249: add margin to top main content on index page
carlagn Apr 8, 2024
fc85a4e
DA-248: fix blockquote border
carlagn Apr 8, 2024
274621b
Docusarus: fix:DA-205 QA pagespeed performance (#5828)
carlagn Apr 8, 2024
a65315f
update icon and toc padding
carlagn Apr 8, 2024
7aa948d
DA-234:Fix ui for collapsible blocks
carlagn Apr 8, 2024
5f5815b
DA-243: fix code with result query colors
carlagn Apr 8, 2024
7b77a28
update prism file
carlagn Apr 8, 2024
786a6a3
update highlight color
carlagn Apr 8, 2024
6d5731d
update code with result specific margin
carlagn Apr 8, 2024
f5edbca
update seeding page tabs
carlagn Apr 8, 2024
59b88b9
remove border from collapsible
carlagn Apr 8, 2024
374d788
DA-256: fix image width
carlagn Apr 8, 2024
aba1def
fixes (#5832)
meletj Apr 8, 2024
9889f6e
initial stage 404
carlagn Apr 8, 2024
df5654a
Fix/mongo db guide (#5833)
meletj Apr 8, 2024
dee403a
Docusaurus: fix broken links and throw on broken links (#5829)
jharrell Apr 8, 2024
b89b97e
update padding on pages
carlagn Apr 9, 2024
1273d1d
DA-266: update weird customprops on footer
carlagn Apr 9, 2024
a3d719c
DA-265: update icon for sqlserver
carlagn Apr 9, 2024
a271cff
Merge branch 'docusaurus' into docusaurus-feat/DA-250-improve-404-page
carlagn Apr 9, 2024
df56550
remove duplicate fonts and update font-faces (#5839)
carlagn Apr 9, 2024
7d0502b
Merge branch 'docusaurus' into docusaurus-feat/DA-250-improve-404-page
carlagn Apr 9, 2024
844e52a
update blog link
carlagn Apr 9, 2024
c191354
update font-family
carlagn Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Editor config
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 100
trim_trailing_whitespace = true

[*.{md,mdx}]
insert_final_newline = false
trim_trailing_whitespace = false
8 changes: 0 additions & 8 deletions .env.example

This file was deleted.

11 changes: 0 additions & 11 deletions .flycode.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/image-optimise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
github.event.pull_request.head.repo.full_name == github.repository)
steps:
- name: Checkout Branch
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Compress Images
id: calibre
Expand All @@ -51,7 +51,7 @@ jobs:
if: |
github.event_name != 'pull_request' &&
steps.calibre.outputs.markdown != ''
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v6.0.2
with:
title: Auto Compress Images
branch-suffix: timestamp
Expand Down
117 changes: 40 additions & 77 deletions .github/workflows/list-changed-pages.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,62 @@
name: Comment based on changed pages (Vercel Deploy URLs + Redirect Suggestions)

name: List Changed Pages
on:
pull_request:
branches:
- main
- docusaurus
paths:
- 'content/**/*'

jobs:
post-comment-with-links-to-changed-pages:
name: Create or Update
post-files-changed-comment:
name: 'Post files changed comment'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get list of changed files
id: files
uses: Ana06/[email protected] # it's a fork of jitterbit/get-changed-files@v1 which works better with pull requests
- name: List Vercel Deploy URLs
id: links
# Note that this uses `%0A` instead of `\n` because of https://github.com/peter-evans/create-or-update-comment#setting-the-comment-body-from-a-file which I could not get to work here - but this brute force method does.
run: |
body="This PR changes the following pages (Vercel Preview Deploy links):%0A%0A"
no_changed_pages="%0A- This PR does not change any pages the [GH Actions workflow](https://github.com/prisma/docs/blob/main/.github/workflows/list-changed-pages.yml) could detect."
vercelLinks="Changed Vercel links"
body="$body%0A%0A$vercelLinks"
for changed_file in ${{ steps.files.outputs.all }}; do
if [[ $changed_file == content/* ]]
then
no_changed_pages=""

cleaned_file=$(echo "$changed_file" | sed -E 's:content/:/:g' | sed -E 's:/index.mdx::g' | sed -e 's/.mdx//g' | sed -E 's:/[0-9]+-:/:g' )
branch_name=$(echo "${{github.event.pull_request.head.ref}}" | sed -e 's/\//-/g')
# TODO special case for images and similar non .mdx files

# Output inside the action
echo "- https://docs-git-${branch_name}-prisma.vercel.app$cleaned_file"
- uses: actions/checkout@v4

# Also collect into string
linksVercel="%0A- [/docs$cleaned_file](https://docs-git-${branch_name}-prisma.vercel.app$cleaned_file) ([currently](https://prisma.io/docs$cleaned_file))"
body="$body$linksVercel"
fi
done

body="$body$no_changed_pages"
body="$body%0A%0A(Note that links will only be valid after Vercel preview deploy succeeded)"
echo "::set-output name=body::$body"

- name: Find existing comment (links)
uses: peter-evans/find-comment@v1
id: fc
- name: Get all changed markdown files
id: changed-files
uses: tj-actions/changed-files@v44
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: following pages
files: content/**/*.{md,mdx}

- name: Create comment (links)
if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: ${{ steps.links.outputs.body }}

- name: Update comment (links)
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body: ${{ steps.links.outputs.body }}
edit-mode: replace

### REDIRECTS ###

- name: Create suggested redirects
id: redirects
- name: Build comment body
id: build-comment-body
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.any_changed }}
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
bash .github/workflows/scripts/generate-redirects.sh

- name: Find existing comment (redirects)
OUTPUT=""
if [ ${CHANGED_FILES} == 'true' ]; then
OUTPUT="| original | preview |%0A| ------ | ------ |%0A"
for file in ${ALL_CHANGED_FILES}
do
OUTPUT+="| ${file} | |%0A"
done
else
OUTPUT="No files changed."
fi
echo "::set-output name=body::$OUTPUT"

- name: Find existing comment
uses: peter-evans/find-comment@v1
id: fc2
id: find-existing
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: following redirects
body-includes: 'original | preview'

- name: Create comment (redirects)
if: steps.fc2.outputs.comment-id == ''
- name: Create comment
if: steps.find-existing.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: ${{ steps.redirects.outputs.body }}
body: ${{ steps.build-comment-body.outputs.body }}

- name: Update comment (redirects)
if: steps.fc2.outputs.comment-id != ''
- name: Update comment
if: steps.find-existing.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc2.outputs.comment-id }}
body: ${{ steps.redirects.outputs.body }}
comment-id: ${{ steps.find-existing.outputs.comment-id }}
body: ${{ steps.build-comment-body.outputs.body }}
edit-mode: replace
49 changes: 22 additions & 27 deletions .github/workflows/lost-pixel.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
---
name: LostPixel

name: 'Lost Pixel'
on: [push]

jobs:
gatsby-for-percy:
name: Lost Pixel screenshots via Gatsby build
build:
runs-on: ubuntu-latest
name: Lost Pixel

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: '14'
- run: npm ci
- name: Caching Gatsby
id: gatsby-cache-build
uses: actions/cache@v2
with:
path: public
.cache
key: ${{ runner.os }}-gatsby-build-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Build Gatsby app
run: npx gatsby build --prefix-paths
env:
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
CI: true
node-version: 18

- name: Install deps
run: npm install

- name: Build docs
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: Run Gatsby app
run: npx gatsby serve --host 172.17.0.1 &
- name: Edit page names
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.4.4
uses: lost-pixel/lost-pixel@v3.16.0
env:
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }}
36 changes: 0 additions & 36 deletions .github/workflows/notion.yml

This file was deleted.

18 changes: 9 additions & 9 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
name: 'Docs: Spellcheck'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Check out the code
- uses: actions/setup-node@v1
name: Setup node
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm install -g cspell
name: Install cSpell
- run: cspell --config ./cSpell.json "content/**/*.mdx" --no-progress
name: Run cSpell
node-version: 18

- name: Install cSpell
run: npm install -g cspell

- name: Run cSpell
run: cspell --config ./cSpell.json "content/**/*.mdx" --no-progress
Loading