Scss/css directory


I use scss and it works very well but now I searching for a possibility to have the css-file in css-directory. At the moment it would generated in scss folder.


    {{ $bs5 := resources.Get "scss/bootstrap5.scss" | toCSS | postCSS (dict "use" "autoprefixer") | minify | fingerprint "sha512" }}
    <link rel="stylesheet" href="{{ $bs5.RelPermalink }}" integrity="{{ $bs5.Data.Integrity }}">

become to this:

    <link rel="stylesheet" href="/scss/bootstrap5.min.b8d41679d71f804c3e57205b4180db06aa0aa1077eb0ffa7284b27972e05bb9ea90c76832220d6b4cb5a8964bf5bba56eab7bafdefb56c0107f922dff4c892e4.css" integrity="sha512-uNQWedcfgEw&#43;VyBbQYDbBqoKoQd&#43;sP&#43;nKEsnly4Fu56pDHaDIiDWtMtaiWS/W7pW6re6/e&#43;1bAEH&#43;SLf9MiS5A==">

Is it possible to config it?

See the targetPath option for .Resources.ToCSS

Hi jmooring,

I did it like this:

toCSS (dict "targetPath" "css/bootstrap5.css")

and it seems to work.

Thank you!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.