diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..5aea5e4c32 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +content/* @prisma/dev-advocates-write diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..3ba13e0cec --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/doc_request.md b/.github/ISSUE_TEMPLATE/doc_request.md new file mode 100644 index 0000000000..b80d4b4fc8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/doc_request.md @@ -0,0 +1,6 @@ +--- +name: ✍ Documentation request or bug +about: Report a content issue (incorrect content, spelling mistake, broken link), request new content, or suggest an improvement. +labels: 'docs' +assignees: '' +--- diff --git a/.github/ISSUE_TEMPLATE/website_request.md b/.github/ISSUE_TEMPLATE/website_request.md new file mode 100644 index 0000000000..2614313882 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/website_request.md @@ -0,0 +1,5 @@ +--- +name: ✨ Doc site request or bug +about: Request a website feature or improvement, or report a bug. For documentation, please use documentation request. +labels: 'website' +--- diff --git a/.github/ISSUE_TEMPLATE/z_doc_release.md b/.github/ISSUE_TEMPLATE/z_doc_release.md new file mode 100644 index 0000000000..8c3bc9a5d3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/z_doc_release.md @@ -0,0 +1,18 @@ +--- +name: 🎉 Documentation release +about: INTERNAL ONLY. Documentation release tasks. +title: 'Release:' +labels: 'docs,docs/task' +assignees: '' +--- + +## Release + +- [ ] Merge in new content +- [ ] Update 'What's new' page with links to the release notes and new docs (example: https://www.prisma.io/docs/about/whats-new-in-prisma-docs#april-04-2021) +- [ ] Add links to release notes + +## After release + +- [ ] Add the 'What's new' video +- [ ] Clean up milestone diff --git a/.github/workflows/list-changed-pages.yml b/.github/workflows/list-changed-pages.yml new file mode 100644 index 0000000000..22a1e11ccd --- /dev/null +++ b/.github/workflows/list-changed-pages.yml @@ -0,0 +1,62 @@ +name: List Changed Pages +on: + pull_request: + branches: + - main + - docusaurus + paths: + - 'content/**/*' + +jobs: + post-files-changed-comment: + name: 'Docs: Spellcheck' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Get all changed markdown files + id: changed-files + uses: tj-actions/changed-files@v44 + with: + files: content/**/*.{md,mdx} + + - 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: | + 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: find-existing + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: 'original | preview' + + - 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.build-comment-body.outputs.body }} + + - name: Update comment + if: steps.find-existing.outputs.comment-id != '' + uses: peter-evans/create-or-update-comment@v1 + with: + comment-id: ${{ steps.find-existing.outputs.comment-id }} + body: ${{ steps.build-comment-body.outputs.body }} + edit-mode: replace diff --git a/.github/workflows/lost-pixel.yml b/.github/workflows/lost-pixel.yml index 8e03709c4b..d61c999c2a 100644 --- a/.github/workflows/lost-pixel.yml +++ b/.github/workflows/lost-pixel.yml @@ -1,3 +1,4 @@ +name: 'Lost Pixel' on: [push] jobs: diff --git a/.github/workflows/scripts/generate-redirects.sh b/.github/workflows/scripts/generate-redirects.sh new file mode 100644 index 0000000000..990e734f66 --- /dev/null +++ b/.github/workflows/scripts/generate-redirects.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +body="This PR probably requires the following redirects to be added to vercel.json:%0A%0A" +no_changed_pages="%0A- This PR does not change any pages in a way that would require a redirect." + +echo $GITHUB_BASE_REF +git status -s +git fetch +git reset --soft origin/$GITHUB_BASE_REF +git status -s +status=$(git status -s) + +while IFS= read -r line +do + # Split line into parts + IFS=' ' + read -ra values <<< "$line" + # for value in "${values[@]}"; do + # echo "$value" + # done + + # Skip if line does not indicate modification or rename + if [[ "${values[0]}" != "D" && "${values[0]}" != "R" ]]; then + continue + fi + + # Delete msg for no edited pages and start code block + if [ -n "$no_changed_pages" ]; then + no_changed_pages="" + body="$body""\`\`\`%0A" + fi + + # name pieces (and replace `/index` from files (to get to a filename that would be equivalent)) + action=${values[0]} + path1=$(echo "${values[1]}" | sed -e 's#/index##g' ) + path2=$(echo "${values[3]}" | sed -e 's#/index##g' ) + + # Skip if file names are identical (probably via `/index` replacement above) + if [[ "$path1" == "$path2" ]]; then + continue + fi + + # clean paths + path1_cleaned=$(echo "$path1" | sed -E 's:content/:/:g' | sed -e 's/.mdx//g' | sed -E 's:/[0-9]+-:/:g' ) + path2_cleaned=$(echo "$path2" | sed -E 's:content/:/:g' | sed -e 's/.mdx//g' | sed -E 's:/[0-9]+-:/:g' ) + + # special case for deletion + if [[ "${values[0]}" == "D" ]]; then + path2_cleaned="/##( TODO: Path of page that replaces deleted page )##" + fi + + redirect=$(cat <<-END + { + "source": "/docs$path1_cleaned", + "destination": "/docs$path2_cleaned" + }, + +END +) + echo $redirect + echo "" + body="$body$redirect%0A" + + #echo "foo" + + +done < <(printf '%s\n' "$status") + +body="$body$no_changed_pages" +body=$(echo "$body" | sed ':a;N;$!ba;s/\n/%0A/g') +echo $body + +echo "::set-output name=body::$body" + diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 0000000000..da289269f5 --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,28 @@ +name: Documentation Checks + +on: + push: + branches: + - main + paths: + - 'content/**/*' + pull_request: + branches: + - main + paths: + - 'content/**/*' +jobs: + spellcheck: + name: 'Docs: Spellcheck' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install cSpell + run: npm install -g cspell + + - name: Run cSpell + run: cspell --config ./cSpell.json "content/**/*.mdx" --no-progress diff --git a/cSpell.json b/cSpell.json new file mode 100644 index 0000000000..fc82d6459f --- /dev/null +++ b/cSpell.json @@ -0,0 +1,152 @@ +{ + "version": "0.2", + "language": "en", + "words": [ + "Amplication", + "Autoincrementing", + "baselined", + "Baselining", + "cockroachdb", + "codemod", + "codemods", + "datamodel", + "datasource", + "earlyaccess", + "ecommerce", + "Fastify", + "fulltext", + "Hasura", + "hotfix", + "hotfixing", + "idempotency", + "InnoDB", + "ISAM", + "livestream", + "microservices", + "Middlewares", + "MSSQLSERVER", + "neovim", + "Nestjs", + "Overfetching", + "pgbouncer", + "planetscale", + "pooler", + "poolers", + "preconfigure", + "preconfigured", + "Quickstart", + "refactorings", + "roadmap", + "signup", + "sqlserver", + "TLDR", + "triaging", + "upsert", + "upserts", + "upvote", + "walkthrough", + "healthcheck", + "runtimes", + "substep", + "substeps", + "Supabase", + "Redistributable", + "Nuxt", + "Sveltekit", + "Pothos", + "backoff", + "Replibyte", + "Snaplet", + "Kysely", + "Turso", + "autocompletions", + "Formbricks", + "Openform", + "Documenso", + "Docusign", + "ghostfolio", + "Scholarsome", + "Dittofeed", + "Webstudio", + "Dyrector", + "Coolify", + "hostable", + "Rallly", + "Dundring", + "Letterpad", + "Hitori", + "Zenstack" + ], + "ignoreWords": [ + "Ania", + "Koyeb", + "Neward", + "nikolasburk", + "Slonik", + "Superstruct", + "Tottem", + "tsdf", + "Typebot", + "umami", + "Vitess", + "libgcc", + "libc", + "Distroless", + "Nikolas", + "Supavisor", + "inshellisense", + "janedoe" + ], + "patterns": [ + { + "name": "Markdown links", + "pattern": "\\((.*)\\)", + "description": "" + }, + { + "name": "Markdown code blocks", + "pattern": "/^(\\s*`{3,}).*[\\s\\S]*?^\\1/gmx", + "description": "Taken from the cSpell example at https://cspell.org/configuration/patterns/#verbose-regular-expressions" + }, + { + "name": "Inline code blocks", + "pattern": "\\`([^\\`\\r\\n]+?)\\`", + "description": "https://stackoverflow.com/questions/41274241/how-to-capture-inline-markdown-code-but-not-a-markdown-code-fence-with-regex" + }, + { + "name": "Link contents", + "pattern": "\\", + "description": "" + }, + { + "name": "Snippet references", + "pattern": "-- snippet:(.*)", + "description": "" + }, + { + "name": "Snippet references 2", + "pattern": "\\<\\[sample:(.*)", + "description": "another kind of snippet reference" + }, + { + "name": "Multi-line code blocks", + "pattern": "/^\\s*```[\\s\\S]*?^\\s*```/gm" + }, + { + "name": "HTML Tags", + "pattern": "<[^>]*>", + "description": "Reference: https://stackoverflow.com/questions/11229831/regular-expression-to-remove-html-tags-from-a-string" + } + ], + "ignoreRegExpList": [ + "Markdown links", + "Markdown code blocks", + "Inline code blocks", + "Link contents", + "Snippet references", + "Snippet references 2", + "Multi-line code blocks", + "HTML Tags" + ], + "ignorePaths": [] +} \ No newline at end of file diff --git a/content/500-platform/30-maturity-levels.mdx b/content/500-platform/30-maturity-levels.mdx index f51fd78df3..ab0019a646 100644 --- a/content/500-platform/30-maturity-levels.mdx +++ b/content/500-platform/30-maturity-levels.mdx @@ -12,8 +12,6 @@ You can [check out the releases and maturity process for the Prisma ORM](/orm/mo -## - ### Early Access If a feature on the Prisma Data Platform is labeled as **Early Access**: