Permalink
Browse files

fixed bug to enable multiple directories

  • Loading branch information...
1 parent 1383368 commit d605a8cbe294ad45b1f0e89f438369fcc406f63d @twilson63 committed Jun 11, 2012
Showing with 105 additions and 65 deletions.
  1. +4 −4 Cakefile
  2. +9 −4 lib/deploy.js
  3. +15 −8 lib/gen.js
  4. +1 −0 lib/index.js
  5. +23 −8 lib/new.js
  6. +17 −14 lib/run.js
  7. +7 −2 lib/serve.js
  8. +4 −1 lib/zeke.js
  9. +1 −1 package.json
  10. +1 −1 src/new.coffee
  11. +2 −1 src/run.coffee
  12. +1 −1 templates/bootstrap/css/app.css
  13. +9 −9 templates/bootstrap/layout.html.eco
  14. +11 −11 templates/pagedown/layout.html.eco
View
@@ -3,10 +3,10 @@ fs = require 'fs'
{spawn, exec} = require 'child_process'
# ANSI Terminal Colors
-bold = '\033[0;1m'
-green = '\033[0;32m'
-reset = '\033[0m'
-red = '\033[0;31m'
+bold = `'\033[0;1m'`
+green = `'\033[0;32m'`
+reset = `'\033[0m'`
+red = `'\033[0;31m'`
log = (message, color, explanation) ->
console.log color + message + reset + ' ' + (explanation or '')
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -2,7 +2,7 @@
"author": "Tom Wilson <tom@beautifulnode.com> (http://www.twilson63.com)",
"name": "bam",
"description": "The Easiest Static Site Generator on the Planet!",
- "version": "0.5.6",
+ "version": "0.5.7",
"homepage": "http://www.usebam.com",
"repository": {
"type": "git",
View
@@ -20,7 +20,7 @@ buildFolders = (proj, cb) ->
# Remove gen directory if exists
checkexists "./#{proj}", (exists) ->
wrench.rmdirSyncRecursive("./#{proj}") if exists
- fs.mkdirSync directory, 0755 for directory in [
+ fs.mkdirSync directory, 0o0755 for directory in [
"./#{proj}"
]
cb()
View
@@ -13,6 +13,7 @@ renderMarkdown = (name) ->
ghm.parse(md)
renderHtml = (name) ->
+ console.log name
fs.readFileSync("./pages#{name}.html").toString()
renderCoffee = (name) ->
@@ -33,7 +34,7 @@ module.exports = (port, proj='.') ->
filed(".#{pathname}").pipe(resp)
else
pathname = pathname.replace '.html', ''
- ext = (page for page in pages when page?.split('.')[0] is pathname?.split('/')[1].split('.')[0])?[0].split('.')[1]
+ (ext = page.split('.')[1] for page, index in pages when '/' + page?.split('.')[0] is pathname)
if ext is 'html'
body = renderHtml pathname
else if ext is 'coffee'
@@ -1,5 +1,5 @@
body {
- padding-top: 90;
+ padding-top: 90px;
}
@media (max-width: 768px) {
@@ -8,20 +8,20 @@
<meta name="author" content="">
<!-- Le styles -->
- <link href="css/bootstrap.min.css" rel="stylesheet">
- <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
- <link href="css/app.css" rel="stylesheet">
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/bootstrap-responsive.min.css" rel="stylesheet">
+ <link href="/css/app.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
- <link rel="shortcut icon" href="images/bam.ico">
- <link rel="apple-touch-icon" href="images/bootstrap-apple-57x57.png">
- <link rel="apple-touch-icon" sizes="72x72" href="images/bootstrap-apple-72x72.png">
- <link rel="apple-touch-icon" sizes="114x114" href="images/bootstrap-apple-114x114.png">
+ <link rel="shortcut icon" href="/images/bam.ico">
+ <link rel="apple-touch-icon" href="/images/bootstrap-apple-57x57.png">
+ <link rel="apple-touch-icon" sizes="72x72" href="/images/bootstrap-apple-72x72.png">
+ <link rel="apple-touch-icon" sizes="114x114" href="/images/bootstrap-apple-114x114.png">
</head>
<body>
@@ -56,8 +56,8 @@
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
- <script src="js/bootstrap.min.js"></script>
- <script src="js/app.js"></script>
+ <script src="/js/bootstrap.min.js"></script>
+ <script src="/js/app.js"></script>
</body>
</html>
Oops, something went wrong.

0 comments on commit d605a8c

Please sign in to comment.