I am trying to setup github pages using jekyll theme chirpy-starter. Build step successfully generates the html files however internal href and broken. And this can be verified using html proofer.
To replicate the similar issue locally I followed below steps.
jekyll new my-awesome-site
cd my-awesome-site
# Update _config.yml
baseurl: "/blog"
url: "https://example.com"
# Update Gemfile
group :test do
gem "html-proofer", "~> 3.18"
end
# Install gems
bundle
# Build website
bundle exec jekyll b -d "blog" # _site is default
# Html proof read
bundle exec htmlproofer blog --disable-external --check-html --allow_hash_href
After the build step, html files and other artifacts are generated in the blog directory. However, if we open any html file say index.html then all href have an additional forward slash at the start which in my understanding is wrong.
<link rel="stylesheet" href="/blog/assets/main.css">
Html proof reader also complains for the same thing.
- blog/404.html
* internally linking to /blog/, which does not exist (line 24)
<a class="site-title" rel="author" href="/blog/">Your awesome title</a>
How can I fix this locally?
For Github pages I am using workflow from here