Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use repo.contents instead of repose.read to eliminate extra ajax request

  • Loading branch information...
commit db89033e4ff403d0e56135385e2b728ce873e5e7 1 parent dde5398
@dhcole dhcole authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 _includes/model.js
View
4 _includes/model.js
@@ -223,7 +223,7 @@ function loadPosts(user, reponame, branch, path, cb) {
var repo = getRepo(user, reponame);
function loadConfig(cb) {
- repo.read(branch, "_config.yml", function(err, data) {
+ repo.contents(branch, "_config.yml", function(err, data) {
if (err) return cb(err);
cb(null, jsyaml.load(data));
});
@@ -420,7 +420,7 @@ function emptyPost(user, repo, branch, path, cb) {
function loadPost(user, repo, branch, path, file, cb) {
var repo = getRepo(user, repo);
- repo.read(branch, path ? path + "/" + file : file, function(err, data, commit) {
+ repo.contents(branch, path ? path + "/" + file : file, function(err, data, commit) {
if (err) return cb(err);
// Given a YAML front matter, determines published or not
Please sign in to comment.
Something went wrong with that request. Please try again.