I'm running into a conflict error and a strange issue where my Homepage title is modified and "- Page 2" appears in the tab itself when I place a certain post inside the _posts folder. When I take this specific post out, the problem is resolved. The blog post itself works properly and I'm not encountering other issues. I'm running Minimal Mistakes theme and I'm knitting .Rmd
reports in RStudio with GitHub flavored markdown.
Link to my main repo
Link to the specific post inside repo
Link to config.yml
title: "Data visualisation"
date: "`r Sys.Date()`"
output:
md_document:
variant: gfm
library(knitr)
# macOS
# setwd("~/Developer/mkruisbrink.github.io/_reports/R-for-data-science/01-explore/01-data-visualisation/")
# Windows
setwd("D:/Max Kruisbrink/Developer/mkruisbrink.github.io/_reports/R-for-data-science/01-explore/")
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
# define knitr paths for macOS
#base.dir <- "~/Developer/mkruisbrink.github.io/"
# define knitr paths for Windows
base.dir <- "D:/Max Kruisbrink/Developer/mkruisbrink.github.io/"
base.url <- "/"
fig.path <- "assets/reports/R-for-data-science/01-explore/01-data-visualisation/"
# set knitr parameters
opts_knit$set(base.dir = base.dir, base.url = base.url)
opts_chunk$set(fig.path = fig.path)
I get a neat .md
file which I can place inside my _posts
folder with some yaml header. All other posts are processed fine, the error only appears when I place this specific post inside the folder.
title: "The basics of data visualisation in R"
excerpt: "These are the basics of visualizing data in R, using only the tidyverse functionality"
header:
overlay_image: /assets/images/midjourney-optimised/big-computer-screen-financial-dashoard-optimised.jpg
category:
- Exploration
I've tried the following:
_posts
folder to figure out the problem lies with this specific postbundle update
and bundle install
.Rmd
settings for other reports that are knitted in the same way and cause no issues.md
file to see if the bug came from something in the code perhaps--trace
in combination with bundle exec jekyll serve
for the same conflict results--verbose
in combination with bundle exec jekyll serve
and I could find ONE extra instance of something writing index.html
to _site
. So the following appears twice in the log. I know the culprit is this post but how to get more info on what is causing it?Writing: D:/Max Kruisbrink/Developer/mkruisbrink.github.io/_site/index.html
I'm starting to run out of options for my current skill level of debugging.
_includes
or _layouts
? I might have tweaked layouts but pretty sure I left the includes folder alone. But why would other posts be unaffected?source "https://rubygems.org"
gemspec
gem "webrick"
gem "jekyll-remote-theme"
gem "tzinfo" #windows dependancy?
gem "tzinfo-data"
Can someone point me in a direction here? Getting slightly clueless and I want to be a little cautious with my re-rolling. Thanks in advance!
Edit 2022-12-28
When I remove the permalink: \
from the main index.html
file, the error is resolved but when building the site with bundle exec jekyll serve
a strange page2
folder is created in _site
with its own index.html
However, I still think something is off with certain posts as the error is resolved when I move them to _drafts
.
Anyone any thoughts?
There was an issue with the _config.yml
file where I was mixing liquid syntax and the pagination plugin.
# Outputting
permalink: pretty
paginate: 5 # amount of posts to show
paginate_path: /page:num/
timezone: Europe/Amsterdam # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# Plugins (previously gems:)
plugins:
- jekyll-paginate
changing the outputting into the following solved my issue.
# Outputting
permalink: /:categories/:title/
timezone: Europe/Amsterdam # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
My final cue was the page2
folder that was being built and the fact that EVERY post that I added to my _posts
folder above the number 5 was causing issues.