首页 文章

jekyll rss以heroku为食

提问于
浏览
0

我目前在heroku上运行jekyll并使用以下 procfile

web: jekyll serve --no-watch --port $PORT --host 0.0.0.0

我认为问题出在这里,但是我的rss feed xml返回了这个,显然没有我需要设置链接的域名 .

这里发生了什么?

1 回答

  • 0

    我发现处理这个问题的最好方法是在机架内捆绑jekyll . http://rack.github.io/

    您可以通过创建处理构建的 config.ru 和Rake任务来完成此操作

    Rake文件:

    namespace :assets do
      task :precompile do
        puts `bundle exec jekyll build`
      end
    end
    

    config.ru:

    require 'rack/contrib/try_static'
    require 'rack/contrib/not_found'
    
        use Rack::TryStatic,
          :root => "_site",
          :urls => %w[/],
          :try  => ['index.html', '/index.html']
    
        run Rack::NotFound.new('_site/404.html')
    

相关问题