Github 页面上的 Jekyll 部署格式不正确(无样式)

Jekyll Deployment on Github Pages doesn't format correctly (No styling)

首先,我想说我已经尝试了 2 个多小时来尝试更正此错误,但可惜我无法弄清楚。我也是 Jekyll 和 Github Pages 的新手。但是,我的代码能力很强,可以纠正任何错误。

当我转到此存储库的 github 页面时:


存储库 link 2:https://github.com/jeffward01/Conscience-Alchemy.git

Github 页 link: https://jeffward01.github.io/Conscience-Alchemy


没有应用格式。我 know/suspect _config.yml 文件中的 base.url and/or url 有问题。我试了14种组合还是想不出来

当我 运行 jekyll serve --baseurl 它 运行 并应用 formating/styles... 但是,当我转到 GitHub 页面时,它不...

有人有 tips/advice/answers 吗?

谢谢!!

为了您的方便,这是我的 _config.yml 文件:

`
# Site settings
title: Conscience Alchemy
description: "A blog about Conscienceness and Alchemy"
url: "http://jeffward01.github.io"
author:
  name: "Jeff Ward"
  email: "conscience-alchemy@gmail.com"
  url: "http://jeffward01.github.io"
  baseurl: /Conscience-Alchemy

# Build settings
baseurl: /Conscience-Alchemy
markdown: kramdown
source: .
destination: ./_site
permalink: /:title
paginate: 8
paginate_path: /page:num/

# Default values
defaults:
  -
    scope:
      path: ""
      type: "posts"
    values:
      layout: "post"

# Custom variables
version: "1.68"

# Options
custom_header: false
custom_nav_footer: false
reverse: false
'

这是我的 index.html 文件的开头(我不确定您是否需要其他文件,所以我没有添加它们。它们在我的 GitHub 树上。)

---
layout: default
---
<!-- Posts -->
<ul id="posts">

    {% for post in paginator.posts %}

      <li class="post">
        <h2><a href="{% if site.baseurl == "/" %}{{ post.url }}{% else %}{{ post.url | prepend: site.baseurl }}{% endif %}">{{ post.title }}</a></h2>
        <time datetime="{{ post.date | date_to_xmlschema }}" class="by-line">{{ post.date | date_to_string }}</time>
        <p>{{ post.content | strip_html | truncatewords:50 }}</p>
      </li>

    {% endfor %}

</ul>

在您的 _config.yml 存储库中您有 baseurl: /,我认为您必须将其更改为 baseurl: /Conscience-Alchemy

_config.yml 文件中的 baseurl: 子路径必须指向项目的存储库名称。

示例:baseurl: "/<repositoryname>" 或者,在这种情况下 baseurl: "/Conscience-Alchemy"