I want to setup octopress blog on gh-pages branch of one of my github projects. I follow guidelines from the octopress deployment docs. My project repository url is standard: https://github.com/my_user_name/project_name
I follow two scenarios by neither works in some way.
Scenario 1:
I invoke rake setup_github_pages
and supply it with repository location:
git@github.com:my_user_name/project_name.git
This works well and gh-pages branch is created in my project repo.
I do not change Jekill setup in _config.yml
, in particular root:
is empty.
rake generate && preview
work well. I load the site on local host:4000
.
Css and js are loaded correctly.
Now I deploy the site: rake generate && deploy
I load octopress blog as: http://my_user_name.github.io/project_name/
Problem: the blog loads without screen.css
. Moreover, I see following errors for javascript:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery.fancybox.pack.js, line 0)
http://my_user_name.github.io/javascripts/jquery.fancybox.pack.js
Scenario 2:
Same as above, but I change _config.yml
, in particular is set root: /project_name
to the name of my project repo.
rake generate && preview
I load the site on local host:4000
and now I get errors, but on my local machine:
For screen.css
, jquery.fancybox.pack.js
and
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (slash.js, line 0)
local host:4000/project_name/javascripts/slash.js
Now I deploy the site: rake generate && deploy
Css loads correctly, while error console shows that I searches for javascript not in my project path, but at my main repo path:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery.fancybox.pack.js, line 0)
http://my_user_name.github.io/javascripts/jquery.fancybox.pack.js
Please advice, what am I doing wrong?
Do I use rake setup_github_pages
incorrectly?
Do I setup root
in _config.yml
incorrectly?
Or is there some additional setup information that has to be resolved?