我正在尝试在github页面上部署octopress.我按照这些说明操作:
http://octopress.org/docs/deploying/github/
这一切都运行良好,直到提交部分,我得到错误:
致命:无法打开'.git/COMMIT_EDITMSG':权限被拒绝
当然,我是我的github.io页面的所有者,我之前从未遇到过这个问题.为什么会发生这种情况,更重要的是我该如何解决?
我正在使用markdown来创建一个表.我的描述列包含很长的文本,因此当我换行时,它在markdown文件上看起来很糟糕:
Argument | Description |
-------- | ----------- |
appDir | The top level directory that contains your app. If this
option is used then it assumed your scripts are in |a subdirectory under this path. This option is not required. If it is not specified, then baseUrl below is the anchor point for finding things. If this option is specified, then all the files from the app directory will be copied to the dir: output area, and baseUrl will …Run Code Online (Sandbox Code Playgroud) 我想Octopress在我的电脑上安装.我试着这样做
我跑的时候
bundle install
Run Code Online (Sandbox Code Playgroud)
我收到了错误消息
An error occured while installing RedCloth (4.2.9), and Bundler cannot continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)
所以,我跑了
sudo gem install RedCloth -v '4.2.9'
Run Code Online (Sandbox Code Playgroud)
然后,我再次收到错误消息:
ERROR: Error installing RedCloth:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
Run Code Online (Sandbox Code Playgroud)
我没有学过任何关于红宝石的知识.
我在目录/Users/tragicidea/Desktop/terminal.png上有image terminal.png.我想使用此脚本在我的帖子上插入该图像
{% img /Users/tragicidea/Desktop/terminal.png %}
Run Code Online (Sandbox Code Playgroud)
但是我的图片没有出现在我的帖子上,我该怎么办?
我已经使用Octopress在github页面上设置了一个博客.我创建了我的第一篇文章,并且能够在localhost上查看它rake preview.但是它无法部署到github页面.对git不熟悉,我很难理解这个问题.
我rake deploy按照他们的文档运行部署到github页面.
我收到这条消息:
## Deploying branch to Github Pages
## Pulling any updates from Github Pages
cd _deploy
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
If you often merge …Run Code Online (Sandbox Code Playgroud) 我正在使用Octopress 3,当我运行时jekyll build,它会生成正确的文件集(包括我的静态文件,请参阅下面的文件列表):
$ cd _site
:_site$ ls -a
. CNAME assets google2d8.html index-alternative.html
.. about blog increase-revenue.html index.html
Run Code Online (Sandbox Code Playgroud)
请注意,我的整个jekyll生成blog现在安全地存储在内\blog\,这就是我想要的.
但是一旦我这样做octopress deploy,它会覆盖整个文件夹(也会覆盖我现有的静态文件),请参阅下面的列表:
$ cd _site
:_site$ ls -a
. .. Gemfile Gemfile.lock about css feed.xml index.html jekyll
Run Code Online (Sandbox Code Playgroud)
这是我的_config.yml:
title: My Title
email: some@email.com
description: > # this means to ignore newlines until "baseurl:"
some description
baseurl: "/blog" # the subpath of your site, e.g. /blog
url: "http://example.com" # the base …Run Code Online (Sandbox Code Playgroud) 我在GitHub Pages中安装了Octopress.
我克隆了存储库.
$ git clone git@github.com:my-name/my-name.github.io.git
$ git checkout source
和
$ rake setup_github_pages
我输入了我的存储库名称.
和
$ rake gen_deploy
我收到了错误
! [rejected] master -> master (non-fast-forward)
我解决了这个问题,在GitHub中删除my-name.github.io.git,并创建同名存储库和
$ rake gen_deploy
什么是最好的解决方案?
Octopress是一个很棒的博客引擎; 但是,我似乎很难找到如何在Octopress中创建一个新主题.
我发现的官方指南(http://octopress.org/docs/theme/)仅限于如何修改官方主题,并没有真正详细说明语法如
{% assign index = true %}
{% for post in paginator.posts %}
{% assign content = post.content %}
Run Code Online (Sandbox Code Playgroud)
也不是目录结构.其他主题创作者(http://billpatrianakos.me/blog/2012/10/31/the-making-of-an-octopress-theme/)只是通过查看默认主题来完成此操作,这是我可能的路径采取.
但在我开始这个艰苦的过程之前,我想知道是否有某种指导来创建我可能错过的Octopress主题.
谢谢,
据我所知,Octopress旨在作为独立的Web应用程序运行.
我有一个个人网站,我想添加一个博客,由于种种原因我想使用Octopress.我想将这些应用程序集成在一起,而不是在git中有两个单独的应用程序和repos.
有没有可靠的方法将Octopress集成到现有的Rails 4.0应用程序中?
我最好的办法是将Octopress作为机架应用程序安装在Rails路由器中,还是有更好的方法?
我是Octopress的新手,对git/github来说比较新.
我在本地克隆(安装/设置)Octopress repo:
git clone git://github.com/imathis/octopress.git sitename
cd sitename
bundle install
rake install
Run Code Online (Sandbox Code Playgroud)
很酷 - 所以现在我有Octopress的来源和我本地驱动器上的骨架网站.
根据文档,我应该能够通过以下方式更新到最新的Octopress更改:
git pull octopress master # Get the latest Octopress
bundle install # Keep gems updated
rake update_source # update the template's source
rake update_style # update the template's style
Run Code Online (Sandbox Code Playgroud)
但这会导致错误:
[sitename]$ git pull octopress master
fatal: 'octopress' does not appear to be a git repository
fatal: Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)
为什么这会失败?