Commit Graph

64 Commits

Author SHA1 Message Date
Charis cf3ecc93eb chore(docs): turn on strictNullChecks (#36180)
strictNullChecks was off for docs, which lets errors slip through and
leads to incorrect required/optional typing on Zod-inferred types. This
PR enables strictNullChecks and fixes all the existing violations.
2025-06-04 17:05:37 -04:00
Charis fc164b5d07 Refactor/app router refs (#28095)
Migrates client SDK References to App Router. (Management and CLI API references aren't migrated yet, nor are self-hosting config references.)

Some notes:

Big changes to the way crawler pages are built and individual section URLs (e.g., javascript/select) are served. All of these used to be SSG-generated pages, but the number of heavy pages was just too much to handle -- slow as molasses and my laptop sounded like it was taking off, and CI sometimes refuses to build it all at all.

Tried various tricks with caching and pre-generating data but no dice.

So I changed to only building one copy of each SDK+version page, then serving the sub-URLs through a response rewrite. That's for the actual user-visible pages.

For the bot pages, each sub-URL needs to be its own page, but prebuilding it doesn't work, and rendering on demand from React components is too slow (looking for super-fast response here for SEO). Instead I changed to using an API route that serves very minimal, hand-crafted HTML. It looks ugly, but it's purely for the search bots.

You can test what bots see by running curl --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" <URL_OF_PAGE>

Also added some smoke tests to run against prod for the crawler routes, since we don't keep an eye on those regularly, and Vercel config changes could surprise-break them. Tested the meta images on Open Graph and all seems to work fine.

With this approach, full production builds are really fast: ~5 minutes

Starts using the new type spec handling, which is better at finding params automatically, so I could remove some of the manually written ones from the spec files.
2024-08-13 16:12:59 -04:00
Tyler eb9f0240cb docs: Remove error codes section from Flutter, Swift, and Python reference docs. (#28334)
* exclude dart, python, and swift from error codes menu

* Update the error code doc to be client lib agnostic

* run formatter

* Add a filter to filter out section items

* Update apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx

* docs: move error codes table in a separate component

* Add auth error codes section for kotlin
2024-08-06 11:41:10 +09:00
Greg Richardson 48a52e3178 refactor: simplify dynamic imports for ref docs 2023-05-09 12:25:30 -06:00
Greg Richardson 0a4700f2a1 refactor: simplify reference docs nav menu & code split 2023-05-08 12:46:33 -06:00
Greg Richardson bc6dc86dab fix: prevent prefetch of hidden page links 2023-05-04 16:32:01 -06:00
Jonathan Summers-Muir db2b2aaa51 fix margin issue on ref docs 2023-04-05 18:32:46 +08:00
Joel Lee 65710bbdbc feat: add python documentation for functions, Auth, and Storage (#10343)
* initial commit

* fix: remove methods which aren't in python lib yet

* temporarily remove postgrest

* feat: add non-admin methods

* fix: temporarily remove non-admin methods

* Update Dashboard Auth Settings links

* Update example names

* Add example

* started adding pages

* fix: update python ids

* fix: change python docs image back to grayscale

* fix: update ids of storage functions

* Update apps/docs/pages/reference/python/[...slug].tsx

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: reinstate python image

* filter common navmenu sections based on library

* fix reference icons

* Add introduction

* Add IDs

* Update common client libs sections

* Update intro

* fix: add reference section and database section

Co-authored-by: joel@joellee.org <joel@joellee.org>
Co-authored-by: dannykng <danny@supabase.io>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Francisco Mazzoni <francisco@supabase.io>
2023-01-20 11:17:45 +08:00
Jonathan Summers-Muir 6149f13c78 more memo 2022-12-20 15:31:58 +08:00
Jonathan Summers-Muir 08da4652ed move spec generation stuff 2022-12-20 12:26:32 +08:00
Jonathan Summers-Muir 9bad9a7f0e more optimizing 2022-12-15 01:13:32 +08:00
Jonathan Summers-Muir 948132c406 do same with red docs 2022-12-14 01:47:41 +08:00
Terry Sutton 973f86d69b Make version number persist 2022-12-13 10:18:01 -03:30
Jonathan Summers-Muir 27d8300cbe Merge branch 'master' into fix/docs-speed 2022-12-13 18:03:28 +08:00
Jonathan Summers-Muir 8aeed8afe5 map over filter list so can easily run includes() 2022-12-13 11:53:39 +08:00
Terry Sutton c5811016ac Filter modifier and filter items by allowed list 2022-12-12 23:20:47 -03:30
Jonathan Summers-Muir a0afbdab3b moved state 2022-12-13 03:42:39 +08:00
Jonathan Summers-Muir 425f1992c7 fixed sidebar scrolling issues 2022-12-12 19:18:10 +08:00
Terry Sutton 7553d87e2a Add light icons for sidebar nav 2022-12-11 21:41:06 -03:30
Jonathan Summers-Muir dfa1aba1b9 move auth server into accordian 2022-12-11 05:03:56 +08:00
Jonathan Summers-Muir 2e77376de1 Update NavigationMenuRefList.tsx 2022-12-11 04:19:20 +08:00
Jonathan Summers-Muir 73bc0ea60b more fixes 2022-12-11 02:07:52 +08:00
Jonathan Summers-Muir f37051b293 add more support for self hosting ref docs 2022-12-10 23:58:32 +08:00
Jonathan Summers-Muir cdea618c37 ref sidebars now a bit more clever and will only show what is in the lang AND version selected 2022-12-10 20:25:55 +08:00
Terry Sutton 7adea9ee49 Only show menu items based on the lib and version 2022-12-09 22:26:33 -03:30
Jonathan Summers-Muir f62a36531b move all refs into new page format. tidied up CLI and API ref 2022-12-09 17:50:55 +08:00
Jonathan Summers-Muir c475dcad06 make things into components 2022-12-08 20:47:32 +08:00
Jonathan Summers-Muir 4f955a609c remove old code 2022-12-08 14:40:21 +08:00
Jonathan Summers-Muir 230b80d74d remove extra border 2022-12-08 14:37:08 +08:00
Terry Sutton a01bc564b3 Add version picker 2022-12-07 22:02:13 -03:30
Terry Sutton 600ae9d9db Remove unneeded slashes before url path 2022-12-07 15:55:31 -03:30
Terry Sutton e6c09b9e87 Fix build issues 2022-12-07 14:57:45 -03:30
Jonathan Summers-Muir caf7176274 Update NavigationMenuRefList.tsx 2022-12-08 01:04:45 +08:00
Jonathan Summers-Muir 337e82995f fix build errors 2022-12-08 00:47:17 +08:00
Jonathan Summers-Muir e267f61101 Merge branch 'feat/docs2.0' of https://github.com/supabase/supabase into feat/docs2.0 2022-12-08 00:34:09 +08:00
Jonathan Summers-Muir cd34b1055c Update NavigationMenuRefList.tsx 2022-12-08 00:32:19 +08:00
Terry Sutton 2aba41376c Merge branch 'feat/docs2.0' of github.com:supabase/supabase into feat/docs2.0 2022-12-07 12:53:45 -03:30
Jonathan Summers-Muir 16abda03cb fix issue with 2 accordions being open at once 2022-12-08 00:23:01 +08:00
Jonathan Summers-Muir 8e9b9cd4a7 updated common and sidebars for filters and modifiers 2022-12-08 00:19:56 +08:00
Terry Sutton 9d5d35114f Fix sidebar item filtering 2022-12-07 08:56:39 -03:30
Jonathan Summers-Muir bf1b59af43 Merge branch 'feat/docs2.0' of https://github.com/supabase/supabase into feat/docs2.0 2022-12-07 13:29:52 +08:00
Jonathan Summers-Muir 457c87242c add resources in 2022-12-07 13:21:09 +08:00
Terry Sutton 1eed6e5495 Cleanup 2022-12-07 00:30:51 -03:30
Terry Sutton 7cff8a3d43 Make filter dynamic 2022-12-07 00:30:28 -03:30
Terry Sutton 7a278e2411 Filter menu items by current lib 2022-12-07 00:28:42 -03:30
Terry Sutton d998d984de Filter the ref menu by lib 2022-12-06 23:12:38 -03:30
Terry Sutton 747a259a7b Fix dart ref items 2022-12-06 18:29:39 -03:30
Terry Sutton 1bad0a589b Reformat common file, fix js slug 2022-12-06 17:05:43 -03:30
Terry Sutton 6d39c1ad94 Move common lib spec to json 2022-12-06 15:09:49 -03:30
Terry Sutton a069fab32b Add preamble files to top of ref 2022-12-06 09:55:05 -03:30