Are you sure you want to delete this access key?
This document describes the process for running this application on your local computer.
This site is powered by Node.js! :sparkles: :turtle: :rocket: :sparkles:
It runs on macOS, Windows, and Linux environments.
You'll need Node.js version 16 to run the site. To install Node.js, download the "LTS" installer from nodejs.org. If you're using nodenv
, read the nodenv
docs for instructions on switching Node.js versions.
Once you've installed Node.js (which includes the popular npm
package manager), open Terminal and run the following:
git clone https://github.com/github/docs
cd docs
npm ci
npm run build
npm start
You should now have a running server! Visit localhost:4000 in your browser. It will automatically restart as you make changes to site content.
When you're ready to stop your local server, type CTRLc in your terminal window.
Note that npm ci
and npm run build
are steps that should typically only need to be run once each time you pull the latest for a branch.
npm ci
does a clean install of dependencies, without updating the package-lock.json
filenpm run build
creates static assets, such as the dist/index.js
and dist/index.css
filesAs an alternative, you can simply use GitHub Codespaces.
In a matter of minutes, you will be ready to edit, preview and test your changes directly from the comfort of your browser.
This repo has configuration for debugging with VS Code's built-in Node Debugger.
npm run debug
.--inspect
flag.For more detailed instructions, please see this VS Code recipe. You can also learn more about debugging using VS Code here.
While running the local server, you can visit localhost:4000/dev-toc to view a top-level TOC of all the content in the site. This page is not available on https://docs.github.com. It was created for internal GitHub writers' use.
At the /dev-toc
path, you'll see a list of available versions. Click a version, and a list of products will appear. Note that the TOC content is versioned. If you are viewing the GitHub.com
version and you click the Enterprise Admin
product, it will be empty, because there isn't any Admin content available on that version.
This site was originally a Ruby on Rails web application. Some time later it was converted into a static site powered by Jekyll. A few years after that it was migrated to Nanoc, another Ruby static site generator.
Today it's a dynamic Node.js webserver powered by Express, using middleware to support proper HTTP redirects, language header detection, and dynamic content generation to support the various flavors of GitHub's product documentation, like GitHub.com and GitHub Enterprise Server.
The tooling for this site has changed over the years, but many of the tried-and-true authoring conventions of the original Jekyll site have been preserved:
content
directory.data
directory are available to templates via the {% data %}
tag.redirect_from
Jekyll plugin behavior is supported.For more info about working with this site, check out these READMEs:
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?