I do not want the welcome to Jekyll page that was generated when I created a new site, to appear in my site as it is irrelevant to my readers. I excluded it in the excludes section of my config.yml and I am now getting the following error when I rebuild my site:
Error: could not read file /home/jgossage/gems/gems/jekyll-4.0.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb: Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'gems/gems/jekyll-4.0.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'gems/gems/jekyll-4.0.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.
What is the correct way of ensuring that this page does not appear on my site?
The primary reason behind the error you’re seeing above is because you overrode the default excludes. i.e. by having the following in your config file:
The fix for this error is to ensure that you’ve vendor/ listed in your exclude: list if you’re customizing it. Depending on what version of Jekyll was used to create the boilerplate, there may or may not be a comment above the exclude: key in your config file.
However, Jekyll 4.0 has a patch built-in so vendor/ is always excluded even if users forget to exclude it explicitly.
Regarding the actual question this thread is about, the easiest solution is to just delete the welcome post.
This is not my file. It is provided by Jekyll when the jekyll new command is run to generate a new site. Since it contains nothing except information about Jekyll, it will not be interesting to my reaaders.
If you encountered this issue while using Jekyll 4.0, then it is a bug that has to be fixed.
Is your site’s source-code publicly available on GitHub or similar…? I’d like to confirm that you were indeed running Jekyll 4.0 and encountered the error nevertheless.
I am still developing and teaching myself so this is not code that will be deployed. I am just trying to figure out how things work. It is separate to anything else so I could create a new repository. Would this help? Would the output from any other command help you confirm that I was running 4.0.0? Here is the output from gem list that shows Jekyll 4.0.0 installed.