Commit Graph
73 Commits
Author SHA1 Message Date
Joshen Lim a800de7cec Improve loading state 2025-08-18 18:31:29 +08: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
Kevin Grüneberg 43240e0de1 chore: skip import of combined JS spec for non-JS docs (#28133)
* chore: skip import of combined JS spec for non-JS docs

* fix import
2024-07-24 11:17:19 +08:00
Charis f4779d4844 refactor: migrate guides to app router (#23101)
Migrate guides to App Router.
2024-07-03 10:25:06 -04:00
Charis 7cf2eae953 fix: statically build the right nav on each page (#21469)
Before: All pages have the Home nav menu in static HTML, which is blown away and replaced by the proper nav menu upon hydration. This leads to jankiness when the page first loads and an unpleasant flash of the wrong nav menu (especially obvious on the JavaScript ref page, which takes a long time to process and rerender the nav).

Now: All pages have their correct nav menu in static HTML.
2024-02-23 11:38:06 -05:00
Kevin Grüneberg 129b3d927a chore: move specs to docs folder (#20136) 2024-01-03 18:54:23 +01:00
Greg Richardson 92340ee812 fix: use slug instead of id in link 2023-05-11 22:21:08 -06:00
Greg Richardson 2a798515ba Merge branch 'master' into feat/client-lib-version-sticky-warning 2023-05-11 16:51:44 -06:00
Greg Richardson a2e2cc558f fix: getStaticPaths() slug for ref docs 2023-05-10 10:39:52 -06:00
Greg Richardson 875bfab1b8 fix: generate static page for each ref doc path 2023-05-09 16:10:32 -06:00
Greg Richardson 695b00c0ce chore(docs): yaml import types 2023-05-04 18:48:08 -06:00
Greg Richardson 7bb8cfd998 feat: sticky warning when viewing old client lib version 2023-05-03 17:51:43 -06:00
Terry Sutton 1fbdb60559 Fix missing crawler pages, missing h1 tags 2023-01-27 16:07:06 -03:30
Terry Sutton 8d4717814b You get a type, and you get a type, and you get a type 2023-01-09 12:35:59 -03:30
Terry Sutton e3da1e72bf Cleanup getStaticProps 2023-01-06 16:02:02 -03:30
Terry Sutton bd2bd2c52f Add NextSEO to refdocs crawler files 2022-12-16 15:35:47 -03:30
Terry Sutton 1e242b16cf Add crawler slugs for all libs 2022-12-11 10:30:27 -03:30
Terry Sutton 37a627eb99 Trying js middleware 2022-12-11 09:08:06 -03:30
Jonathan Summers-Muir bd0514553c changed yaml files 2022-12-11 15:00:22 +08:00
Jonathan Summers-Muir c74234aaa2 fix build 2022-12-11 05:51:22 +08:00
Jonathan Summers-Muir dfa1aba1b9 move auth server into accordian 2022-12-11 05:03:56 +08:00
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 db7889872a Update [...slug].tsx 2022-12-09 01:51:02 +08:00
Jonathan Summers-Muir 053d13eb1b FORCE 2022-12-09 01:50:33 +08:00
Jonathan Summers-Muir 3a009f5395 try using shaki theme 2022-12-09 01:49:33 +08:00
Jonathan Summers-Muir 18fd4ef46f force touch of shiki 2022-12-09 01:33:37 +08:00
Jonathan Summers-Muir 26a05f460b TRY AGAIN 2022-12-09 00:57:16 +08:00
Jonathan Summers-Muir 43a7c563d5 FORCE 2022-12-09 00:49:09 +08:00
Jonathan Summers-Muir 4cb6cb3d77 do the ignore thing 2022-12-09 00:47:39 +08:00
Jonathan Summers-Muir 4867e06e43 deal with unstable file 2022-12-09 00:21:58 +08:00
Jonathan Summers-Muir e973fc86f6 optimized pages. ref pages now a lot smaller 2022-12-08 22:58:36 +08:00
Jonathan Summers-Muir bd27bba15e fix buiuld 2022-12-08 21:32:19 +08:00
Jonathan Summers-Muir c475dcad06 make things into components 2022-12-08 20:47:32 +08:00
Jonathan Summers-Muir db7870d21f fix images 2022-12-08 14:27:28 +08:00
Jonathan Summers-Muir 18aed465b9 formatting of first intro docs for supabase v2 2022-12-08 14:14:57 +08:00
Jonathan Summers-Muir b0e7287475 add codehike to markdown in ref docs 2022-12-08 13:18:19 +08:00
Terry Sutton cdc6df947c Rename collapse component 2022-12-07 16:40:43 -03:30
Terry Sutton f47c9f9443 Remove old libspec files 2022-12-07 16:26:40 -03:30
Terry Sutton 66d9887f05 Fix ReferenceDetailCollapse 2022-12-07 13:17:43 -03:30
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 8e9b9cd4a7 updated common and sidebars for filters and modifiers 2022-12-08 00:19:56 +08:00
Terry Sutton dd0c6ea9c6 Load intro pages in a single column 2022-12-07 11:09:10 -03:30
Terry Sutton 7b72a2f4a4 Fix anchor slugs 2022-12-06 23:25:56 -03:30
Terry Sutton 86fc7506ee Fix item highlighting 2022-12-06 22:33:04 -03:30
Terry Sutton 3378c44b33 Wire up jsv1 2022-12-06 21:40:04 -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 c409ffaabc Merge branch 'feat/docs2.0' of github.com:supabase/supabase into feat/docs2.0 2022-12-06 15:10:12 -03:30
Jonathan Summers-Muir f99c481c05 add reference details 2022-12-07 02:39:50 +08:00
Terry Sutton 6d39c1ad94 Move common lib spec to json 2022-12-06 15:09:49 -03:30