GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs/src at main · github/docs

Expand file tree

/

src

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

src

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
app
app
 
 
archives
archives
 
 
article-api
article-api
 
 
assets
assets
 
 
audit-logs
audit-logs
 
 
automated-pipelines
automated-pipelines
 
 
codeql-cli
codeql-cli
 
 
codeql-queries
codeql-queries
 
 
color-schemes
color-schemes
 
 
content-linter
content-linter
 
 
content-pipelines
content-pipelines
 
 
content-render
content-render
 
 
data-directory
data-directory
 
 
deployments
deployments
 
 
dev-toc
dev-toc
 
 
early-access
early-access
 
 
eslint-rules
eslint-rules
 
 
events
events
 
 
fixtures
fixtures
 
 
frame
frame
 
 
ghes-releases
ghes-releases
 
 
github-apps
github-apps
 
 
graphql
graphql
 
 
journeys
journeys
 
 
landings
landings
 
 
languages
languages
 
 
links
links
 
 
observability
observability
 
 
pages
pages
 
 
products
products
 
 
redirects
redirects
 
 
release-notes
release-notes
 
 
rest
rest
 
 
search
search
 
 
secret-scanning
secret-scanning
 
 
shielding
shielding
 
 
tests
tests
 
 
tools
tools
 
 
types
types
 
 
versions
versions
 
 
webhooks
webhooks
 
 
workflows
workflows
 
 
README.md
README.md
 
 

README.md

Outline

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/*.ts 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.

❖

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.