Skip to content

Use SASS as a template engine for CSS/SCSS files #408

Closed

Description

@jonsage

It would be good to be able to optionally use node-sass as the template renderer for .css/scss files...

It seems to similar fit the same architectural pattern as any other template engine, albeit for a different type of file...

What would be the difficulty in supporting this as an option?

Thanks :)

Activity

  1. chrisdmacrae commented on Feb 14, 2019

    @chrisdmacrae
    Contributor

    @zachleat what's the opportunity on opening a plugin API for engines?

    If the engine API could be partially standardized, I think this could easily be done through plugins, allowing us to add less, sass, and more support.

  2. chrisdmacrae commented on Feb 14, 2019

    @chrisdmacrae
    Contributor

    I see this API binding a node module to a set of file extensions. This module would basically tell eleventy how to:

    • load the file
    • pass data to the file
    • render the file
  3. zachleat commented on Feb 17, 2019

    @zachleat
    Member

    This is exactly the thing proposed by #117. After this API becomes available, we can defer this to plugins (some first party, some third party).

  4. zachleat commented on Mar 8, 2019

    @zachleat
    Member

    This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open.

    View the enhancement backlog here. Don’t forget to upvote the top comment with 👍!

  5. djmtype commented on Aug 8, 2019

    @djmtype

    👍
    Any site, large or small, needs sass sourcemaps.

  6. SimonEast commented on May 11, 2021

    @SimonEast

    It's been nearly 2 years since a comment on this thread, but just noting that if this does go ahead, be aware that node-sass is deprecated (and I could never get it to work on Windows, anyway). sass (aka "Dart SASS") is the version to use now and is pure Javascript rather than Python.

    In the meantime, for those looking, I found eleventy-plugin-sass to be unusable (it uses the deprecated node-sass mentioned above), but this guide was helpful in getting SASS up and running. Would be nice to see that bundled into a clean plugin, but at least I understand what it's doing.

  7. einomi commented on May 15, 2021

    @einomi

    Hey @SimonEast, you can check out my 11ty starter that features Gulp and Dart SASS https://github.com/frontenso/frontenso-11ty-starter

  8. changed the title [-]Use SASS (node-sass) as a template engine for CSS/SCSS files[/-] [+]Use SASS as a template engine for CSS/SCSS files[/+] on Apr 12, 2024
  9. zachleat commented on Apr 17, 2025

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions