This repository is a two-way mirror of the documentation published at developers.sefaria.org/docs.
The docs are hosted on ReadMe. With ReadMe's bi-directional GitHub sync enabled, edits flow in both directions:
| You edit... | What happens |
|---|---|
| Markdown in this repo | The change is synced to developers.sefaria.org |
| A page in the ReadMe web editor | ReadMe commits the change to this repo |
This gives engineers a normal Git workflow (your editor, your branches, grep, AI coding tools) for documentation, while non-engineers can keep using the ReadMe GUI.
API endpoint documentation is NOT edited in this repo. All changes to API docs are made in the Sefaria-Project repo, in this file:
| If you want to change... | Make the change in... |
|---|---|
An API endpoint's description, parameters, request or response schema, or examples (anything under reference/Sefaria API/) |
Sefaria-Project: docs/openAPI.json |
A guide or article (anything under docs/) |
This repo |
Getting Started, tutorials, or other pages under reference/welcome/ |
This repo |
Standalone pages (custom_pages/) |
This repo |
Not sure which one you're looking at? If the page is an endpoint like GET /api/v3/texts/{tref} (listed under API Reference β Sefaria API on the site), it comes from the OpenAPI spec. Edit it in Sefaria-Project. See API endpoint docs for step-by-step instructions.
- In this repo: edit the markdown directly and open a pull request. Good for anyone comfortable with Git.
- In the ReadMe editor: requires a ReadMe seat. Saved changes are committed to this repo automatically.
Both are fully supported. Pick whichever fits the change.
The synced branch is v1.0. The top level has three content folders that map to the sections of the ReadMe site, plus two smaller ones:
.
βββ docs/ # Guides and articles ("Documentation" tab on the site)
βββ reference/ # API Reference tab: endpoint pages, welcome pages, OpenAPI file
βββ custom_pages/ # Standalone pages (contact page, news page, etc.)
βββ custom_blocks/ # Reusable content snippets
βββ README.md # This file (not part of the synced docs)
Each subfolder is a top-level section in the site's sidebar:
| Folder | What's in it |
|---|---|
docs/TECHNICAL DOCS/ |
The main developer guides: text references, categories, the structure of a text (index schema, commentaries, terms), the Linker, topic ontology, the API wiki pages, the Sefaria MCP, accessibility, and migrating source sheets. This is the biggest section. |
docs/local installation/ |
Instructions for running Sefaria locally (Docker Compose, CLI, technical notes on creating titles, categories, and terms) and contributing to Sefaria's repositories. |
docs/Dev Digest Archive/ |
Archived issues of the developer newsletter. |
docs/SEFARIA RESEARCH/ |
Research write-ups (the Disambiguator, PATOT, evals for a Jewish AI chatbot, etc.). |
docs/about Sefaria/ |
General FAQ and the guide to contributing, including how to report a mistake. |
Things to know about how pages are organized:
- One page = one
.mdfile. The filename (without.md) is the page's URL slug, e.g.text-references.mdis/docs/text-references. - A folder with an
index.mdis a parent page. For example,docs/TECHNICAL DOCS/linker/index.mdis the "The Sefaria Linker" page, and the other files in that folder are its children. _order.yamlcontrols sidebar order. Every folder has one. It's a plain list of slugs (file names without.md, or subfolder names) in the order they should appear.docs/_order.yamlorders the top-level sections themselves.- Folder names can contain spaces and capitals (
TECHNICAL DOCS,local installation). That's how ReadMe names them; quote the paths in your shell. - Some pages have Hebrew filenames (for example the Hebrew educator guides and the Hebrew Linker guide). That's expected.
| Path | What's in it |
|---|---|
reference/Sefaria API/ |
π Do not edit. Generated from the OpenAPI spec in Sefaria-Project. One subfolder per endpoint group (text, index, related, calendars, lexicon, topic, term, sheets, collections, ref, misc, and index-1), each with one .md file per endpoint plus an index.md for the group. |
reference/sefaria-api.json |
π Do not edit. The OpenAPI spec the endpoint pages are built from. The source of truth is docs/openAPI.json in Sefaria-Project. |
reference/welcome/ |
Hand-written pages in the API Reference tab: Getting Started, "Others Have Asked", and a tutorials/ folder. |
reference/ReadMeConfig/ |
ReadMe-generated configuration pages (authentication, intro, "my requests"). You'll rarely touch these. |
The endpoint pages are thin. They contain frontmatter pointing at an operation in the OpenAPI file (for example operationId: get-v3-texts), and ReadMe renders the content from the spec. That's why they are not edited here. To change an endpoint's docs, edit docs/openAPI.json in Sefaria-Project. See API endpoint docs.
The pages under reference/welcome/ are normal hand-written markdown and are edited like any other doc.
custom_pages/holds standalone pages that sit outside the normal docs tree (e.g.contact-us.html,news-from-the-sefaria-developer-team.md). It also has an_order.yaml.custom_blocks/holds reusable snippets that can be embedded in multiple pages.
Every page starts with YAML frontmatter that ReadMe reads and writes, followed by the markdown body:
---
title: Text References
excerpt: >-
The core of Sefaria's system is the system of text references.
deprecated: false
hidden: false
metadata:
title: ''
description: ''
robots: index
next:
description: ''
---
# Text References (Citations)
Body of the page in markdown...title: the page title shown on the site and in the sidebar.excerpt: the short summary shown under the title and in previews.hidden: set totrueto keep a page published but out of the sidebar.deprecated: marks the page as deprecated.- Leave the other fields alone unless you know what you're changing.
Always pull before you start. ReadMe pushes GUI edits straight to
v1.0, so the branch can change underneath you at any time.
- Get the latest.
git checkout v1.0 git pull
- Create a branch for your change.
git checkout -b docs/short-description-of-change
- Find the page. Browse the folders above, or search by title. If the page is under
reference/Sefaria API/, stop: it's an API endpoint page, and the change belongs in Sefaria-Project'sdocs/openAPI.jsoninstead.grep -rl "Text References" docs/ reference/welcome/ - Edit the markdown body. Leave the frontmatter intact unless you're deliberately changing the title, excerpt, or visibility.
- Commit and push your branch.
git add -A git commit -m "Clarify rate limits on the texts endpoint" git push -u origin docs/short-description-of-change - Open a pull request into
v1.0and get a teammate to review it. Nothing is published until the PR is merged. - Merge, then verify. Once merged, ReadMe picks up the change. Check the page on developers.sefaria.org/docs to confirm it rendered correctly.
- Pull and create a branch (steps 1 and 2 above).
- Create the file in the folder where the page should live. Use a lowercase, hyphenated filename; that becomes the URL slug.
docs/TECHNICAL DOCS/my-new-page.md - Add frontmatter and content, copying the structure from an existing page:
--- title: My New Page excerpt: One-sentence summary of the page. deprecated: false hidden: false metadata: title: '' description: '' robots: index next: description: '' --- Your content here.
- Add the slug to the folder's
_order.yamlat the position where it should appear in the sidebar (slug only, no.md):A page that isn't listed in- text-references - my-new-page - categories
_order.yamlmay not show up where you expect. - Commit, push, open a PR, merge, and verify (steps 5 to 7 above).
- Create a new folder under the relevant parent.
- Add an
index.mdinside it. This is the parent page, so give it atitleandexcerpt. - Add child pages as
.mdfiles in the folder. - Create an
_order.yamlin the new folder listing the child slugs. - Add the new folder's name to the parent folder's
_order.yaml.
Edit the _order.yaml in the folder containing the pages. Move the slug to the position you want. No other file changes are needed.
Be careful here. The filename is the page's slug, so renaming or moving a file changes its URL and can break links from other pages, from external sites, and from the Sefaria app. Before doing this:
- Search the repo for the old slug:
grep -rn "old-slug" docs/ reference/ custom_pages/ - Update every link and every
_order.yamlentry that mentions it. - When in doubt, ask in the PR whether it's safe.
To retire a page without breaking its URL, prefer setting hidden: true in its frontmatter.
Anyone with a ReadMe seat can edit in the ReadMe editor. When they save, ReadMe commits directly to v1.0 with a message like Update doc <slug>. Pull to see those changes locally:
git checkout v1.0
git pullAll API docs changes happen in the Sefaria-Project repo. Source of truth:
docs/openAPI.jsonDo not edit
reference/sefaria-api.jsonor any page underreference/Sefaria API/in this repo.
The endpoint pages (everything in text/, topic/, sheets/, calendars/, and so on) are generated from an OpenAPI spec. Each page's frontmatter only points at an operation in reference/sefaria-api.json:
api:
file: sefaria-api.json
operationId: get-v3-textsThe descriptions, parameters, request and response schemas, and examples shown for each endpoint all come from the spec, not from the markdown file.
- Note the endpoint's
operationIdfrom the page's frontmatter in this repo (e.g.get-v3-texts), or just its path (e.g./api/v3/texts/{tref}). - Go to Sefaria-Project and create a branch off
master. - Open
docs/openAPI.jsonand find the entry for that endpoint (search for theoperationIdor the path). - Make your change: description, parameters, schema, or examples.
- Open a pull request against
masterin Sefaria-Project and follow that repo's contribution conventions. - Do not copy the change into this repo by hand.
The spec lives next to the API code it describes, so the two can be kept in sync in a single place. Edits made to reference/sefaria-api.json or to the generated endpoint pages in this repo can be overwritten and would drift away from the real source.
- The hand-written pages in
reference/welcome/(Getting Started, tutorials, "Others Have Asked") - The group intro page (
index.md) in each endpoint folder - Everything under
docs/
A few things worth knowing, because they differ from a typical repo:
-
ReadMe pushes directly, with no pull request. When someone saves a change in the ReadMe GUI, ReadMe commits it straight to the synced branch. It does not open a PR. This is true even if you use ReadMe's own Branches and Reviews feature: merging in ReadMe still results in a direct push.
-
Sync is organized around ReadMe project versions, not around
main/master. The repo tracks ReadMe's version branches (e.g.v1.0,v2.0). The primary branch corresponds to whichever version is set as the default in the ReadMe project settings. For us that'sv1.0. -
Commit messages from ReadMe can't be customized. They follow ReadMe's own naming convention based on the action and page slug, for example:
Update doc <slug>Create doc <slug>Update reference <slug>
These do not follow Conventional Commits. Don't enforce commit-message linting on the synced branch, or ReadMe's commits will fail the check. For commits made by engineers, a short imperative summary is plenty.
-
Branch protection can break the sync. Because ReadMe pushes directly, protection rules that require PRs or status checks on the synced branch may block it. If you change branch protection settings, verify that a GUI edit still syncs.
-
Only the synced branch publishes. Work on other branches isn't published until it's merged into
v1.0.
My merge isn't showing up on the site.
Confirm it landed on v1.0 and not another branch. Then check the sync status in the ReadMe dashboard and check your page's frontmatter for errors.
My new page is missing from the sidebar.
Check that its slug is listed in the folder's _order.yaml, and that hidden isn't true.
I edited an endpoint page (or sefaria-api.json) and the change disappeared, or never appeared.
API endpoint docs are generated from the OpenAPI spec, and all changes must be made in docs/openAPI.json in Sefaria-Project. Edits here are not the source of truth.
I edited a page in ReadMe and the commit isn't in the repo. Check that the ReadMe project's default version matches the branch you're looking at, and that branch protection isn't rejecting ReadMe's direct push.
ReadMe's commits are failing a CI check. Exclude the synced branch from commit-message linting. ReadMe's commit format can't be changed.
- Found a mistake in the docs or want to suggest an improvement? Open an issue or pull request in this repo.
- For anything else, email developers@sefaria.org.
- For ReadMe's own documentation on the sync, see Syncing with GitHub.