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
    Jan 22, 2025 @ 05:41
    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 1625 posts 7295 karma points MVP 7x c-trib
    Jan 22, 2025 @ 23:34
    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
    Jan 23, 2025 @ 06:29
    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>
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" button below.

    Continue discussion

Please Sign in or register to post replies