Skip to content

Commit 1db3f74

Browse files
authored
Merge pull request #23 from ixre/feature
Feature
2 parents 0f16ba1 + 6fce66e commit 1db3f74

File tree

73 files changed

+700
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+700
-421
lines changed

src/JR.Cms.App/Routes.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private static void RegisterInstalledCmsRoutes(IEndpointRouteBuilder endpoints,
7373
dict.Add(UrlRulePageKeys.Tag, urlPrefix + "tag?t={0}");
7474
dict.Add(UrlRulePageKeys.TagPager, urlPrefix + "tag?t={0}&p={1}");
7575

76-
dict.Add(UrlRulePageKeys.Category, urlPrefix + "{0}/");
76+
dict.Add(UrlRulePageKeys.Category, urlPrefix + "{0}");
7777
dict.Add(UrlRulePageKeys.CategoryPager, urlPrefix + "{0}/list_{1}.html");
7878

7979
dict.Add(UrlRulePageKeys.Archive,urlPrefix + "{0}.html");

src/JR.Cms.App/Startup.cs

+11-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using Microsoft.AspNetCore.Diagnostics;
1212
using Microsoft.AspNetCore.Hosting;
1313
using Microsoft.AspNetCore.Http;
14+
using Microsoft.AspNetCore.ResponseCompression;
1415
using Microsoft.AspNetCore.Routing;
1516
using Microsoft.AspNetCore.Server.Kestrel.Core;
1617
using Microsoft.Extensions.DependencyInjection;
@@ -29,18 +30,25 @@ public void ConfigureServices(IServiceCollection services)
2930
services.AddDistributedMemoryCache();
3031
services.AddSession(options =>
3132
{
32-
options.Cookie.Name = "_cms_session";
33+
options.Cookie.Name = "j_session";
3334
options.IdleTimeout = TimeSpan.FromSeconds(1200);
3435
//options.Cookie.Path = "/" + Settings.SYS_ADMIN_TAG;
35-
options.Cookie.HttpOnly = true;
36+
options.Cookie.HttpOnly = false;
3637
options.Cookie.IsEssential = true;
3738
});
3839
// 启动异步IO
3940
services.Configure<IISServerOptions>(options => options.AllowSynchronousIO = true);
4041
services.Configure<KestrelServerOptions>(options => options.AllowSynchronousIO = true);
4142
// 使用MVC并添加Session支持
4243
services.AddControllers().AddSessionStateTempDataProvider();
43-
services.AddResponseCompression();
44+
// GZIP
45+
services.Configure<GzipCompressionProviderOptions>(options =>
46+
options.Level = System.IO.Compression.CompressionLevel.Fastest);
47+
services.AddResponseCompression(options =>
48+
{
49+
options.EnableForHttps = true;
50+
options.Providers.Add<GzipCompressionProvider>();
51+
});
4452
HttpContextNetCoreExtension.AddHttpContextAccessor(services);
4553
}
4654

src/JR.Cms.App/public/assets/base.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
百度分享用法:
2+
```
3+
<div class="bshare-custom">
4+
<a title="分享到" href="javascript:;" id="bshare-shareto" class="bshare-more">分享到</a>
5+
<a title="分享到QQ空间" class="bshare-qzone">QQ空间</a>
6+
<a title="分享到新浪微博" class="bshare-sinaminiblog">新浪微博</a>
7+
<a title="分享到腾讯微博" class="bshare-qqmb">腾讯微博</a>
8+
<a title="分享到微信" class="bshare-weixin">微信</a>
9+
<a title="分享到网易微博" class="bshare-neteasemb">网易微博</a>
10+
<a title="更多平台" class="bshare-more bshare-more-icon more-style-addthis"></a><span class="BSHARE_COUNT bshare-share-count">0</span>
11+
</div>
12+
<script type="text/javascript" charset="utf-8" src="https://static.bshare.cn/b/buttonLite.js#style=-1&amp;uuid=&amp;pophcol=2&amp;lang=zh"></script>
13+
<script type="text/javascript" charset="utf-8" src="https://static.bshare.cn/b/bshareC0.js"></script>
14+
```

src/JR.Cms.App/public/assets/bshare/bshareC0.js

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)