github - 从 Github 下载了 Jekyll 网站,但它不在本地服务
问题描述
我用 Jekyll 创建了一个网站并将其上传到 github。这让我可以在此处免费托管我的网站(目前主要只是一个模板)回购:
https://github.com/themallardcomplexion/themallardcomplexion.github.io
它使用域名在线服务良好,但我尝试下载并在本地提供服务,但出现以下错误:
配置文件:无 来源:C:/Users/isw/Desktop/Taijisoce/themallardcomplexion.github.io-master 目的地:C:/Users/isw/Desktop/Taijisoce/themallardcomplexion.github.io-master/_site 增量构建:禁用. 启用 --incremental Generating... 构建警告:在 theallardcomplexion.github.io-master/_posts/2019-01-19-welcome-to-jekyll.markdown 中请求的布局“帖子”不存在。构建警告:在 theallardcomplexion.github.io-master/404.html 中请求的布局“默认”不存在。构建警告:在 theallardcomplexion.github.io-master/about.md 中请求的布局“页面”不存在。构建警告:在 theallardcomplexion.github.io-master/index.md 中请求的布局“主页”不存在。在 0.587 秒内完成。自动再生:http://127.0.0.1:4000 服务器正在运行...按 ctrl-c 停止。
它没有格式,只显示一个纯文本站点....有什么想法吗?
我尝试通过 Github 应用程序下载代码并将其下载为 zip
解决方案
错误来自 Jekyll 为您构建的页面寻找布局。您需要创建一个/_layouts/
包含站点所需的所有布局的文件夹:
/_layouts/
|
|--default.html
|
|--post.html
|
|--page.html
|
这些都对应于即将出现的构建警告。有关更多详细信息,请参阅 Jekyll教程和文档。
此外,与其下载 repo,不如克隆它。这样您就可以在本地处理更改,然后将更改推送到 GitHub。这是用于克隆 repo的文档的链接
推荐阅读
- html - 如何使用 Chrome 的设备工具栏?
- visual-studio - ASP.NET Core API 项目在调用 Main() 之前退出
- libraries - 如何在 Atmel Studio 7.0 中创建依赖项?
- flutter - 在 Flutter 中的小部件前面添加“新”有什么意义?
- javascript - 隐形验证码测试
- javascript - 无法让我的 POST 请求正常工作
- r - 如何同时合并多个 csv 文件并汇总每个组的多个变量
- javascript - Discord.js 中的 awaitReactions 问题
- sql-server - SQL Server bacpac 在最新更新中本地导入失败(在线索引操作只能在 SQL Server 企业版中执行)
- reactjs - 阴影不会出现在本机反应中