Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pepicrft/still_scss
🎨 A scss preprocessor for the Still static site generator
https://github.com/pepicrft/still_scss
css elixir scss still
Last synced: 15 days ago
JSON representation
🎨 A scss preprocessor for the Still static site generator
- Host: GitHub
- URL: https://github.com/pepicrft/still_scss
- Owner: pepicrft
- License: mit
- Created: 2022-07-24T09:23:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-19T10:50:17.000Z (about 1 year ago)
- Last Synced: 2024-10-31T20:05:06.504Z (2 months ago)
- Topics: css, elixir, scss, still
- Language: Elixir
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# still_scss
[![still_scss](https://github.com/pepicrft/still_scss/actions/workflows/still_scss.yml/badge.svg)](https://github.com/pepicrft/still_scss/actions/workflows/still_scss.yml)
`still_scss` provides a [Still preprocessor](https://hexdocs.pm/still/preprocessors.html#custom-preprocessors) to support processing .scss files in [Still](https://stillstatic.io/) projects.
## Usage
Add the dependency to your project's `mix.exs`:
```elixir
def deps do
[
{:still_scss, git: "https://github.com/pepicrft/still_scss.git"}
]
end
```Then edit the project's configuration to include the `StillScss.Preprocessor` preprocessor:
```exs
config :still,
dev_layout: false,
input: Path.join(Path.dirname(__DIR__), "priv/site"),
output: Path.join(Path.dirname(__DIR__), "_site"),
preprocessors: %{
".scss" => [
StillScss.Preprocessor,
Still.Preprocessor.OutputPath,
Still.Preprocessor.URLFingerprinting,
Still.Preprocessor.Save
]
}
```You can then refer to your `.scss` file using the [`link_to_css` helper](https://hexdocs.pm/still/Still.Compiler.TemplateHelpers.html#link_to_css/3):
```slime
= link_to_css @env, "/css/styles.scss", media: "all"
```## Development
### Release
To release a new version of the package bump the version in `mix.exs` and run `mix hex.publish`. Note that you need to have the right permissions on [hex](https://hex.pm).