Permalink
Browse files

Fix for site documentation with doc numbers > 9.

  • Loading branch information...
1 parent 25270fd commit c9770ecfb01717673f9d4a8e7a9a3f36ea183e8e @larzconwell larzconwell committed Oct 18, 2012
Showing with 8 additions and 8 deletions.
  1. +6 −6 lib/template/index.js
  2. +2 −2 site/app/controllers/main.js
View
@@ -141,15 +141,15 @@ Templater.prototype.partial = function (partialURL, renderContextParam, parentNo
};
// Return the file name for a path
-getFileName = function (path) {
- return path.split('/').pop();
+getFileName = function (p) {
+ return p.split('/').pop();
};
// Return the first parent for a path
-getDirName = function (path) {
- path = path.split('/');
- path.pop();
- return path.join('/');
+getDirName = function (p) {
+ p = p.split('/');
+ p.pop();
+ return p.join('/');
};
// Return the template object for a template from geddy's template registry
@@ -91,7 +91,7 @@ var Main = function () {
}
var content = (resp.content) ? new Buffer(resp.content, 'base64').toString('utf8') : ''
- , name = paths[i].path.replace('.md','')
+ , name = paths[i].path.replace('.md','').split('-')
, subs = []
, lines = content.split('\n');
for (var l in lines) {
@@ -100,7 +100,7 @@ var Main = function () {
}
}
docs[parseInt(name[0]) - 1] = {
- name: name.split('-')[1]
+ name: name[1]
, content: md(content)
, subs: subs
};

0 comments on commit c9770ec

Please sign in to comment.