Skip to content

Instantly share code, notes, and snippets.

@tobyweston
Created February 9, 2012 19:04
Show Gist options
  • Save tobyweston/1782098 to your computer and use it in GitHub Desktop.
Save tobyweston/1782098 to your computer and use it in GitHub Desktop.
What am I doing wrong with local Ocotpress generate?
# my _config.yml section
root: /
permalink: /blog/:year/:month/:day/:title/
source: source
destination: public/blog
code_dir: downloads/code
category_dir: blog/categories
This deploys fine to github pages (https://github.com/tobyweston/blog) and with a CNAME badrobot.com
and domain setup, it all works lovely when visiting http://baddotrobot.com/
but the problem is that running 'rake generate' or 'rake preview' generates the site
but doesn't display styling correctly for me locally (making testing tricky).
It seems to create
public
public\blog
public\blog\stylesheets etc
with (for example) the public\blog\index.html referencing the following
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href="/blog/atom.xml" rel="alternate" title="bad.robot" type="application/atom+xml">
which for some reason, doesn't find the src/hrefs. If I change the style sheet line for example to
<link href="stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
(dropping the leading slash), it works fine. That is to say it finds the stylesheet now.
I wondering what I'm doing wrong!
oh, and I hit http://localhost:4000/blog
@tobyweston
Copy link
Author

tobyweston commented Feb 10, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment