更新 : 2020-05-22
手动调用 mini html 也是 ok 的
然后发现, whitespace 无法 clear 掉 span new line 这种情况.
https://css-tricks.com/fighting-the-space-between-inline-block-elements/
span new line 会有 space, 但是这个是 html 的设计啦,不 clear 因为这样比较安全, 不会因为 mini 而破坏最终的呈现.
更新 : 2019-05-04
补上一个完整的 startup.cs
public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; } public IConfiguration Configuration { get; } public void ConfigureServices(IServiceCollection services) { var fileExtensionContentTypeProvider = new FileExtensionContentTypeProvider(); fileExtensionContentTypeProvider.Mappings[".webmanifest"] = "application/manifest+json"; services.AddSingleton<IContentTypeProvider>(fileExtensionContentTypeProvider); services.Configure<RewriteOptions>(options => { options.AddRedirectToWww(); }); services.Configure<RewriteOptions>(options => { options.AddRedirectToHttps(); }); services.AddResponseCompression(options => { options.EnableForHttps = true; }); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); } public void Configure(IApplicationBuilder app, IHostingEnvironment env, IServiceProvider serviceProvider) { app.UseRewriter(); app.UseResponseCompression(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); } app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = serviceProvider.GetService<IContentTypeProvider>(), OnPrepareResponse = ctx => { if (!env.IsDevelopment()) { var cachePeriod = TimeSpan.FromDays(365 * 15).TotalSeconds.ToString(); ctx.Context.Response.Headers.Append("Cache-Control", $"public, max-age={cachePeriod}"); } } }); app.UseMvc(); } }