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

601 views Asked by At

First of all, I would like to say I have tried for 2+ hours to try and correct this error, but alas I cannot figure it out. I am also a newbie to Jekyll and Github Pages. However, I am competent in code and can correct any errors.

When I go to my github pages for this repository:


Repository link 2:https://github.com/jeffward01/Conscience-Alchemy.git

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


There is no formating applied. I know/suspect its a problem with my base.url and/or url in the _config.yml file. I have tried 14 combinations and cannot figure it out.

When I run jekyll serve --baseurl it runs and applies the formating/styles... But, when I go to the GitHub pages, it does not...

Does anyone have any tips/advice/answers?

Thanks!!

For your ease, here is my _config.yml file:

`
# Site settings
title: Conscience Alchemy
description: "A blog about Conscienceness and Alchemy"
url: "http://jeffward01.github.io"
author:
  name: "Jeff Ward"
  email: "[email protected]"
  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
'

And here is the beginning of my index.html file (I was not sure if you needed other file so I did not add them. They are on my GitHub Tree tho.)

---
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>
2

There are 2 answers

0
David Jacquel On BEST ANSWER

In your _config.yml repository you have baseurl: /, I think you must change it to baseurl: /Conscience-Alchemy.

0
Courtny On

The baseurl: subpath in the _config.yml file must be pointed to the project's repository name.

Example: baseurl: "/<repositoryname>" or, in this case baseurl: "/Conscience-Alchemy"