Skip to content

Commit

Permalink
Merge pull request #23 from ixre/feature
Browse files Browse the repository at this point in the history
Feature
  • Loading branch information
ixre committed May 25, 2020
2 parents 0f16ba1 + 6fce66e commit 1db3f74
Show file tree
Hide file tree
Showing 73 changed files with 700 additions and 421 deletions.
2 changes: 1 addition & 1 deletion src/JR.Cms.App/Routes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private static void RegisterInstalledCmsRoutes(IEndpointRouteBuilder endpoints,
dict.Add(UrlRulePageKeys.Tag, urlPrefix + "tag?t={0}");
dict.Add(UrlRulePageKeys.TagPager, urlPrefix + "tag?t={0}&p={1}");

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

dict.Add(UrlRulePageKeys.Archive,urlPrefix + "{0}.html");
Expand Down
14 changes: 11 additions & 3 deletions src/JR.Cms.App/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.ResponseCompression;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -29,18 +30,25 @@ public void ConfigureServices(IServiceCollection services)
services.AddDistributedMemoryCache();
services.AddSession(options =>
{
options.Cookie.Name = "_cms_session";
options.Cookie.Name = "j_session";
options.IdleTimeout = TimeSpan.FromSeconds(1200);
//options.Cookie.Path = "/" + Settings.SYS_ADMIN_TAG;
options.Cookie.HttpOnly = true;
options.Cookie.HttpOnly = false;
options.Cookie.IsEssential = true;
});
// 启动异步IO
services.Configure<IISServerOptions>(options => options.AllowSynchronousIO = true);
services.Configure<KestrelServerOptions>(options => options.AllowSynchronousIO = true);
// 使用MVC并添加Session支持
services.AddControllers().AddSessionStateTempDataProvider();
services.AddResponseCompression();
// GZIP
services.Configure<GzipCompressionProviderOptions>(options =>
options.Level = System.IO.Compression.CompressionLevel.Fastest);
services.AddResponseCompression(options =>
{
options.EnableForHttps = true;
options.Providers.Add<GzipCompressionProvider>();
});
HttpContextNetCoreExtension.AddHttpContextAccessor(services);
}

Expand Down
4 changes: 2 additions & 2 deletions src/JR.Cms.App/public/assets/base.css

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions src/JR.Cms.App/public/assets/bshare/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
百度分享用法:
```
<div class="bshare-custom">
<a title="分享到" href="javascript:;" id="bshare-shareto" class="bshare-more">分享到</a>
<a title="分享到QQ空间" class="bshare-qzone">QQ空间</a>
<a title="分享到新浪微博" class="bshare-sinaminiblog">新浪微博</a>
<a title="分享到腾讯微博" class="bshare-qqmb">腾讯微博</a>
<a title="分享到微信" class="bshare-weixin">微信</a>
<a title="分享到网易微博" class="bshare-neteasemb">网易微博</a>
<a title="更多平台" class="bshare-more bshare-more-icon more-style-addthis"></a><span class="BSHARE_COUNT bshare-share-count">0</span>
</div>
<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>
<script type="text/javascript" charset="utf-8" src="https://static.bshare.cn/b/bshareC0.js"></script>
```
8 changes: 8 additions & 0 deletions src/JR.Cms.App/public/assets/bshare/bshareC0.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1db3f74

Please sign in to comment.