Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sample to use app.MapStaticAssets(staticAssetsManifestPath: myManifestKey); #33059

Open
Rick-Anderson opened this issue Jul 12, 2024 · 1 comment
Labels
aspnet-core/svc code help wanted Sample code help wanted. doc-idea fundamentals/subsvc Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@Rick-Anderson
Copy link
Contributor

Rick-Anderson commented Jul 12, 2024

Description

Update the following code to use a manifest file and replace any app.UseStaticFiles(new StaticFileOptions code with

var myManifestKey = builder.Configuration["MyManifestPath"]
         ?? "manifests/manifest.json";

/// other code

 app.MapStaticAssets(staticAssetsManifestPath: myManifestKey);

Helpful links:

Page URL

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-8.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/static-files.md

Document ID

3fec6e08-fc99-7a5c-796f-3f2347cad891

Article author

@Rick-Anderson

@Rick-Anderson
Copy link
Contributor Author

Rick-Anderson commented Jul 12, 2024

@dazinator are you interested in updating app.UseStaticFiles(new StaticFileOptions to use app.MapStaticAssets(staticAssetsManifestPath: myManifestKey); ?

cc @Spacefish,

@Rick-Anderson Rick-Anderson added code help wanted Sample code help wanted. and removed ⌚ Not Triaged labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspnet-core/svc code help wanted Sample code help wanted. doc-idea fundamentals/subsvc Source - Docs.ms Docs Customer feedback via GitHub Issue
2 participants