cd octopress Deploying With Rsync 对于自有服务器或者 VPS 的小伙伴 Octopress 目录下的 Rakefile 文件是设置 Deploying 参数的地方。 nano Rakefile ssh_user = "user@domain.com" 这一行设置的是 SSH 用户 所在 服务器的域名 或 IP,其中 user@domain.com 换成你自己的 比如 域名方式 nong@guoruei.com 或者 IP 方式 nong@123.456.789 ssh_port = "22" 这一行里的 22 是服务器的 SSH 默认端口,如果服务器更改了 SSH 端口,则要相应更换。 比如 22 或者 222 document_root = "~/website.com/" 这一行是指定将 Octopress网站 上传到服务器上的目录。 如果安装的是 apache网页服务器 则 ~/website.com/ 一般写为 /var/www/html/ rsync_delete = false 这一行安装 Octopress 的时候默认是 false 我看见官方网站上提示要 false 改成 true 。 保存退出,然后测试一下。 生成网站 rake generate 上传网站 rake deploy 然后就可以在浏览器中打开服务器地址浏览网站了。 Blog Configuration 在 _config.yml 文件有三个部分用于配置 Octopress 博客。 Main Configs url: # For rewriting urls for RSS, etc title: # Used in the header and title tags subtitle: # A description used in the header author: # Your name, for RSS, Copyright, Metadata simple_search: # Search engine for simple site search description: # A default meta description for your site date_format: # Format dates using Ruby's date strftime syntax subscribe_rss: # Url for your blog's feed, defauts to /atom.xml subscribe_email: # Url to subscribe by email (service required) category_feeds: # Enable per category RSS feeds (defaults to false in 2.1) email: # Email address for the RSS feed if you want it. Jekyll & Plugins root: # Mapping for relative urls (default: /) permalink: # Permalink structure for blog posts source: # Directory for site source files destination: # Directory for generated site files plugins: # Directory for Jekyll plugins code_dir: # Directory for code snippets (for include_code plugin) category_dir: # Directory for generated blog category pages pygments: # Toggle python pygments syntax highlighting paginate: # Posts per page on the blog index pagination_dir: # Directory base for pagination URLs eg. /blog/page/2/ recent_posts: # Number of recent posts to appear in the sidebar default_asides: # Configure what shows up in the sidebar and in what order blog_index_asides: # Optional sidebar config for blog index page post_asides: # Optional sidebar config for post layout page_asides: # Optional sidebar config for page layout 3rd Party Settings Github - List your github repositories in the sidebar Twitter - Add a button for sharing of posts and pages on Twitter Google Plus One - Setup sharing for posts and pages on Google's plus one network. Pinboard - Share your recent Pinboard bookmarks in the sidebar. Delicious - Share your recent Delicious bookmarks in the sidebar. Disqus Comments - Add your disqus short name to enable disqus comments on your site. Google Analytics - Add your tracking id to enable Google Analytics tracking for your site. Facebook - Add a Facebook like button 其中的一些被我修改 url: http://blog.guoruei.net title: Blog subtitle: guoruei author: Nong simple_search: https://www.google.com/search description: code is poetry |