Lesson 2 question and issue

Following the 11ty tutorials and on Lesson 2. Running into a question and then an issue.

Question: when setting up the eleventy.js file we indicate that the input folder is ‘src’ and the output is ‘dist’. I assume when 11ty runs it takes the files in ‘src’, builds the site, then outputs it to a folder called ‘dist’. But that’s not the case, the site is outputted to a folder called ‘_site’. What am I missing here? Is ‘dist’ just a keyword that means use a default ‘_site’ directory?

Issue: after executing the ‘npx @11ty/eleventy --serve’ line, when I try to view the localhost site it gives me an error page with “cannot get /” displayed on it. Does anybody know what I’m doing wrong here? I’ve followed the tutorial exactly.

Thank you!

1 Like

Hi @greenmachine! Do you have a repo to share? One thing I noticed, and it might just be a typo in your comment but the config file should be named with a leading dot like so .eleventy.js.

1 Like

@Mathieu-Huot Ahh, that was it! You’re right, I omitted the leading dot at the beginning of the file name. Adding that fixed the issue. Thank you, that was driving me crazy, I restarted the tutorial several times trying to find where I slipped up.

2 Likes

@Mathieu-Huot good spot !

1 Like

Super! I’m glad it worked :slight_smile:. I like simple solutions!