rake预览生成没有样式的站点

时间:2013-09-09 17:47:46

标签: octopress

我已经建立了一个香草Octopress博客&我在github页面上托管,但在使用rake preview时遇到了一些问题。

为了帮助排除故障,这是我自设置Octopress以来所做的一些简短的更改(我记得):

  1. 在_config.yml中,将网址更改为我的网域
  2. 在_config.yml中,将root更改为“/”
  3. 在_config.yml中,在第三方设置下指定了我的github repo
  4. 在/ public / github
  5. 中添加了指向我的域的CNAME
  6. 在/ source /
  7. 中添加了指向我的域的CNAMe
  8. 使用rake new_post
  9. 发帖

    以下是对问题的描述:

    1. http://localhost:4000会产生404,但是,能够在http://localhost:4000/github/index.html
    2. 看到我的网站
    3. 预览/github/index.html时,大多数样式表/ JS都返回404.
    4. 以下是我运行rake generate,然后是rake preview

      时会发生什么
      Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
      Configuration from /Users/[redacted]/Documents/code/octopress/_config.yml
      [2013-09-09 10:21:44] INFO  WEBrick 1.3.1
      [2013-09-09 10:21:44] INFO  ruby 1.9.3 (2013-06-27) [x86_64-darwin11.4.2]
      [2013-09-09 10:21:44] INFO  WEBrick::HTTPServer#start: pid=39870 port=4000
      Auto-regenerating enabled: source -> public/github
      [2013-09-09 10:21:45] regeneration: 95 files changed
      >>> Change detected at 10:21:45 to: screen.scss
      identical public/github/stylesheets/screen.css 
      
      Dear developers making use of FSSM in your projects,
      FSSM is essentially dead at this point. Further development will
      be taking place in the new shared guard/listen project. Please
      let us know if you need help transitioning! ^_^b
      - Travis Tilley
      
      >>> Compass is watching for changes. Press Ctrl-C to Stop.
      

2 个答案:

答案 0 :(得分:1)

你需要Python 2.x.您应该能够在命令提示符下使用python --version

检查Python版本

如果您没有,那么如果您使用的是Windows,请从http://www.python.org/download/下载并安装Python 2.7.6  然后将C:\Python27(或安装Python的文件夹)添加到路径环境变量中。

答案 1 :(得分:0)

您是否更改了destination中的_config.yml设置。默认应该是这样的:

root: /
permalink: /blog/:year/:month/:day/:title/
source: source
destination: public
相关问题