Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Snugug/8744763 to your computer and use it in GitHub Desktop.
Save Snugug/8744763 to your computer and use it in GitHub Desktop.

I have a Compass extension named Aurora that provides three templates, default, corona, and polaris. They share a set of files that get pulled in and placed via each's manifest.rb file. I share these files so I don't need identical copies of each in each template.

That being said, for one shared file, I'd like to add a line of code if I'm using the default template. I thought was I could do something like this:

# file.txt.erb
This is a file! Yay!

<% if Compass.template == 'default' %>
This is an extra line for when Default is used
<% end %>

My stumbling block is that I don't know if/how I would find what Compass.template in that situation would be.

@chriseppstein
Copy link

Can I see the manifest files? I think you can do some hacking in there to make this work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment