Jump to content

How can I add a custom `.less` file to my template code?

Recommended Posts

Posted

Hey all,

I need to add a custom `.less` file to the template. With my template directory open in my code editor, I added a new file `custom.less` under `styles` directory. I then edited the `template.conf` to reference this new `.less` file. My expectation was that all `.less` files in this `.conf` file would be picked up and rolled up into `.css` and included on the site, but it does not seem to work that way.

Is this a feature of Squarespace developer experience at all? Am I missing something?

 

Thanks.

  • 9 months later...
  • Replies 1
  • Views 722
  • Created
  • Last Reply
Posted

Hi Nooshin, even if this is an older question I'll attempt an answer - it does work like you describe, but if the LESS parser has problems with your file, it will skip it, so I suggest (because that's what I did) you check your LESS code with a linting tool - wither directly in your editor or just copy-paste here: http://lesscss.org/less-preview/ 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.