Created
February 9, 2012 19:04
-
-
Save tobyweston/1782098 to your computer and use it in GitHub Desktop.
What am I doing wrong with local Ocotpress generate?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Hi,
Thanks for looking.
I'm viewing things from the web server when I startup 'rake preview'. Is
that what you mean? I get the same problem when I look at
the /blog/public/blog/index.html directly.
I didn't seem to have this problem when I was working without the top level
domain name (ie, I used to have the root as below...
# If publishing to a subdirectory as in http://site.com/project set 'root:
/project'
root: /blog
Sorry, there's probably not much for you to go on and I'm sure I'm just
missing something simple.
All the best,
Toby
…On 9 February 2012 21:55, Brandon Mathis < ***@***.*** > wrote:
Are you viewing your website via the mounted web server or just opening
the files on your disk?
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1782098
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you viewing your website via the mounted web server or just opening the files on your disk?