Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • sam how 30 posts 130 karma points
    1 week ago
    sam how
    0

    How to use Smidge in Umbraco 13?

    How to use Smidge in Umbraco 13? I tried this code but it's not working.

     SmidgeHelper.RequiresCss("~/css/components/navbar.min.css");
    
  • Nik 1623 posts 7271 karma points MVP 7x c-trib
    1 week ago
    Nik
    0

    That bit registers the file you want with Smidge,

    But you will also need to tell Smidge where to output it.

    I think the code is something like

    SmidgeHelper.RenderCssHere()

  • jerin-ose 11 posts 32 karma points
    1 week ago
    jerin-ose
    1

    Use this below code in your program.cs

    app.UseSmidge(bundles =>
    {
    bundles.CreateCss("maincss", "~/css/main.css", "~/css/RTE Style.css");
    bundles.CreateJs("mainjs", "~/scripts/js/main.js", "~/scripts/js/vendors/core.js", "~/scripts/devscripts.js");
    
    });
    

    Then use below code to render in your html

     <link rel="stylesheet" href="maincss" /> 
    <script src="mainjs" ></script>
    
Please Sign in or register to post replies

Write your reply to:

Draft