Commit Graph

45 Commits

Author SHA1 Message Date
Jeremias Menichelli 5e6e2ec0c1 fix(Docs): Migrate the rest of the raw.githubcontent calls to new util (#44274) 2026-03-27 11:55:36 +01:00
Illia Basalaiev ce5cce5030 replace github discussions with local guides in the docs search (#42335)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

feature

## What is the current behavior?

Currently, old GitHub discussions appear in the docs search instead of
troubleshooting guides in docs/guides/troubleshooting

## What is the new behavior?

Local troubleshooting guides appear in the search

## Additional context

<img width="958" height="846" alt="CleanShot 2026-01-31 at 23 37 33@2x"
src="https://github.com/user-attachments/assets/445fab5d-764a-4b4d-b4ef-c29ab675a9ae"
/>


**troubleshooting.ts** - New source loader that reads local MDX files
from content/troubleshooting/ directly instead of fetching from GitHub
Discussions API
- Generates correct docs paths: /guides/troubleshooting/{slug}
- Uses type = 'troubleshooting' for proper search result mapping
- Sets slug: undefined to avoid trailing # in URLs
- Checksum includes title/topics/keywords so metadata-only changes
trigger re-indexing
- Left comments for review 

**index.ts** - Replaced GitHub discussion sources with local
troubleshooting sources
- Removed GitHubDiscussionLoader, fetchDiscussions,
buildGithubUrlToSlugMap imports
- Added fetchTroubleshootingSources and TroubleshootingSource
- Updated SearchSource type union

**globalSearchModel.ts** - Changed type mapping from
'github-discussions' to 'troubleshooting'

**generate-embeddings.ts** - Removed GitHub App env vars from required
list (DOCS_GITHUB_APP_ID, DOCS_GITHUB_APP_INSTALLATION_ID,
DOCS_GITHUB_APP_PRIVATE_KEY) since they're no longer needed


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Local troubleshooting articles are now indexed and appear directly in
search results for easier access to step‑by‑step guidance.
* Search UI now recognizes a Troubleshooting page type and shows
appropriate icons/sections.

* **Refactor**
* Search sourcing switched from external discussion feeds to local
troubleshooting sources to improve relevance and indexing consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Illia Basalaiev <illiab@IMB3.local>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-02-23 13:54:40 +01:00
Matt Rossman bde827ce5b fix(docs): authenticate GitHub API calls in lint-warnings-guide (#43015)
- `LintWarningsGuideLoader` was making unauthenticated GitHub API calls
(60 req/hr per IP), causing flaky failures on shared CI runners
- Uses the same GitHub App auth already in
[github-discussion.ts](https://github.com/supabase/supabase/blob/9237db51f8db12e744e68500a4e3f42c43746734/apps/docs/scripts/search/sources/github-discussion.ts#L36)
— no new env vars or deps needed

Fixes
https://github.com/supabase/supabase/actions/runs/22184533189/job/64154440387
2026-02-19 09:30:10 -05:00
Charis 8cd5e10038 feat: alternate search index for nimbus (#38662)
* feat: alternate search index for nimbus

Create an alternate search index for Nimbus that filters out
feature-flagged pages (equivalent to setting all feature flags to
false).

Notes:
- Creates two new DB tables, `page_nimbus` and `page_section_nimbus`,
  which are filtered versions of `page` and `page_section`
- Makes `nimbus` versions of all the DB search functions
- Refactored the embedding upload script. Changes to make it faster (got
  annoyed by how slow it was when testing...), incorporate retries, and
  produce better summary logs.
- Upload script, when run with the environment variable
  ENABLED_FEATURES_OVERRIDE_DISABLE_ALL, produces and uploads the
  alternate search index
- Changed all the search calls in frontend/API to check for
  `isFeatureEnabled('search:fullIndex')` to determine whether to search
  the full or alternate index

* ci: produce nimbus search indexes on merge

* fix: turn full search index on
2025-09-16 12:37:53 -04:00
Charis ec66a5d096 fix: hide hidden pages from llms.txt (#38533)
Pages that are disabled in navigation/site rendering are still shown in
llms.txt. This change filters those pages out of the llms.txt build as
well.

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2025-09-09 10:47:27 -04:00
Charis e46ab9c1a2 refactor: reading markdown docs files (#37774)
* refactor: reading markdown docs files

Refactor how Markdown docs files are read:
- Reuses the same logic across search index generation & page generation
- Improves the indexed content for search:
  - Stops removing MDX components, which often contain useful
    information like Admonitions
  - Denormalizes Partials and CodeSamples for more complete content

This is a prerequisite step for implementing the "Copy docs as Markdown"
functionality.

Only touches regular guides for now, not federated ones.

* fix: tailwind build error (#37728)

We changed to default to ESM imports a while ago, which means local
builds are now breaking because the Tailwind uses a require. Changed to
CJS for Tailwind config file. (I have no idea how this has been working
on Vercel all this time.)

* style: prettier
2025-08-13 11:37:14 -04:00
Charis ce14f305ac feat: hybrid search (#37127)
Implement hybrid search for the /docs/api/graphql searchDocs endpoint. Prepend a more descriptive title and introduction to database advisor docs so they rank more highly when directly searched for.
2025-07-14 16:29:01 -04:00
Charis 68cb1a1870 feat(content api): add management api references to semantic search (#36289)
* docs: add cursor rule for embedding generation process

Add documentation for cursor IDE about how docs embeddings are generated,
including the workflow for creating and uploading semantic search content.

* feat: improve API reference metadata upload with descriptive content

- Add preembeddings script to run codegen before embedding generation
- Enhance OpenApiReferenceSource to generate more descriptive content including
  parameters, responses, path information, and better structured documentation

* feat: add Management API references to searchDocs GraphQL query

- Add ManagementApiReference GraphQL type and model for API endpoint search results
- Integrate Management API references into global search results
- Update test snapshots and add comprehensive test coverage for Management API search

* style: format
2025-06-18 09:12:03 -04:00
Charis 274bd2f070 feat(docs): add database lint warnings to search index (#36368)
Adds support for indexing database lint warnings from the Splinter repository
into the docs search. Creates a new LintWarningsGuideLoader that fetches
markdown files from the Splinter repo and processes them as individual
searchable entries in the database advisors guide.
2025-06-12 14:00:12 -04:00
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 f58eead769 chore(docs): clean up environment variables (#36036)
Our environment variables are a bit of a mess, so cleaning them up:

- We have duplicate environment variables that resolve to the same thing
but just have different names, deduplicating all of these
- We have a .env.development (for publicly safe variables) and a
.env.example, we
really only need one
- Privately, we have a .env (for running scripts) and a .env.local (for
Next.js). Changing the dotenv source for scripts, so again we only need
one
2025-05-29 16:35:26 -04:00
Charis 33b9e1ed29 chore(docs): convert all scripts to esm (#35996)
Scripts currently use CJS, which is causing a bit of a mess when trying
to use shared utilities from the app. Converting everything to ESM so
there are fewer conflicts when adding new scripts going forward.
2025-05-29 15:44:55 -04:00
Charis 03dcd51700 feat(content api): search result for cli reference (#35488)
## Before

Search results ignored if they are CLI references.

## After

Search results returned for CLI references.
2025-05-06 19:23:40 -04:00
Charis badcf17f70 feat(content api): add client library api reference search results (#35484)
* feat(content api): add client library api reference search results

Allow searchDocs results to also return function references from the
client library APIs

* fix(content api): refine language enum handling
2025-05-06 13:11:29 -04:00
Charis 46a0e80a10 feat: llms.txt (#33780)
* feat: llms.txt

* feat: split llms.txt into multiple files

We have too many docs, so the concatenated text file uses an unreasonable amount of tokens. Chunk it up a little so it's more usable.
2025-02-24 15:18:51 -05:00
Charis bd0e979f8c fix: search index upload (#32904)
Search index pipeline shouldn't be trying to read troubleshooting section yet (those are still searched via GH discussions). Trying to read it errors as they don't have the same frontmatter shape as other guides content.
2025-01-19 00:31:40 +08:00
Charis 5d2bdc9efb refactor(docs): move last pages over to app router (#29293)
The end of the Great Migration is here!!!

Moves the last pages over, deleting pages like the FAQ that we don't use
and that contain duplicated information anyway.

Dev secret auth page URL had to change as App Router doesn't like the
leading underscores in the path.

Also fixes the not-found recommendations to use the proper Next.js
not-found page so it will return a 404 as it should. (I was under the
erroneous impression that I couldn't get the pathname in not-found.tsx,
that is not true, so this works better.)
2024-09-13 13:28:15 -04:00
Kevin Grüneberg 3601bb52f5 chore: use type imports / avoid unnecessary API type export (#28088) 2024-07-19 18:35:23 +08:00
Charis 0c1ab7e2e5 refactor: factor out markdown processing utils (#26729) 2024-06-04 14:00:24 -04:00
Hieu d855bfb3f8 feat: automate mgmt api spec update (#26655)
* fix: correct mgmt api naming

* feat: new command to generate mgmt api sections

* feat: sort section items

* chore: tidy up

* fix: add generate sections to the default command

* feat: add gha to auto update mgmt api docs

* chore: tidy up

* fix: operationId logic to support self-hosting references

* chore: update latest mgmt api specs

* chore: update latest mgmt api specs
2024-05-31 08:53:19 +07:00
Charis e20038e2f2 refactor: move auth guides into content directory (#20777)
Begin the process of moving our MDX files into their own content directory.

Fixed a few minor bugs re: ToC and tabs not rerendering consistently on page navigation. (The ToC thing wasn't a problem before the refactor, the tabs thing is a problem on prod.)

Moved MDX files can't import their own components, so everything they require needs to be back in the component prop for mdx-remote's serializer. Cleaned this up a bit and lazy-loaded heavy/rare stuff. Also, the component prop doesn't take arbitrary objects (only actual components), so imported data has to be wrapped in a component.
2024-02-07 17:25:08 +00:00
Kevin Grüneberg f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
Charis d6234f823a fix: include integrations in our search indexes (#20709)
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
2024-01-26 15:20:54 -05:00
Kevin Grüneberg 129b3d927a chore: move specs to docs folder (#20136) 2024-01-03 18:54:23 +01:00
Guilherme Souza 4ff8e11936 Add documentation for Swift v2 and update user management example to use Swift v2 (#19752) 2023-12-15 09:56:53 +08:00
Tyler c0cf4b114c docs: remove dart v0 and add dart v2 (#19269)
* remove dart v0 and add dart v2

* consolidate google and apple login docs to id token login

* add realtime ref docs

* adds auth update guide

* wrap up upgrade guide

* run prettier

* run prettier

* update presence methods

* udpate presence upgrade guide

* Apply suggestions from code review

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* update is and in filter

* additional update after receving the review comments

* fix code formatting

* fix indents

* formatted the code

* update indentation

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2023-12-07 14:16:33 +09:00
Charis b9b7595290 fix: fix labelling for management api search items (#19488) 2023-12-06 22:30:41 -05:00
Charis 6c4311f723 fix: improve docs search ux and result rankings (#19450)
Improve the way docs are indexed and FTS results are ranked, so results are more relevant.

Also improve debouncing and searching UX so it feels a bit faster and you can scan the results more easily.
2023-12-06 12:27:33 -05:00
Tyler 1442e42b0a docs: update Kotlin docs to v1.0 (#18932)
* update kotlin docs version number to v1.0

* renaming client to supabase for the installing kotlin guide
2023-11-14 10:54:26 +08:00
Guilherme Souza fe7494f804 docs: update Swift docs for v1 release (#18682)
* docs: update auth section for Swift

* docs: fix wrong md for code section

* docs: update fetch data section for Swift

* docs: update insert data section docs for Swift

* docs: update using filter section

* docs: update modifier, filters and edge functions sections

* docs: update realtime section

* docs: update storage section

* docs: fix examples not building

* docs: add entry for rpc call with filters

* Update spec/supabase_swift_v1.yml

* Update spec/supabase_swift_v1.yml

---------

Co-authored-by: Tyler <18113850+dshukertjr@users.noreply.github.com>
2023-11-09 20:03:18 +09:00
Greg Richardson 1c0da103c9 fix(embeddings): remove custom anchor from heading 2023-05-11 13:24:18 -06:00
Greg Richardson 36aa0cc187 fix(embeddings): custom heading slugs 2023-05-11 12:26:27 -06:00
Greg Richardson 96bb86c868 fix(prettier): kotlin docs 2023-05-10 16:53:47 -06:00
Jan Tennert a00e06cddb Merge remote-tracking branch 'supabase/master'
# Conflicts:
#	apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
2023-05-10 17:25:32 +02:00
Greg Richardson 290ed9c406 fix(embeddings): reference doc typings 2023-05-08 14:08:57 -06:00
Greg Richardson 0a4700f2a1 refactor: simplify reference docs nav menu & code split 2023-05-08 12:46:33 -06:00
Jan Tennert c12277b864 Initial commit 2023-05-07 19:55:08 +02:00
Greg Richardson 8de421d3a5 feat: update sitemap to only include latest lib versions 2023-05-03 15:22:44 -06:00
Greg Richardson 66d61738f5 fix(embeddings): github discussions slug 2023-04-24 18:23:55 -06:00
Greg Richardson ef2753cab2 feat(embeddings): github app auth 2023-04-24 17:49:00 -06:00
Greg Richardson 8455437243 Merge branch 'feat/zero-downtime-embeddings-refresh' into feat/ingest-github-discussions-for-search 2023-04-24 14:46:34 -06:00
Greg Richardson 59caf7d1dd fix(embeddings): twilio meta export 2023-04-21 16:32:49 -06:00
Greg Richardson e8a0a908de feat(search): ingest github discussions 2023-04-20 19:53:19 -06:00
Greg Richardson 67c041877d fix: type error 2023-04-20 19:40:55 -06:00
Greg Richardson 0ff1759dd2 refactor(search): split sources into their own files 2023-04-20 17:37:01 -06:00