bdkjones / Kit

The Kit Compiler, as implemented in CodeKit
77 stars 6 forks source link

.kit — Code is not being inserted by CodeKit. #16

Closed didacus closed 7 years ago

didacus commented 7 years ago

I am having trouble making kit to work. Right now I am trying to import test.kit into the body, however after the build I only have the comment and not the HTML from the import. Do I need to activate any settings in CodeKit to compile this properly?

The files are at the same level, in the root of the folder.

Thank you in advance.

test.kit

<div>
  <h1>Hello world</h1>
</div>

index.html

<body>
  <!-- @import test.kit -->
</body>
bdkjones commented 7 years ago

Let me guess: the file containing this code ends in *.html, doesn't it?

Sent from my iPhone

On Aug 3, 2017, at 13:57, didacus notifications@github.com wrote:

I am having trouble making kit to work. Right now I am trying to import test.kit into the body, however after the build I only have the comment and not the HTML from the import. Do I need to activate any settings in CodeKit to compile this properly?

The files are at the same level, in the root of the folder.

Thank you in advance.

test.kit

Hello world

index.html

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

bdkjones commented 7 years ago

Yep. I think you can figure it out from there.

didacus commented 7 years ago

Thank you for the quick reply! I was not aware that the hosting file also needs to be .kit.

bdkjones commented 7 years ago

Why would an HTML file be treated as a Kit file? You can't, for example, write JavaScript in a *.txt file and wonder why it won't load.

Glad you got it sorted!

didacus commented 7 years ago

Just for future reference for the documentation. I understood the .kit file purpose. What was not very clear for me from reading the documentation (total noob) was that the ‘host‘ file containing the @import also need to be a .kit. Thank you once again, I have now implemented the nav from my website using kit. Super handy.