Skip to content

Commit 4f85d16

Browse files
committed
add TOC to every page
1 parent e789021 commit 4f85d16

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+125
-34
lines changed

Rules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ end
1818

1919
compile '/feed/' do
2020
filter :erb
21-
filter :kramdown
21+
filter :kramdown, :toc_levels => [2]
2222
filter :colorize_syntax,
2323
:colorizers => {:javascript => :pygmentsrb}
2424
end
2525

2626
%w(v3 */).each do |version|
2727
compile "/changes/#{version}" do
2828
filter :erb
29-
filter :kramdown
29+
filter :kramdown, :toc_levels => [2]
3030
filter :colorize_syntax,
3131
:colorizers => {:javascript => :pygmentsrb}
3232
layout 'changes' if version[0] == '*'
@@ -36,7 +36,7 @@ end
3636

3737
compile '*' do
3838
filter :erb
39-
filter :kramdown
39+
filter :kramdown, :toc_levels => [2]
4040
filter :colorize_syntax,
4141
:colorizers => {:javascript => :pygmentsrb}
4242
layout 'default'

content/v3.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,8 @@ This describes the resources that make up the official GitHub API v3. If
88
you have any problems or requests please contact
99
[support](mailto:[email protected]?subject=APIv3).
1010

11-
* <a href="#schema">Schema</a>
12-
* <a href="#client-errors">Client Errors</a>
13-
* <a href="#http-verbs">HTTP Verbs</a>
14-
* <a href="#authentication">Authentication</a>
15-
* <a href="#pagination">Pagination</a>
16-
* <a href="#rate-limiting">Rate Limiting</a>
17-
* <a href="#conditional-requests">Conditional Requests</a>
18-
* <a href="#cross-origin-resource-sharing">Cross Origin Resource Sharing</a>
19-
* <a href="#json-p-callbacks">JSON-P Callbacks</a>
11+
* TOC
12+
{:toc}
2013

2114
## Schema
2215

content/v3/events.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ title: Events | GitHub API
77
This is a read-only API to the GitHub events. These events power the
88
various activity streams on the site.
99

10+
* TOC
11+
{:toc}
12+
1013
Events support [pagination](/v3/#pagination),
1114
however the `per_page` option is unsupported. The fixed page size is 30 items.
1215
Fetching up to ten pages is supported, for a total of 300 events.

content/v3/events/types.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,8 @@ organization (if applicable).
1414
Note that some of these events may not be rendered in timelines.
1515
They're only created for various internal and repository hooks.
1616

17-
* <a href="#commitcommentevent">CommitCommentEvent</a>
18-
* <a href="#createevent">CreateEvent</a>
19-
* <a href="#deleteevent">DeleteEvent</a>
20-
* <a href="#downloadevent">DownloadEvent</a>
21-
* <a href="#followevent">FollowEvent</a>
22-
* <a href="#forkevent">ForkEvent</a>
23-
* <a href="#forkapplyevent">ForkApplyEvent</a>
24-
* <a href="#gistevent">GistEvent</a>
25-
* <a href="#gollumevent">GollumEvent</a>
26-
* <a href="#issuecommentevent">IssueCommentEvent</a>
27-
* <a href="#issuesevent">IssuesEvent</a>
28-
* <a href="#memberevent">MemberEvent</a>
29-
* <a href="#publicevent">PublicEvent</a>
30-
* <a href="#pullrequestevent">PullRequestEvent</a>
31-
* <a href="#pullrequestreviewcommentevent">PullRequestReviewCommentEvent</a>
32-
* <a href="#pushevent">PushEvent</a>
33-
* <a href="#teamaddevent">TeamAddEvent</a>
34-
* <a href="#watchevent">WatchEvent</a>
17+
* TOC
18+
{:toc}
3519

3620
## CommitCommentEvent
3721

content/v3/gists.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ title: Gists | GitHub API
44

55
# Gists API
66

7+
* TOC
8+
{:toc}
9+
710
## Authentication
811

912
You can read public gists and create them for anonymous users without a token; however, to read or write gists on a user's behalf the **gist** [oAuth scope][1] is required.

content/v3/gists/comments.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ title: Gist Comments | GitHub API
44

55
# Gist Comments API
66

7+
* TOC
8+
{:toc}
9+
710
Gist Comments leverage [these](#custom-mime-types) custom mime types.
811
You can read more about the use of mime types in the API
912
[here](/v3/mime/).

content/v3/git/blobs.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ title: Git Blobs | GitHub API
44

55
# Blobs API
66

7+
* TOC
8+
{:toc}
9+
710
Since blobs can be any arbitrary binary data, the input and responses
811
for the blob API takes an encoding parameter that can be either `utf-8`
912
or `base64`. If your data cannot be losslessly sent as a UTF-8 string,

content/v3/git/commits.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ title: Git Commits | GitHub API
44

55
# Commits API
66

7+
* TOC
8+
{:toc}
9+
710
## Get a Commit
811

912
GET /repos/:user/:repo/git/commits/:sha

content/v3/git/refs.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ title: Git Refs | GitHub API
44

55
# References API
66

7+
* TOC
8+
{:toc}
9+
710
## Get a Reference
811

912
GET /repos/:user/:repo/git/refs/:ref

content/v3/git/tags.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ title: Git Tags | GitHub API
44

55
# Tags API
66

7+
* TOC
8+
{:toc}
9+
710
This tags API only deals with tag objects - so only annotated tags, not
811
lightweight tags.
912

0 commit comments

Comments
 (0)