DougBeney / jekyll-pug

Jekyll Plugin That Allows You To Use Pug
MIT License
37 stars 2 forks source link

No such file or directory #2

Closed Anenth closed 7 years ago

Anenth commented 7 years ago

When I try to include the pug file, it throws an error.

Liquid Exception: No such file or directory - pug in /_layouts/default.html

This is what am doing:

{% include contact.pug %} 

the file contact.pug is present on _includes folder

DougBeney commented 7 years ago

Hi, Anenth!

Thank you for trying out Jekyll-Pug.

The first thing I will recommend doing is cloning the jekyll-pug-test repository and following the directions on its readme.md.

Jekyll-pug-test is a super simple jekyll-pug project that is good for learning how the plugin works and being completely sure if an issue you are experiencing is your fault or not.

From what it seems with your error code, there's a good chance jekyll-pug isn't installed properly.

I recommend following the install directions again and carefully look if there are any errors outputted.

If you've made it this far and haven't pinpointed the error yet, something you can do is create a public git repository with your jekyll-pug project and I could look into the code.

Best of luck!

DougBeney commented 7 years ago

Hi, Anenth.

Fix the issue yet?

Anenth commented 7 years ago

@DougBeney I havnt tried it till now, I will try it this week.

DougBeney commented 7 years ago

Hi, Anenth. Any update?

tmartin2089 commented 7 years ago

@Anenth try npm install -g pug-cli

@DougBeney had similar error, reading through compile.rb for the gem it doesn't seem to reach the error flag at line 70

raise ExecutableError, 'No pug executable found in your system. Did you forget to "npm install -g pug-cli"?'

Coworker with same version of ruby, jekyll etc, didn't have this error, but he's a heavy pug user so it was likely already globally installed.

Anenth commented 7 years ago

npm install -g pug-cli helped but am facing another problem

screenshot 2017-08-19 11 48 21

not able to include a html file from a pug file

DougBeney commented 7 years ago

Ah, I see the problem.

Change this line:

{% include svg-icons.html %}

To this:

| {% include svg-icons.html %}

With this plugin, Pug processes your files before Jekyll does. Pug is trying to turn {% into an HTML tag, which is not possible, so it's throwing an error. Adding the | (piped text symbol) at the start of a line let's Pug know that you want to write plain text.

For more information on how Pug handles plain-text, check out this part of the docs.

Anenth commented 7 years ago

@DougBeney Ho!!! I forgot about it. Thanks