{"id":87,"date":"2012-03-13T14:42:00","date_gmt":"2012-03-13T06:42:00","guid":{"rendered":"http:\/\/xuguang.info\/blog\/2012\/03\/linux-slash-ubuntuxia-octopressbo-ke-da-jian-guo-cheng"},"modified":"2014-09-18T22:52:40","modified_gmt":"2014-09-18T14:52:40","slug":"linuxubuntu%e4%b8%8boctopress%e5%8d%9a%e5%ae%a2%e6%90%ad%e5%bb%ba%e8%bf%87%e7%a8%8b-2","status":"publish","type":"post","link":"https:\/\/xg1990.com\/blog\/en\/archives\/87","title":{"rendered":"Linux\/Ubuntu\u4e0bOctopress\u535a\u5ba2\u642d\u5efa\u8fc7\u7a0b"},"content":{"rendered":"<p>\u603b\u7b97\u642d\u597d\u4e86\u8fd9\u4e2a\u9759\u6001\u535a\u5ba2\uff0c\u4e4b\u524d\u5c1d\u8bd5\u4e86Jekyll\u4e0eJekyllbootstrap\uff0c\u8fd8\u662f\u4e0d\u591f\u7ed9\u529b\uff0c\u603b\u662f\u51fa\u73b0\u5404\u79cd\u83ab\u540d\u7684\u95ee\u9898\uff0c\u603b\u7ed3\u4e0b\u8fd9\u4e2a\u535a\u5ba2\u7684\u642d\u5efa\u8fc7\u7a0b(Linux\/Ubuntu \u73af\u5883)\uff1a<br \/>\n<!--more--><\/p>\n<h4 id=\"section\">\u5b89\u88c5\u524d\u51c6\u5907<\/h4>\n<p>(\u8fd9\u90e8\u5206\u5185\u5bb9\u6765\u81ea http:\/\/gujiaxi.github.com\/blog\/2012\/02\/15\/how-to-install-octopress-on-ubuntu-11-dot-04-and-deploy-on-github\/)<\/p>\n<p>\u914d\u7f6e\u524d\u9700\u8981<code>curl<\/code>,<code>git<\/code>\u4e24\u4e2a\u5de5\u5177\uff0c\u5b89\u88c5\u4e4b<\/p>\n<pre>sudo apt-get install curl git-core<\/pre>\n<p>\u5148\u786e\u4fddubuntu\u6e90\u4e2d\u7684<code>ruby<\/code>,<code>rubygem<\/code>\u5df2\u7ecf\u5378\u8f7d,\u5982\u679c\u6ca1\u6709\uff0c\u4f7f\u7528<code>sudo apt-get remove<\/code>\u547d\u4ee4\u5378\u8f7d\u4e4b<\/p>\n<p>\u5b89\u88c5RVM(Ruby Version Manager)<\/p>\n<pre>bash -s stable &lt; &lt;(curl -s https:\/\/raw.github.com\/wayneeseguin\/rvm\/master\/binscripts\/rvm-installer)<\/pre>\n<p>\u5c06rvm\u6307\u4ee4\u53d8\u6210shell function<\/p>\n<pre>echo &#039;[[ -s &quot;$HOME\/.rvm\/scripts\/rvm&quot; ]] &amp;&amp; . &quot;$HOME\/.rvm\/scripts\/rvm&quot;&#039;&gt;&gt;~\/.bashrc<\/pre>\n<p>\u5b8c\u6bd5\u4e4b\u540e\u91cd\u542f\u7ec8\u7aef\uff0c\u8fd0\u884c<\/p>\n<pre>type rvm | head -1<\/pre>\n<p>\u5e94\u8be5\u5c31\u80fd\u770b\u5230<code>rvm is a function<\/code>\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f<\/p>\n<p>\u7136\u540e\uff0c\u5728rvm\u4e0b\u5b89\u88c5Ruby 1.9.2, RubyGems<\/p>\n<pre>rvm pkg install openssl\r\nrvm pkg install zlib\r\nrvm install 1.9.2\r\nrvm use 1.9.2\r\nrvm rubygems latest<\/pre>\n<p>\u5373\u53ef<\/p>\n<h4 id=\"octopress\">\u914d\u7f6eoctopress<\/h4>\n<p>(\u8fd9\u90e8\u5206\u5185\u5bb9\u6765\u81ea http:\/\/gujiaxi.github.com\/blog\/2012\/02\/15\/how-to-install-octopress-on-ubuntu-11-dot-04-and-deploy-on-github\/)<\/p>\n<p>\u4e0b\u8f7doctopress<\/p>\n<pre>git clone https:\/\/github.com\/imathis\/octopress.git octopress<\/pre>\n<p>\u8fd9\u91cc\u4e0b\u8f7d\u5230\u4e86\u672c\u5730\u6587\u4ef6\u5939octopress \uff0c\u7136\u540e\u4f9d\u6b21\u6267\u884c<\/p>\n<pre>cd octopress\r\ngem install bundler\r\nbundle install\r\nrake install<\/pre>\n<p>\u7136\u540e\u5c31\u57fa\u672c\u914d\u7f6e\u597d\u4e86<\/p>\n<h4 id=\"latex\">\u6dfb\u52a0\\(LaTeX\\)\u652f\u6301<\/h4>\n<p>(\u8fd9\u90e8\u5206\u5185\u5bb9\u6765\u81ea http:\/\/luikore.github.com\/2011\/09\/good-things-learned-from-octopress\/)<\/p>\n<p>\u8fd9\u91cc\u6709\u4e2a\u975e\u5e38\u7ed9\u529b\u7684\\(LaTeX\\),\u6392\u51fa\u6765\u7684\u516c\u5f0f\u8fd8\u80fd\u591f\u7ee7\u7eed\u88ab\u8bc6\u522b\u4e3a\u6587\u5b57\uff0c\u6bd4\u90a3\u4e9b\u901a\u8fc7\u751f\u6210png\u5b9e\u73b0\u7684\u516c\u5f0f\u5f3a\u591a\u4e86<\/p>\n<p>\u5b89\u88c5\u63d2\u4ef6<\/p>\n<pre>gem install kramdown<\/pre>\n<p>\u4fee\u6539octopress\u76ee\u5f55\u4e0b\u7684_config.yml\uff0c\u5c06\u5176\u4e2d\u7684<\/p>\n<pre>markdown: rdiscount<\/pre>\n<p>\u6539\u4e3a<\/p>\n<pre>markdown: kramdown<\/pre>\n<p>\u7136\u540e\u4fee\u6539octopress\/source\/_includes\/custom\/head.html<br \/>\n\u5411\u5176\u4e2d\u6dfb\u52a0<\/p>\n<pre class=\"brush: html; gutter: true\">&lt;!-- mathjax config similar to math.stackexchange --&gt;\r\n&lt;script type=&quot;text\/x-mathjax-config&quot;&gt;\r\nMathJax.Hub.Config({\r\n  jax: [&quot;input\/TeX&quot;, &quot;output\/HTML-CSS&quot;],\r\n  tex2jax: {\r\n    inlineMath: [ [&#039;$&#039;, &#039;$&#039;] ],\r\n    displayMath: [ [&#039;$\\$&#039;, &#039;$\\$&#039;]],\r\n    processEscapes: true,\r\n    skipTags: [&#039;script&#039;, &#039;noscript&#039;, &#039;style&#039;, &#039;textarea&#039;, &#039;pre&#039;, &#039;code&#039;]\r\n  },\r\n  messageStyle: &quot;none&quot;,\r\n  &quot;HTML-CSS&quot;: { preferredFont: &quot;TeX&quot;, availableFonts: [&quot;STIX&quot;,&quot;TeX&quot;] }\r\n});\r\n&lt;\/script&gt;\r\n&lt;script src=&quot;http:\/\/cdn.mathjax.org\/mathjax\/latest\/MathJax.js?config=TeX-AMS_HTML&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;<\/pre>\n<p>\u4f46\u662f\u6b64\u65f6\u53f3\u952e\u5355\u51fb\u516c\u5f0f\u4f1a\u51fa\u73b0bug\uff0c\u89e3\u51b3\u529e\u6cd5\u662f\u4fee\u6539octopress\/sass\/base\/_theme.scss\u5982\u4e0b\u6240\u793a\u6bd4\u5982<\/p>\n<pre>body\r\n- &gt; div\r\n+ &gt; div#main\r\nbackground: $sidebar-bg\r\nborder-bottom: 1px solid $page-border-bottom\r\n&gt; div\r\nbackground: $main-bg\r\nborder-right: 1px solid $sidebar-border<\/pre>\n<p>\u00a0<\/p>\n<h4 id=\"section-1\">\u8c03\u6574\u6837\u5f0f<\/h4>\n<p>\u6700\u540e\uff0c\u6211\u89c9\u5f97octopress\u7684\u6bb5\u8ddd\u4e0e\u884c\u9ad8\u592a\u5927\u4e86\uff0c<br \/>\n\u4fee\u6539octopress\/source\/stylesheets\/screen.css\uff0c<br \/>\n\u627e\u5230<br \/>\n<code>p,blockquote,ul,ol{margin-bottom:0.5em}<\/code><br \/>\n\u4e0e<br \/>\n<code>body{line-height:1.1em;color:#222}<\/code><br \/>\n\u4fee\u6539\u5230\u5408\u9002\u7684\u503c\u5373\u53ef<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u603b\u7b97\u642d\u597d\u4e86\u8fd9\u4e2a\u9759\u6001\u535a\u5ba2\uff0c\u4e4b\u524d\u5c1d\u8bd5\u4e86Jekyll\u4e0eJekyllbootstrap\uff0c\u8fd8\u662f\u4e0d\u591f\u7ed9\u529b\uff0c\u603b\u662f\u51fa\u73b0\u5404\u79cd\u83ab\u540d\u7684\u95ee\u9898\uff0c\u603b\u7ed3\u4e0b\u8fd9\u4e2a\u535a\u5ba2\u7684\u642d\u5efa\u8fc7\u7a0b(Linux\/Ubuntu \u73af\u5883)\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"categories":[3],"tags":[],"translation":{"provider":"WPGlobus","version":"3.0.1","language":"en","enabled_languages":["zh","en"],"languages":{"zh":{"title":true,"content":true,"excerpt":false},"en":{"title":false,"content":false,"excerpt":false}}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.4.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\/Ubuntu\u4e0bOctopress\u535a\u5ba2\u642d\u5efa\u8fc7\u7a0b - xg1990<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/xg1990.com\/blog\/archives\/87\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\/Ubuntu\u4e0bOctopress\u535a\u5ba2\u642d\u5efa\u8fc7\u7a0b - xg1990\" \/>\n<meta property=\"og:url\" content=\"https:\/\/xg1990.com\/blog\/archives\/87\" \/>\n<meta property=\"og:site_name\" content=\"xg1990\" \/>\n<meta property=\"article:published_time\" content=\"2012-03-13T06:42:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-09-18T14:52:40+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"xg1990\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/xg1990.com\/blog\/#website\",\"url\":\"https:\/\/xg1990.com\/blog\/\",\"name\":\"xg1990\",\"description\":\"\u5730\u7406\u5708\u7684\u7801\u519c\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/xg1990.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/xg1990.com\/blog\/archives\/87#webpage\",\"url\":\"https:\/\/xg1990.com\/blog\/archives\/87\",\"name\":\"Linux\/Ubuntu\u4e0bOctopress\u535a\u5ba2\u642d\u5efa\u8fc7\u7a0b - xg1990\",\"isPartOf\":{\"@id\":\"https:\/\/xg1990.com\/blog\/#website\"},\"datePublished\":\"2012-03-13T06:42:00+00:00\",\"dateModified\":\"2014-09-18T14:52:40+00:00\",\"author\":{\"@id\":\"https:\/\/xg1990.com\/blog\/#\/schema\/person\/774c05a86b0a61bb8ff633749c59fa8f\"},\"breadcrumb\":{\"@id\":\"https:\/\/xg1990.com\/blog\/archives\/87#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/xg1990.com\/blog\/archives\/87\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/xg1990.com\/blog\/archives\/87#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/xg1990.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\/Ubuntu\u4e0bOctopress\u535a\u5ba2\u642d\u5efa\u8fc7\u7a0b\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/xg1990.com\/blog\/#\/schema\/person\/774c05a86b0a61bb8ff633749c59fa8f\",\"name\":\"xg1990\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/xg1990.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2d326d725f277a38a498575f23200141?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2d326d725f277a38a498575f23200141?s=96&d=mm&r=g\",\"caption\":\"xg1990\"},\"url\":\"https:\/\/xg1990.com\/blog\/en\/archives\/author\/xg1990\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\/Ubuntu\u4e0bOctopress\u535a\u5ba2\u642d\u5efa\u8fc7\u7a0b - xg1990","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/xg1990.com\/blog\/archives\/87","og_locale":"en_US","og_type":"article","og_title":"Linux\/Ubuntu\u4e0bOctopress\u535a\u5ba2\u642d\u5efa\u8fc7\u7a0b - xg1990","og_url":"https:\/\/xg1990.com\/blog\/archives\/87","og_site_name":"xg1990","article_published_time":"2012-03-13T06:42:00+00:00","article_modified_time":"2014-09-18T14:52:40+00:00","twitter_misc":{"Written by":"xg1990","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/xg1990.com\/blog\/#website","url":"https:\/\/xg1990.com\/blog\/","name":"xg1990","description":"\u5730\u7406\u5708\u7684\u7801\u519c","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/xg1990.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/xg1990.com\/blog\/archives\/87#webpage","url":"https:\/\/xg1990.com\/blog\/archives\/87","name":"Linux\/Ubuntu\u4e0bOctopress\u535a\u5ba2\u642d\u5efa\u8fc7\u7a0b - xg1990","isPartOf":{"@id":"https:\/\/xg1990.com\/blog\/#website"},"datePublished":"2012-03-13T06:42:00+00:00","dateModified":"2014-09-18T14:52:40+00:00","author":{"@id":"https:\/\/xg1990.com\/blog\/#\/schema\/person\/774c05a86b0a61bb8ff633749c59fa8f"},"breadcrumb":{"@id":"https:\/\/xg1990.com\/blog\/archives\/87#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/xg1990.com\/blog\/archives\/87"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/xg1990.com\/blog\/archives\/87#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/xg1990.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Linux\/Ubuntu\u4e0bOctopress\u535a\u5ba2\u642d\u5efa\u8fc7\u7a0b"}]},{"@type":"Person","@id":"https:\/\/xg1990.com\/blog\/#\/schema\/person\/774c05a86b0a61bb8ff633749c59fa8f","name":"xg1990","image":{"@type":"ImageObject","@id":"https:\/\/xg1990.com\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/2d326d725f277a38a498575f23200141?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2d326d725f277a38a498575f23200141?s=96&d=mm&r=g","caption":"xg1990"},"url":"https:\/\/xg1990.com\/blog\/en\/archives\/author\/xg1990"}]}},"_links":{"self":[{"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/posts\/87"}],"collection":[{"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":4,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/posts\/87\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/posts\/87\/revisions\/185"}],"wp:attachment":[{"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/media?parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/categories?post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xg1990.com\/blog\/en\/wp-json\/wp\/v2\/tags?post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}