Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub pages post links not working

I'm trying to get a Git Hub pages blog to work (https://vcedgar.github.io/CREU-Poly-17/), but when I go to the link my posts are supposed to be on the link doesn't work (404 page not found or 404 file not found.) The really weird this is that I have a page that displays a list of posts, and the post is showing up there just fine (date published, title, and blurb.) But when I click o the link from that page, it doesn't work. I have also gotten it to work sometimes, but then aftera while if I refresh the page it gives a 404.

Here's the code:

_config.yml

name: CREU 2017 Vatricia Edgar
markdown: kramdown
permalink: /CREU-Poly-17/:title
future: true

default layout

<!DOCTYPE html>
<html>
    <head>
        <title>{{ page.title }}</title>
        <!-- link to main stylesheet -->
        <link rel="stylesheet" type="text/css" href="/CREU-Poly-17/css/main.css">
    </head>
    <body>
        <h1 class = "head">CREU-17</h1>
        <nav>
            <ul>
                <li><a href="/CREU-Poly-17/">Home</a></li>
                <li><a href="/CREU-Poly-17/About/">About</a></li>
                <li><a href="/CREU-Poly-17/Blog/">Blog</a></li>
            </ul>
        </nav>
        <h2 class = "head">{{page.title}}</h2>
            <div class="container")
              {{ content }}
            </div><!-- /.container -->
        <footer>
            <ul>
                <p><a href="mailto:[email protected]">email</a></p>
                <p><a href="https://github.com/vcedgar">github</a></p>
            </ul>
        </footer>
    </body>
</html>

the post:

---
layout: default
title: Week1
date: 2017-09-01
published: true
---
fist post.

Also, here is the file/folder organization, in case that is relevant: About and Blog just contain the index.html for the About and Blog pages, _layout contains the default layout and the layout I wanted to use for posts (switched to default for posts to see if it would help, didn't), css obviously contains the css file (only one rn) and _posts contains the post file. My GitHub repo

I've been having trouble with my links on the blog ever since I started making it, but this one has stumped me. Any help is appreciated!

like image 962
123theone Avatar asked Sep 26 '26 03:09

123theone


1 Answers

In _config.yml :

url: https://vcedgar.github.io
baseurl: /CREU-Poly-17 #NO TRAILING SLASH

In your links : <a href="{{ site.baseurl }}/CREU-Poly-17/">Home</a>

like image 178
David Jacquel Avatar answered Sep 28 '26 18:09

David Jacquel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!