代码之家  ›  专栏  ›  技术社区  ›  John

将octopress博客移动到子文件夹

  •  1
  • John  · 技术社区  · 10 年前

    目前,我的octopress博客已经在我的数字海洋微滴上运行,一切都很好。但它在水滴的根文件夹中,我想将它移动到 blog 文件夹这只是将所有内容移动到该子文件夹中,还是还有更多的工作要做才能做到这一点?

    1 回复  |  直到 10 年前
        1
  •  1
  •   abustamam Lokesh    9 年前

    根据Octopress文档,如果您在子目录中部署,则需要更新以下文件:

    • _配置yml
    • 配置.rb
    • Rakefile公司

    如果您正在部署到站点上的子目录,或者您正在使用 Github的项目页面,确保在 您的配置。您几乎可以自动执行此操作:

    rake set_root_dir[your/path]
    
    # To go back to publishing to the document root
    rake set_root_dir[/] Then update your _config.yml and Rakefile as follows:
    
    # _config.yml
    url: http://yoursite.com/your/path
    
    # Rakefile (if deploying with rsync)
    document_root = "~/yoursite.com/your/path" 
    

    要手动将部署配置到子目录,您将更改_config.yml,>config.rb和Rakefile。下面是一个将站点部署到/真棒的示例 子目录:

    # _config.yml
    destination: public/awesome
    url: http://example.com/awesome
    subscribe_rss: /awesome/atom.xml
    root: /awesome
    
    # config.rb - for Compass & Sass
    http_path = "/awesome"
    http_images_path = "/awesome/images"
    http_fonts_path = "/awesome/fonts"
    css_dir = "public/awesome/stylesheets"
    
    # Rakefile
    public_dir = "public/awesome"
    # If deploying with rsync, update your Rakefile path
    document_root = "~/yoursite.com/awesome"
    

    来源: http://octopress.org/docs/deploying/subdir/