zetsu icon indicating copy to clipboard operation
zetsu copied to clipboard

rake site:publish yields unstyled page

Open brittanynavin opened this issue 9 years ago • 3 comments

Thank you for closing my last issue! The styling issue is now fixed.

I did notice, however, that when publishing your site using rake site:publish to my github page using the Rakefile, that my page is unstyled. The server responded with a 404 not found for the main.css file.

screen shot 2015-12-01 at 7 32 47 pm

brittanynavin avatar Dec 02 '15 01:12 brittanynavin

Here's my Rakefile for your reference

require "rubygems"
require "tmpdir"

require "bundler/setup"
require "jekyll"

# Change your GitHub reponame
GITHUB_REPONAME = "bvacchiano/bvacchiano.github.io"
GITHUB_REPO_BRANCH = "master"

namespace :site do
  desc "Generate blog files"
  task :generate do
    Jekyll::Site.new(Jekyll.configuration({
      "source"      => ".",
      "destination" => "_site"
    })).process
  end


  desc "Generate and publish blog to gh-pages"
  task :publish => [:generate] do
    Dir.mktmpdir do |tmp|
      cp_r "_site/.", tmp

      pwd = Dir.pwd
      Dir.chdir tmp

      system "git init"
      system "git add ."
      message = "Site updated at #{Time.now.utc}"
      system "git commit -m #{message.inspect}"
      system "git remote add origin [email protected]:#{GITHUB_REPONAME}.git"
      system "git push origin master:refs/heads/#{GITHUB_REPO_BRANCH} --force"

      Dir.chdir pwd
    end
  end
end

brittanynavin avatar Dec 02 '15 01:12 brittanynavin

Same issue...

alonalj avatar Dec 22 '16 08:12 alonalj

Try changing the baseurl in _config.yml from the default "zetsu" to the name of your repository and that should work.

carolchau avatar Jan 01 '17 15:01 carolchau