Skip to content

Commit f298882

Browse files
zekesarahsemilyistoofunky
authored
add contributing/development.md (#15806)
* add contributing/development.md * Update CONTRIBUTING.md Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com> * Update contributing/development.md Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com> * Update contributing/development.md Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com> * Update contributing/development.md Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com> * Update contributing/development.md Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com> * Update contributing/development.md Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com> * Update contributing/development.md Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com> * cross-link to various liquid docs Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com> Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
1 parent 44145e4 commit f298882

File tree

6 files changed

+88
-61
lines changed

6 files changed

+88
-61
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ You can use the GitHub user interface :pencil2: for some small changes, like fix
8585
## Working in the github/docs repository
8686
Here's some information that might be helpful while working on a Docs PR:
8787

88+
- [Development](/contributing/development.md) - This short guide describes how to get this app running on your local machine.
89+
8890
- [Content markup reference](/contributing/content-markup-reference.md) - All of our content is written in GitHub-flavored Markdown, with some additional enhancements.
8991

9092
- [Content style guide for GitHub Docs](/contributing/content-style-guide.md) - This guide covers GitHub-specific information about how we style our content and images. It also links to the resources we use for general style guidelines.

README.md

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ GitHub's Docs team works on pre-production content in a private repo that regula
77
In this article:
88
- [Contributing](#contributing)
99
- [READMEs](#readmes)
10-
- [Developing](#developing)
11-
- [Site structure](#site-structure)
12-
- [Error handling](#error-handling)
13-
- [Search](#search)
1410
- [License](#license)
1511
- [Contributors ✨](#contributors-)
1612

1713
## Contributing
1814

19-
:memo: To find out how you can best contribute to GitHub's product documentation, see [CONTRIBUTING.md](/CONTRIBUTING.md).
15+
:memo: To find out how you can best contribute to GitHub's product documentation, see the [CONTRIBUTING](/CONTRIBUTING.md) guide.
2016

2117
:mega: If you'd like help troubleshooting a PR, have a great new idea, or want to share something amazing you've learned in our docs, join us in [discussions](https://github.com/github/docs/discussions).
2218

@@ -31,6 +27,7 @@ In this article:
3127
In addition to the README you're reading right now, this repo includes other READMEs that describe the purpose of each subdirectory in more detail:
3228

3329
- [content/README.md](content/README.md)
30+
- [contributing/README.md](contributing/README.md)
3431
- [data/README.md](data/README.md)
3532
- [data/reusables/README.md](data/reusables/README.md)
3633
- [data/variables/README.md](data/variables/README.md)
@@ -44,61 +41,6 @@ In addition to the README you're reading right now, this repo includes other REA
4441
- [stylesheets/README.md](stylesheets/README.md)
4542
- [tests/README.md](tests/README.md)
4643

47-
## Developing
48-
49-
This site is powered by Node.js! :turtle: :rocket:
50-
51-
You'll need **Node.js v12** to run the site. If you're using nodenv (you can
52-
run `nodenv version` to find out which Node.js version you're on), read the
53-
[nodenv](#nodenv) section for instructions on switching to Node.js 12. If you're
54-
not using nodenv, the best way to install Node.js is to
55-
[download the LTS installer from nodejs.org](https://nodejs.org).
56-
57-
Once you've installed Node.js, open up Terminal and run the following:
58-
59-
```sh
60-
git clone https://github.com/github/docs-internal
61-
cd docs-internal
62-
npm install
63-
npm start
64-
```
65-
66-
You should now have a running server! Visit [localhost:4000](http://localhost:4000) in your browser. It will automatically restart as you make changes to site content.
67-
68-
When you're ready to stop your local server, type <kbd>CTRL</kbd><kbd>c</kbd> in your terminal window.
69-
70-
## Site structure
71-
72-
This site was originally written in [Jekyll](https://jekyllrb.com/) and later
73-
[Nanoc](https://nanoc.ws/), both of which are Ruby static site generators.
74-
This site is now a dynamic Node.js webserver powered by Express, using middleware
75-
to add support for proper HTTP redirects, language header detection, and dynamic
76-
content generation to support the various flavors of GitHub's product documenation,
77-
like dotcom and GitHub Enterprise. For more context on why this change was made,
78-
see the [new help.github.com](https://github.com/github/product-documentation/tree/master/new-docs-site#static-vs-dynamic)
79-
proposal doc.
80-
81-
The tech powering the site is now different, but many of the tried-and-true
82-
authoring conventions of the original Jekyll site have been preserved:
83-
84-
- Content is written in Markdown files which live in the `content` directory.
85-
- Content can use the Liquid templating language.
86-
- Files in the `data` directory are available to templates via the `{% data %}` tag.
87-
- Markdown files can contain [frontmatter](https://jekyllrb.com/docs/front-matter).
88-
- The [`redirect_from`](https://github.com/jekyll/jekyll-redirect-from) Jekyll plugin behavior is supported.
89-
90-
See the [Content README](content) for more info.
91-
92-
## Error handling
93-
94-
Errors generated from requests will be sent to Sentry via `middlware/handle-errors.js`, and the `lib/failbot.js` client. This is a lightweight wrapper for sending exceptions to GitHub's Sentry instance.
95-
96-
## Search
97-
98-
This site's search functionality is powered by [Algolia](https://www.algolia.com), a third-party service.
99-
100-
See [search.md](search.md) for details.
101-
10244
## License
10345

10446
The GitHub product documentation in the assets, content, and data folders are licensed under a [CC-BY license](content/LICENSE).

contributing/readme.md renamed to contributing/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Check out our [contributing.md](../CONTRIBUTING.md) to see all the ways you can
44

55
Here, you'll find additional information that might be helpful as you work on a pull request in this repo.
66

7+
- [development](./development.md) - steps for getting this app running on your local machine
78
- [content markup reference](./content-markup-reference.md) - how to use markup and features specific to the GitHub Docs site
89
- [content style guide](./content-style-guide) - style guidance specific to GitHub Docs content and additional resources for writing clear, helpful content
910
- [deployments](./deployments.md) - how our staging and production environments work

contributing/development.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Development
2+
3+
This document describes the process for running this application on your local computer.
4+
5+
## Getting started
6+
7+
This site is powered by Node.js! :sparkles: :turtle: :rocket: :sparkles:
8+
9+
It runs on macOS, Windows, and Linux environments.
10+
11+
You'll need **Node.js v12** to run the site. If you're using [`nodenv`](https://github.com/nodenv/nodenv), read the [`nodenv` docs](#nodenv) below for instructions on switching to Node.js 12. If you're not using `nodenv`, the best way to install Node.js is to [download the LTS installer from nodejs.org](https://nodejs.org).
12+
13+
Once you've installed Node.js (which includes the popular `npm` package manager), open Terminal and run the following:
14+
15+
```sh
16+
git clone https://github.com/github/docs
17+
cd docs
18+
npm install
19+
npm start
20+
```
21+
22+
You should now have a running server! Visit [localhost:4000](http://localhost:4000) in your browser. It will automatically restart as you make changes to site content.
23+
24+
When you're ready to stop your local server, type <kbd>CTRL</kbd><kbd>c</kbd> in your terminal window.
25+
26+
## Site structure
27+
28+
This site was originally a Ruby on Rails web application. Some time later it was converted into a static site powered by [Jekyll](https://jekyllrb.com/). A few years after that it was migrated to [Nanoc](https://nanoc.ws/), another Ruby static site generator.
29+
30+
Today it's a dynamic Node.js webserver powered by Express, using [middleware](../middleware/README.md) 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.
31+
32+
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:
33+
34+
- Content is written in Markdown files, which live in the `content` directory.
35+
- Content can use the [Liquid templating language](liquid-helpers.md).
36+
- Files in the `data` directory are available to templates via the `{% data %}` tag.
37+
- Markdown files can contain [frontmatter](https://jekyllrb.com/docs/front-matter).
38+
- The [`redirect_from`](https://github.com/jekyll/jekyll-redirect-from) Jekyll plugin behavior is supported.
39+
40+
For more info about working with this site, check out these READMEs:
41+
42+
- [content/README.md](../content/README.md)
43+
- [contributing/README.md](../contributing/README.md)
44+
- [data/README.md](../data/README.md)
45+
- [data/reusables/README.md](../data/reusables/README.md)
46+
- [data/variables/README.md](../data/variables/README.md)
47+
- [includes/liquid-tags/README.md](../includes/liquid-tags/README.md)
48+
- [includes/README.md](../includes/README.md)
49+
- [javascripts/README.md](../javascripts/README.md)
50+
- [layouts/README.md](../layouts/README.md)
51+
- [lib/liquid-tags/README.md](../lib/liquid-tags/README.md)
52+
- [middleware/README.md](../middleware/README.md)
53+
- [script/README.md](../script/README.md)
54+
- [stylesheets/README.md](../stylesheets/README.md)
55+
- [tests/README.md](../tests/README.md)
56+
57+
## `nodenv`
58+
59+
[nodenv](https://github.com/nodenv/nodenv) is a tool for managing multiple Node.js versions on your local machine. It is **not required** to run this app, but you may already have it installed if you've worked on other projects that use Node.js.
60+
61+
To install Node.js 12 and make it your default version, run this command:
62+
63+
```sh
64+
nodenv install 12.8.0 && nodenv global 12.8.0
65+
```
66+
67+
You may sometimes see a warning when running npm scripts with nodenv:
68+
69+
```sh
70+
npm WARN lifecycle The node binary used for scripts is [...] but npm is using [...]
71+
```
72+
73+
This is due to nodenv's overriding behavior. To silence this harmless warning, the [nodenv docs](https://github.com/nodenv/nodenv/wiki/FAQ#npm-warning-about-mismatched-binaries) recommend running the following command from any directory:
74+
75+
```sh
76+
npm config set scripts-prepend-node-path auto
77+
```

includes/liquid-tags/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22

33
This directory contains templates for our custom Liquid tags.
44

5-
For more details, see [lib/liquid-tags/README.md](../../lib/liquid-tags/README.md).
5+
See also:
6+
7+
- [lib/liquid-tags/README.md](../../lib/liquid-tags/README.md)
8+
- [contributing/liquid-helpers.md](../../contributing/liquid-helpers.md)

lib/liquid-tags/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Liquid Tags
22

3+
See also [contributing/liquid-helpers.md](../../contributing/liquid-helpers.md)
4+
35
This directory contains custom Liquid tags for outputting dynamic content. These custom tags exist for a few reasons:
46

57
- Content and styling should be separated. Writers should not be concerned with writing or maintaining stylistic markup.

0 commit comments

Comments
 (0)