Incorrect links coming from Github Pages

First off, I’m a newbie to Github pages.

Somehow the links being returned by the website are incorrect. So, something changed in the web service. For example, this is a broken link (returns 404):
https://tsmcgrath.github.io/BMPStaging/SedimentBMPs/RiparianBMPs/WatershedConservation.html

But the html does not contain that path to the WatershedConservation.html page. So, how is the bad path being added on? Hundreds of errors like this.

I’ve recently just got site search working with lunr.js. Not sure if it’s related but these broken links weren’t there before when I checked with the W3C link checker.

It’s from Sedimentindex.html. But here’s the from line 109:
href=“RiparianBMPs/WatershedConservation.html”

SedimentBMPs and RiparianBMPs are both subfolders (peers) of the BMPStaging project repo. Github pages is directed to /(root). I’m baffled why the subfolder peer is getting appended.

My issue for this:

Well, I cannot find an edit that might have caused this problem. I tried to fix it with the baseurl variable:
<a href={{ "index.html" | prepend:site.baseurl }}>
but this is the resulting link I get:
https://tsmcgrath.github.io/BMPStaging/AgBMPs/{{Couldn’t find any info by searching on baseurl and %7B%7B. Hardwiring to the site/subdirectory works so I’m going to do that and stop wasting time.
<a href="/BMPStaging/BMPIndex.html">

This is the URL returned when I try to prepend the baseurl:
https://tsmcgrath.github.io/BMPStaging/AgBMPs/%7B%7B