Permalink
Browse files

use jekyll!

  • Loading branch information...
defunkt committed Apr 23, 2010
1 parent 44078e7 commit b21dfd3ff42d764094d89fe2eab7b78511df1387
View
@@ -0,0 +1 @@
+_site
View
@@ -1,38 +1,10 @@
-require 'rubygems'
-require 'erb'
-require 'maruku'
-
-def generate_page(page)
-
- @pcontent = ''
-
- # render markdown from page, if present
- mpage = "pages/#{page}.markdown"
- if File.exists?(mpage)
- content = File.read(mpage)
- doc = Maruku.new(content)
- @pcontent += doc.to_html
- @pcontent += '<br/><br/><hr/>'
- end
-
- @pcontent += '<div class="span-21 last">&nbsp;</div><hr/>'
-
- pname = "p/#{page}.html"
- out = ERB.new(File.read('template/page.erb.html')).result
- File.open(pname, 'w') { |f| f.write(out) }
-end
-
-# generate the site
desc "Generate the html files for the site"
task :gensite do
-
- Dir["pages/*"].entries.each do |p|
- (ignore, page) = p.split('/')
- (pname, ignore) = page.split('.')
- puts pname
- generate_page(pname)
+ if system("type jekyll > /dev/null 2>&1")
+ exec "jekyll"
+ else
+ abort "Please `gem install jekyll`"
end
-
end
task :default => [:gensite]
View
@@ -0,0 +1,6 @@
+markdown: rdiscount
+pygments: true
+server: true
+server_port: 3000
+auto: true
+permalink: /p/:title.html
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -1,196 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>Develop.GitHub - </title>
- <script type="text/javascript" src="../js/jquery-1.2.6.pack.js"></script>
- <script type="text/javascript" src="../js/thickbox-compressed.js"></script>
- <script type="text/javascript" src="../js/jquery.corner.js"></script>
-
- <link rel="stylesheet" href="../css/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="../css/print.css" type="text/css" media="print">
- <!--[if IE]>
- <link rel="stylesheet" href="../css/ie.css" type="text/css" media="screen, projection">
- <![endif]-->
-
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8"/>
- <link rel="stylesheet" href="../css/thickbox.css" type="text/css" media="screen"/>
-</head>
-
-<body>
- <div class="container">
-
- <div class="span-21" id="header">
- <div class="span-10">
- <a href="/"><img src="../images/develop-github.png" alt="github learn logo" /></a>
- </div>
-
- <div class="span-11 last">
- <div id="links">
- <a href="http://github.com">home</a>
- <a href="http://github.com/login">login</a>
- <a href="http://github.com/signup">signup!</a>
- </div>
- </div>
- </div>
-
- <div class="span-21 last content">
- <h2 id='commits_api'>Commits API</h2>
-
-<h3 id='listing_commits_on_a_branch'>Listing Commits on a Branch</h3>
-
-<pre><code>commits/list/:user_id/:repository/:branch</code></pre>
-
-<p>An example of getting a listing of commits for a branch, we will get the latest commits on the &#8216;master&#8217; branch of the Grit project.</p>
-
-<pre><code>$ curl http://github.com/api/v2/yaml/commits/list/mojombo/grit/master
----
-commits:
-- message: Regenerated gemspec for version 1.1.1
- parents:
- - id: 5071bf9fbfb81778c456d62e111440fdc776f76c
- url: http://github.com/mojombo/grit/commit/4ac4acab7fd9c7fd4c0e0f4ff5794b0347baecde
- author:
- name: Tom Preston-Werner
- email: tom@mojombo.com
- id: 4ac4acab7fd9c7fd4c0e0f4ff5794b0347baecde
- committed_date: &quot;2009-03-31T09:54:51-07:00&quot;
- authored_date: &quot;2009-03-31T09:54:51-07:00&quot;
- tree: 94490563ebaf733cbb3de4ad659eb58178c2e574
- committer:
- name: Tom Preston-Werner
- email: tom@mojombo.com
-- message: Version bump to 1.1.1
- parents:
- - id: 05372bffe2b60b0d1802f338551856221e0a89d2
- url: http://github.com/mojombo/grit/commit/5071bf9fbfb81778c456d62e111440fdc776f76c
- author:
- name: Tom Preston-Werner
- email: tom@mojombo.com
- id: 5071bf9fbfb81778c456d62e111440fdc776f76c
- committed_date: &quot;2009-03-31T09:54:40-07:00&quot;
- authored_date: &quot;2009-03-31T09:54:40-07:00&quot;
- tree: e5b860cb18c5c334e480993ca4549d13e0f8b1a8
- committer:
- name: Tom Preston-Werner
- email: tom@mojombo.com</code></pre>
-
-<h3 id='listing_commits_for_a_file'>Listing Commits for a File</h3>
-
-<pre><code>commits/list/:user_id/:repository/:branch/*path</code></pre>
-
-<p>An example of using this to get all the commits that modified the gemspec file for the Grit project would be:</p>
-
-<pre><code>$ curl http://github.com/api/v2/yaml/commits/list/mojombo/grit/master/grit.gemspec
----
-commits:
-- message: Regenerated gemspec for version 1.1.1
- parents:
- - id: 5071bf9fbfb81778c456d62e111440fdc776f76c
- url: http://github.com/mojombo/grit/commit/4ac4acab7fd9c7fd4c0e0f4ff5794b0347baecde
- author:
- name: Tom Preston-Werner
- email: tom@mojombo.com
- id: 4ac4acab7fd9c7fd4c0e0f4ff5794b0347baecde
- committed_date: &quot;2009-03-31T09:54:51-07:00&quot;
- authored_date: &quot;2009-03-31T09:54:51-07:00&quot;
- tree: 94490563ebaf733cbb3de4ad659eb58178c2e574
- committer:
- name: Tom Preston-Werner
- email: tom@mojombo.com
-- message: Regenerated gemspec for version 1.1.0
- parents:
- - id: 5bace1138462c9e40807ee542016fb4213eb49f8
- url: http://github.com/mojombo/grit/commit/ac8700fe97702bc13806a5bfea7a0e28f97b5f6b
- author:
- name: Tom Preston-Werner
- email: tom@mojombo.com
- id: ac8700fe97702bc13806a5bfea7a0e28f97b5f6b
- committed_date: &quot;2009-03-29T21:07:22-07:00&quot;
- authored_date: &quot;2009-03-29T21:07:22-07:00&quot;
- tree: 57504834bb2a0cfda808223b42460fb8f806515f
- committer:
- name: Tom Preston-Werner
- email: tom@mojombo.com</code></pre>
-
-<h3 id='showing_a_specific_commit'>Showing a Specific Commit</h3>
-
-<pre><code>commits/show/:user_id/:repository/:sha</code></pre>
-
-<p>An example of using this to get a the changes introduced on a specific commit in the Grit project would be</p>
-
-<pre><code>$ curl http://github.com/api/v2/json/commits/show/mojombo/grit/5071bf9fbfb81778c456d62e111440fdc776f76c | jsonpretty
-{
- &quot;commit&quot;: {
- &quot;message&quot;: &quot;Version bump to 1.1.1&quot;,
- &quot;added&quot;: [
-
- ],
- &quot;removed&quot;: [
-
- ],
- &quot;parents&quot;: [
- {
- &quot;id&quot;: &quot;05372bffe2b60b0d1802f338551856221e0a89d2&quot;
- }
- ],
- &quot;modified&quot;: [
- {
- &quot;diff&quot;: &quot;@@ -1,4 +1,4 @@\n --- \n :major: 1\n :minor: 1\n-:patch: 0\n+:patch: 1&quot;,
- &quot;filename&quot;: &quot;VERSION.yml&quot;
- }
- ],
- &quot;author&quot;: {
- &quot;name&quot;: &quot;Tom Preston-Werner&quot;,
- &quot;email&quot;: &quot;tom@mojombo.com&quot;
- },
- &quot;url&quot;: &quot;http:\/\/github.com\/mojombo\/grit\/commit\/5071bf9fbfb81778c456d62e111440fdc776f76c&quot;,
- &quot;id&quot;: &quot;5071bf9fbfb81778c456d62e111440fdc776f76c&quot;,
- &quot;committed_date&quot;: &quot;2009-03-31T09:54:40-07:00&quot;,
- &quot;authored_date&quot;: &quot;2009-03-31T09:54:40-07:00&quot;,
- &quot;tree&quot;: &quot;e5b860cb18c5c334e480993ca4549d13e0f8b1a8&quot;,
- &quot;committer&quot;: {
- &quot;name&quot;: &quot;Tom Preston-Werner&quot;,
- &quot;email&quot;: &quot;tom@mojombo.com&quot;
- }
- }
-}</code></pre><br/><br/><hr/><div class="span-21 last">&nbsp;</div><hr/>
- </div>
-
- <div id="footer" class="span-21">
- <div class="info span-12">
- <div class="links">
- <a href="http://github.com/blog/148-github-shirts-now-available">T-Shirts</a> |
- <a href="http://github.com/blog">Blog</a> |
- <a href="http://support.github.com/">Support</a> |
- <a href="http://github.com/training">Git Training</a> |
- <a href="http://github.com/contact">Contact</a> |
- <a href="http://groups.google.com/group/github/">Google Group</a> |
- <a href="http://status.github.com">Status</a>
- </div>
- <div class="company">
- &copy; 2010 GitHub Inc. All rights reserved. | <a href="http://github.com/site/terms">Terms of Service</a> | <a href="http://github.com/site/privacy">Privacy Policy</a>
- </div>
- </div>
- <div class="fork span-7">
- This website is <a href="http://github.com/develop/develop.github.com">open source</a>.
- Please help us by forking the project and adding to it.
- </div>
- </div>
-
- </div>
-
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- var pageTracker = _gat._getTracker("UA-3769691-2");
- pageTracker._initData();
- pageTracker._trackPageview();
- </script>
-
-</body>
-</html>
View
@@ -1,144 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>Develop.GitHub - </title>
- <script type="text/javascript" src="../js/jquery-1.2.6.pack.js"></script>
- <script type="text/javascript" src="../js/thickbox-compressed.js"></script>
- <script type="text/javascript" src="../js/jquery.corner.js"></script>
-
- <link rel="stylesheet" href="../css/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="../css/print.css" type="text/css" media="print">
- <!--[if IE]>
- <link rel="stylesheet" href="../css/ie.css" type="text/css" media="screen, projection">
- <![endif]-->
-
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8"/>
- <link rel="stylesheet" href="../css/thickbox.css" type="text/css" media="screen"/>
-</head>
-
-<body>
- <div class="container">
-
- <div class="span-21" id="header">
- <div class="span-10">
- <a href="/"><img src="../images/develop-github.png" alt="github learn logo" /></a>
- </div>
-
- <div class="span-11 last">
- <div id="links">
- <a href="http://github.com">home</a>
- <a href="http://github.com/login">login</a>
- <a href="http://github.com/signup">signup!</a>
- </div>
- </div>
- </div>
-
- <div class="span-21 last content">
- <h2 id='general_api_information'>General API Information</h2>
-
-<h3 id='schema'>Schema</h3>
-
-<p>All API access is over HTTP and starts with</p>
-
-<pre><code>http://github.com/api/v2/:format</code></pre>
-
-<p>where <code>:format</code> is one of &#8216;yaml&#8217;, &#8216;json&#8217; or &#8216;xml&#8217;, specifying what the response data should be formatted in. For all of the rest of this documentation, we will be leaving off that part, since it is the same for every API call.</p>
-
-<h3 id='authentication'>Authentication</h3>
-
-<p>How to authenticate as a user, simply pass <code>login</code> and <code>token</code> to any URL. Several of the calls will return extra data if you are authenticated as a user that owns the repository or has access to it as a collaborator. For example, a call to get information on one of your private repositories would be:</p>
-
-<pre><code>$ curl -F &#39;login=schacon&#39; -F &#39;token=6ef8395fecf207165f1a82178ae1b984&#39;
- http://github.com/api/v2/json/user/show/schacon | jsonpretty
-{
- &quot;user&quot;: {
- &quot;company&quot;: &quot;Logical Awesome&quot;,
- &quot;name&quot;: &quot;Scott Chacon&quot;,
- &quot;following_count&quot;: 11,
- &quot;blog&quot;: &quot;http:\/\/jointheconversation.org&quot;,
- &quot;public_repo_count&quot;: 52,
- &quot;public_gist_count&quot;: 45,
- &quot;disk_usage&quot;: 294392,
- &quot;collaborators&quot;: 3,
- &quot;plan&quot;: {
- &quot;name&quot;: &quot;small&quot;,
- &quot;collaborators&quot;: 5,
- &quot;space&quot;: 1228800,
- &quot;private_repos&quot;: 10
- },
- &quot;id&quot;: 70,
- &quot;owned_private_repo_count&quot;: 10,
- &quot;total_private_repo_count&quot;: 14,
- &quot;private_gist_count&quot;: 11,
- &quot;login&quot;: &quot;schacon&quot;,
- &quot;followers_count&quot;: 182,
- &quot;created_at&quot;: &quot;2008\/01\/27 09:19:28 -0800&quot;,
- &quot;email&quot;: &quot;schacon@gmail.com&quot;,
- &quot;location&quot;: &quot;Redwood City, CA&quot;
- }
-}</code></pre>
-
-<h3 id='secure_access'>Secure Access</h3>
-
-<p>You can access any API call over HTTPS, though public data can also be accessed over HTTP.</p>
-
-<h3 id='json_callbacks'>JSON callbacks</h3>
-
-<p>If you send a &#8216;callback&#8217; variable to any call, it will wrap the result JSON in that function, so you can automatically execute it.</p>
-
-<pre><code>$ curl http://github.com/api/v2/json/issues/list/schacon/simplegit/open?callback=myJsFunction
-myJsFunction({&quot;issues&quot;: [
-{&quot;user&quot;: &quot;schacon&quot;,
-&quot;updated_at&quot;: &quot;2009/04/17 16:19:02 -0700&quot;,
-&quot;body&quot;: &quot;something&quot;,
-&quot;title&quot;: &quot;new&quot;,
-&quot;number&quot;: 2,
-&quot;votes&quot;: 0,
-&quot;position&quot;: 1.0,
-&quot;created_at&quot;: &quot;2009/04/17 16:18:50 -0700&quot;,
-&quot;state&quot;: &quot;open&quot;}
-]});</code></pre>
-
-<h3 id='limitations'>Limitations</h3>
-
-<p>Currently we are limiting API calls to 60 per minute. This may change in the future, or possibly per user at some point, but if you try to access the API more than 60 times in a minute, it will start giving you &#8220;access denied&#8221; errors.</p><br/><br/><hr/><div class="span-21 last">&nbsp;</div><hr/>
- </div>
-
- <div id="footer" class="span-21">
- <div class="info span-12">
- <div class="links">
- <a href="http://github.com/blog/148-github-shirts-now-available">T-Shirts</a> |
- <a href="http://github.com/blog">Blog</a> |
- <a href="http://support.github.com/">Support</a> |
- <a href="http://github.com/training">Git Training</a> |
- <a href="http://github.com/contact">Contact</a> |
- <a href="http://groups.google.com/group/github/">Google Group</a> |
- <a href="http://status.github.com">Status</a>
- </div>
- <div class="company">
- &copy; 2010 GitHub Inc. All rights reserved. | <a href="http://github.com/site/terms">Terms of Service</a> | <a href="http://github.com/site/privacy">Privacy Policy</a>
- </div>
- </div>
- <div class="fork span-7">
- This website is <a href="http://github.com/develop/develop.github.com">open source</a>.
- Please help us by forking the project and adding to it.
- </div>
- </div>
-
- </div>
-
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- var pageTracker = _gat._getTracker("UA-3769691-2");
- pageTracker._initData();
- pageTracker._trackPageview();
- </script>
-
-</body>
-</html>
Oops, something went wrong.

0 comments on commit b21dfd3

Please sign in to comment.