Skip to content

Commit a6b80e7

Browse files
committed
Implement TOC
1 parent d2e2276 commit a6b80e7

4 files changed

Lines changed: 19 additions & 4 deletions

File tree

Rules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ end
3232
end
3333
end
3434

35+
compile '/guides/*' do
36+
filter :kramdown, :toc_levels => [2]
37+
filter :erb
38+
layout 'default'
39+
end
40+
3541
compile '*' do
3642
filter :erb
3743
filter :kramdown, :toc_levels => [2]

content/guides/basics-of-authentication.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ title: Basics of Authentication | GitHub API
44

55
# Basics of Authentication
66

7+
* TOC
8+
{:toc}
9+
710
In this section, we're going to focus on the basics of authentication. Specifically,
811
we're going to create a Ruby server (using [Sinatra][Sinatra]) that implements the [web flow][webflow] of an application in several different ways.
912

@@ -49,7 +52,7 @@ Next, in _views/index.erb_, paste this content:
4952
</head>
5053
<body>
5154
<p>Well, hello there!</p>
52-
<p>We're going to now talk to the GitHub API. Ready? <a href="https://github.com/login/oauth/authorize?client_id=&lt;%= client_id %>">Click here</a> to begin!</a></p>
55+
<p>We're going to now talk to the GitHub API. Ready? <a href="https://github.com/login/oauth/authorize?client_id=<%= client_id %>">Click here</a> to begin!</a></p>
5356
<p>If that link doesn't work, remember to provide your own <a href="http://developer.github.com/v3/oauth/#web-application-flow">Client ID</a>!</p>
5457
</body>
5558
</html>
@@ -100,10 +103,10 @@ We can do whatever we want with our results. In this case, we'll just dump them
100103

101104
<p>Okay, here's a JSON dump:</p>
102105
<p>
103-
<p>Hello, &lt;%= login %>! It looks like you're &lt;%= hire_status %>.</p>
106+
<p>Hello, <%= login %>! It looks like you're <%= hire_status %>.</p>
104107
</p>
105108

106-
## Adding permanent authentication
109+
## Implementing "persistent" authentication
107110

108111
It'd be a pretty bad model if we required users to log into the app every single
109112
time they needed to access the web page. For example, try navigating directly to
@@ -194,7 +197,7 @@ Now, create a file in _views_ called _advanced.erb_, and paste this markup into
194197
<head>
195198
</head>
196199
<body>
197-
<p>Well, well, well, &lt;%= login %>! It looks like you're <em>still</em> &lt;%= hire_status %>!</p>
200+
<p>Well, well, well, <%= login %>! It looks like you're <em>still</em> <%= hire_status %>!</p>
198201
</body>
199202
</html>
200203

content/guides/getting-started.md

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

55
# Getting Started
66

7+
* TOC
8+
{:toc}
9+
710
Let's walk through core API concepts as we tackle some everyday use
811
cases.
912

content/guides/rendering-data-as-graphs.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ title: Rendering Data as Graphs | GitHub API
44

55
# Rendering Data as Graphs
66

7+
* TOC
8+
{:toc}
9+
710
Blahblah.

0 commit comments

Comments
 (0)