Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

GitHub Developer site

License

NotificationsYou must be signed in to change notification settings

github/developer.github.com

Repository files navigation

NOTE: The developer.github.com website is no longer open-source.

We have moved this repository intoour github-archive organization to signify that we are no longer accepting open-source contributions to this repository. We want to thank the hundreds of contributors for their assistance over the years.

The decision to close-source the site stems from a variety of reasons:

  1. We actually alreadyhave a close-sourced site, which is where we wrote documentation for unreleased features. We designed additional tooling to support this workflow, but updating the documentation is a process we'd like to simplify.
  2. We believe that any open-source project—be it documentation or software—ought to have dedicated maintainers. It became difficult to keep this repository open-source because it was maintained by the best efforts of a small group of people. Closing the site allows us to focus on what's important, without feeling guilty at missing reviews from open-source contributors.

We think that the tooling we used to build this site is pretty interesting, so we're not getting rid of everything. We hope that what remains can be used as a source of inspiration for your own static site.

If you find something that needs to be fixed, you can alwayscontact our terrific Support team.

Thank you!


This was the GitHub API documentation, built withNanoc.

Development

You can fetch the latest dependencies by opening the command line and runningscript/bootstrap:

$ script/bootstrap==> Installing gem dependencies…==> Installing npm dependencies…

You'll need Ruby and Node installed on your system. The required versions for each of these languages can be found in the.ruby-version andpackage.json files, respectively.

You can runbundle exec rake build to generate the site, but it's often more usefulto simply build the serverand start the site at the same time.

Nanoc compiles the site into static files living inoutput. It'ssmart enough not to try to compile unchanged files.

You can start the site withscript/server:

$ script/serverLoading site data...Compiling site...   create     [0.28s]  output/index.html   create     [1.31s]  output/v3/gists/comments/index.html   identical  [1.92s]  output/v3/gists/index.html   identical  [0.25s]  output/v3/issues/comments/index.html   update     [0.99s]  output/v3/issues/labels/index.html   update     [0.05s]  output/v3/index.html   …Site compiledin 5.81s.

The site is hosted athttp://localhost:4000.

Nanoc hassome nice documentation to get you started. Though if you're mainly concerned with editing or adding content, you won't need to know much about Nanoc.

Enterprise

To generate the/enterprise versions, pass in the Enterprise version toscript/server. For example:

$ script/server 2.6

Note that live reloading is not available for Enterprise documentation.

Styleguide

Not sure how to structure the docs? Here's what the structure of theAPI docs should look like:

# API title{:toc}## API endpoint title    [VERB] /path/to/endpoint### ParametersName | Type | Description-----|------|--------------`name`|`type` | Description.### Input (request JSON body)Name | Type | Description-----|------|--------------`name`|`type` | Description.### Response<%= headers 200, :pagination => default_pagination_rels, 'X-Custom-Header' => "value" %><%= json :resource_name %>

Note: We're usingKramdown Markdown extensions, such as definition lists.

JSON Responses

We specify the JSON responses in Ruby so that we don't have to writethem by hand all over the docs. You can render the JSON for a resourcelike this:

<%= json :issue%>

This looks upGitHub::Resources::ISSUE inlib/resources.rb.

Some actions return arrays. You can modify the JSON by passing a block:

<%= json(:issue) { |hash| [hash] }%>

There is also a rake task for generating JSON files from the sample responses in the documentation:

$ rake generate_json_from_responses

The generated files will end up injson-dump/.

Terminal blocks

You can specify terminal blocks by using thecommand-line syntax highlighting.

``` command-line$ curl foobar```

You can use certain characters, like$ and#, to emphasize different partsof commands.

``` command-line# call foobar$ curl <em>foobar<em>....```

For more information, seethe reference documentation.

Licenses

The code to generate the site (everything excluding the assets, content,and layouts directories) as well as the code samples on the site arelicensed underCC0-1.0.CC0 waives all copyright restrictions but does not grant you any trademarkpermissions.

Site content (everything in the assets, content, and layouts directories,excluding files under open source licenses individually marked) is licensedunderCC-BY-4.0. CC-BY-4.0gives you permission to use content for almost any purpose but does not grantyou any trademark permissions, so long as you note the license and give credit,such as follows:

Content based ondeveloper.github.comused under theCC-BY-4.0license.

This means you can use the code and content in this repository except forGitHub trademarks in your own projects.

When you contribute to this repository you are doing so under the abovelicenses.

About

GitHub Developer site

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors321


[8]ページ先頭

©2009-2025 Movatter.jp