docs/src
docs-bot 5fb98cc0a5
Update audit log event data (#52472)
2024-09-28 16:34:33 +00:00
..
archives Port `archived-asset-redirects.js` to TypeScript (#51393) 2024-06-25 18:56:39 +00:00
assets Create image-density.md (#51903) 2024-08-05 19:17:06 +00:00
audit-logs Update audit log event data (#52472) 2024-09-28 16:34:33 +00:00
automated-pipelines Convert more files to TypeScript `sync.js` & `find-page.js` (#51775) 2024-07-29 21:18:44 +00:00
bookmarklets
changelogs Port `whats-new-changelog.js` to TypeScript (#51199) 2024-06-14 17:35:29 +00:00
code-scanning [WAIT FOR APPROVAL FROM PM BEFORE MERGING]: Autofix moving out of beta + rebrand (#51835) 2024-08-14 16:06:18 +00:00
codeql-cli Convert more files to TypeScript `sync.js` & `find-page.js` (#51775) 2024-07-29 21:18:44 +00:00
color-schemes Use vitest instead of jest (#50150) 2024-04-16 17:07:22 +00:00
content-linter [Content Linter Rule] Third Party Action References Must Use SHA (#52282) 2024-09-27 17:54:59 +00:00
content-render accessibility audits 8801 2024-09-12 14:01:26 -07:00
data-directory Port `warm-server.js` to TypeScript (#51434) 2024-06-27 00:18:28 +00:00
dev-toc Port `context.js` to TypeScript (#50978) 2024-06-07 12:23:13 +00:00
early-access Port `early-access-links.js` to TypeScript (#51173) 2024-06-13 17:55:56 +00:00
events Update eslint packages except eslint@9 (#52435) 2024-09-25 20:15:50 +00:00
fixtures Enhanced billing experience (Billing vNext) for existing enterprises (#52313) 2024-09-27 23:48:37 +00:00
frame Update eslint packages except eslint@9 (#52435) 2024-09-25 20:15:50 +00:00
ghes-releases 🤖 src/ghes-releases/lib/enterprise-dates.json update (#52201) 2024-09-04 16:03:54 +00:00
github-apps Update OpenAPI Description (#52441) 2024-09-27 07:30:53 +00:00
graphql Update eslint packages except eslint@9 (#52435) 2024-09-25 20:15:50 +00:00
landings a11y audit 8839 - remove `tabindex` & `aria-labelledby` (#52327) 2024-09-17 21:51:53 +00:00
languages Publish our translation docs (#52045) 2024-08-21 13:26:38 +00:00
learning-track A11y: update paths on guides links (#51845) 2024-07-30 20:36:32 +00:00
links hovercard masc update (#52420) 2024-09-26 21:35:57 +00:00
observability Port `trigger-error.js` to TypeScript (#51185) 2024-06-13 20:13:20 +00:00
open-source
pageinfo changed short-version.js to ts and updated references (#51805) 2024-07-30 19:12:53 +00:00
pagelist updated the pagelist middleware so it only returns english pagelinks (#52342) 2024-09-18 19:59:16 +00:00
pages
products Port `product-groups.js` to TypeScript (#51364) 2024-06-25 15:47:23 +00:00
redirects Enhanced billing experience (Billing vNext) for existing enterprises (#52313) 2024-09-27 23:48:37 +00:00
release-notes Port `ghes-release-notes.js` to TypeScript (#51196) 2024-06-14 17:20:53 +00:00
rest Update OpenAPI Description (#52441) 2024-09-27 07:30:53 +00:00
search Update eslint packages except eslint@9 (#52435) 2024-09-25 20:15:50 +00:00
secret-scanning Enhanced billing experience (Billing vNext) for existing enterprises (#52313) 2024-09-27 23:48:37 +00:00
shielding Port shielding middleware to TypeScript (#51146) 2024-06-12 17:22:03 +00:00
tests Port `remote-ip.js` to TypeScript (#51130) 2024-06-12 10:58:20 +00:00
tools Update eslint packages except eslint@9 (#52435) 2024-09-25 20:15:50 +00:00
tracking Port `tracking` middleware to TypeScript (#51403) 2024-06-26 11:08:05 +00:00
versions GHES 3.14 release candidate > GA (#52043) 2024-08-27 17:51:28 +00:00
webhooks Update OpenAPI Description (#52441) 2024-09-27 07:30:53 +00:00
workflows Update eslint packages except eslint@9 (#52435) 2024-09-25 20:15:50 +00:00
README.md
types.ts Update secret scanning schema (#51949) 2024-08-07 19:41:18 +00:00

README.md

Welcome to our src directory

Our application is in Node, Express, React, & Next. We are using a "subject folder" pattern. Each folder represents a major capability of the docs.github.com. To learn more about each subject, check the README.md file in the folder.

Why subject folders

We used to organize our code more by role. Client, stylesheets, server middleware, shared files, tests, and so on. As the site grew, we had difficulty finding all the pieces that made a single feature work across the code base. Instead, we're moving to organize by subject. Subjects are easier to find all the related code for a single capability in one place.

How to create and use subject folders

Subjects do not need every element below. Not every element needs to be a folder. A subject folder looks like:

src/
  xsubject/
    README.md
    docs/
    lib/
    middleware/
    pages/
    components/
    stylesheets/
    scripts/
    tests/

If subject depends on another subject, please make this explicit in the README.

Choose the most specific subject folder available when organizing code.

When to use subject folders

A capability should have its own subject folder when it has its own specific tests.

When not to use subject folders

A few things are harder to categorize, so there's some broad folders:

  • frame/, for things that make the header, footer, global sidebar functional. And there's no more specific option.
  • workflows/, for things that are processes rather than the production application. And there's no more specific option.

But don't hesitate to make a new subject folder if there's at least a few files related.

Where to get help

Check the README.md in the subject folder for questions specific to a subject.

For internal folks, please ask in the Docs Engineering Slack or repository.

For open source folks, please open an issue in the repository.

A note on tests and required checks

Most subject folders have their own mention in .github/workflows/test.yml. Open the file to see the beginning of it. It's manually maintained but it's important to point out two things:

  1. It's manually entered so creating a src/foo/tests/*.js doesn't automatically start running those tests.
  2. When you add an entry to .github/workflows/test.yml, and it's gone into main, don't forget to add it to the branch protection's required checks.