Do not use welcome to Jekyll page

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 '<%='%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.
            Invalid date '<%='%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?

what is the name of the page? it looks like it was a post? why did you not just delete/edit it?

the error looks to be saying it is missing a date on the post - posts are required to have a date.

I have not built the default site in quite a while so I can’t remember what all is there, but you should be editing it not excluding it I would think.

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:

  - _posts/2019-09-07-welcome-to-jekyll.markdown

Your vendor/ directory is no longer excluded.

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.

I was running Jekyll so it appears that the patch you mentioned did not help. I will try modifying the excludes.

Changing the excludes as you suggested worked, thank you.

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.

activesupport (
addressable (2.7.0)
bigdecimal (default: 1.3.4)
bundler (2.0.2)
cmath (default: 1.0.0)
coffee-script (2.4.1)
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.13)
concurrent-ruby (1.1.5)
csv (default: 1.0.0)
date (default: 1.0.0)
dbm (default: 1.0.0)
did_you_mean (1.2.0)
dnsruby (1.61.3)
em-websocket (0.5.1)
etc (default: 1.0.0)
ethon (0.12.0)
eventmachine (1.2.7)
execjs (2.7.0)
faraday (0.15.4)
fcntl (default: 1.0.0)
ffi (1.11.1)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
forwardable-extended (2.6.0)
gdbm (default: 2.0.0)
gemoji (3.0.1)
github-pages (198)
github-pages-health-check (1.16.1)
html-pipeline (2.12.0)
http_parser.rb (0.6.0)
i18n (1.6.0, 0.9.5)
io-console (default: 0.4.6)
ipaddr (default: 1.2.0)
jekyll (4.0.0, 3.8.5)
jekyll-avatar (0.6.0)
jekyll-coffeescript (1.1.1)
jekyll-commonmark (1.3.1)
jekyll-commonmark-ghpages (0.1.5)
jekyll-default-layout (0.1.4)
jekyll-feed (0.12.1, 0.11.0)
jekyll-gist (1.5.0)
jekyll-github-metadata (2.12.1)
jekyll-mentions (1.4.1)
jekyll-optional-front-matter (0.3.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.2.0)
jekyll-redirect-from (0.14.0)
jekyll-relative-links (0.6.0)
jekyll-remote-theme (0.3.1)
jekyll-sass-converter (2.0.0, 1.5.2)
jekyll-seo-tag (2.6.1, 2.5.0)
jekyll-sitemap (1.2.0)
jekyll-swiss (0.4.0)
jekyll-theme-architect (0.1.1)
jekyll-theme-cayman (0.1.1)
jekyll-theme-dinky (0.1.1)
jekyll-theme-hacker (0.1.1)
jekyll-theme-leap-day (0.1.1)
jekyll-theme-merlot (0.1.1)
jekyll-theme-midnight (0.1.1)
jekyll-theme-minimal (0.1.1)
jekyll-theme-modernist (0.1.1)
jekyll-theme-primer (0.5.3)
jekyll-theme-slate (0.1.1)
jekyll-theme-tactile (0.1.1)
jekyll-theme-time-machine (0.1.1)
jekyll-titles-from-headings (0.5.1)
jekyll-watch (2.2.1)
jemoji (0.10.2)
json (default: 2.1.0)
kramdown (2.1.0, 1.17.0)
kramdown-parser-gfm (1.1.0)
liquid (4.0.3, 4.0.0)
listen (3.1.5)
mercenary (0.3.6)
mini_portile2 (2.4.0)
minima (2.5.1, 2.5.0)
minitest (5.11.3, 5.10.3)
multipart-post (2.1.1)
net-telnet (0.1.1)
nokogiri (1.10.4)
octokit (4.14.0)
openssl (default: 2.1.1)
pathutil (0.16.2)
power_assert (0.2.7)
psych (default: 3.0.2)
public_suffix (4.0.1, 3.1.1)
rake (12.3.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
rdoc (default: 6.0.1)
rouge (3.10.0, 3.9.0, 2.2.1)
ruby-enum (0.7.2)
ruby_dep (1.5.0)
rubyzip (1.2.4)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (4.0.0)
sassc (2.2.0)
sawyer (0.8.2)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
terminal-table (1.8.0)
test-unit (3.2.5)
thread_safe (0.3.6)
typhoeus (1.3.1)
tzinfo (1.2.5)
unicode-display_width (1.6.0)
webrick (default: 1.4.2)
zlib (default: 1.0.0)

Is there anything else I can do to help?

I have uploaded a copy of the site to GitHub. It contains more than what you are looking for, but it does include the complete site.

@caolin Thank you for providing the link to the repository.
I cloned it locally and experimented with it.

The exact error that you mentioned in this thread (regarding _posts/0000-00-00-welcome-to-jekyll.markdown.erb) couldn’t be reproduced.

So, there’s no bug in that patch…