无法建立Git Bash Jekyll网站

时间:2019-03-03 20:19:48

标签: github command-line jekyll github-pages git-bash

我对github页面和jekyll还是很陌生,但是我正尝试使用它们来启动自己的个人网站,每当我尝试执行“ $ bundle exec jekyll serve”时,它都会说“配置文件:无”尽管本地目录中有一个_config.yml文件。随之而来的还有其他一些错误,使我无法审查自己的工作(在下面发布)。有什么建议/解决方案吗? myWebsite是父文件夹,jekyllRepo是_config.yml文件和其他几个文件所在的jekyll存储库。

$ bundle exec jekyll serve
Configuration file: none
Source: C:/Users/Owner/myWebsite
Destination: C:/Users/Owner/myWebsite/_site
Incremental build: disabled. Enable with --incremental
  Generating...
 Build Warning: Layout 'post' requested in jekyllRepo/_posts/2019-03-03-welcome-to-jekyll.markdown does not exist.
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
GitHub Metadata: Error processing value 'title':
Liquid Exception: No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your github.com repository. in /_layouts/default.html
         ERROR: YOUR SITE COULD NOT BE BUILT:
                ------------------------------------
                No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your github.com repository.

2 个答案:

答案 0 :(得分:0)

首先,您应该确认安装了Jekyll和Bundler宝石

$ jekyll -v

您应该看到

jekyll 3.8.5 -- Jekyll is a blog-aware, static site generator in Ruby

如果尚未安装,请使用

安装
$ gem install jekyll bundler

如果已安装,则只需在网站根目录中使用 jekyll (不是bundle命令)命令

$ jekyll serve
$ jekyll build

是的,我也发现网站上的入门有点令人困惑...

答案 1 :(得分:0)

由于您尚未提供到存储库的链接,因此我将根据您的终端输出进行一些假设。 因此,这将是一个反复试验的答案。

您可能有一个带有gem 'github-pages', group: :jekyll_plugins的Gemfile 或可能包含

group :jekyll_plugins do
  gem 'github-pages'
end

无论哪种方式,都将github-pages:jekyll_plugins组中移出。也就是说,您应该只列出一个清单:

source 'https://rubygems.org'

gem 'github-pages'