Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
智布道
OneBlog
比较版本
58cf8bf2d670213c11fe7e342a6ac3ef8141652c...ce7f0978086dc136b96433e0a57e2eabba8592fb
O
OneBlog
项目概览
智布道
/
OneBlog
9 个月 前同步成功
通知
11
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OneBlog
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
源分支
ce7f0978086dc136b96433e0a57e2eabba8592fb
选择Git版本
...
目标分支
58cf8bf2d670213c11fe7e342a6ac3ef8141652c
选择Git版本
比较
Commits (2)
https://gitcode.net/u011197448/oneblog/-/commit/b4f789397e1e30d526653ef8cfba5f2057d89977
:alien: admin 端首页的弹窗支持关闭后不再显示
2021-06-03T20:39:37+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/ce7f0978086dc136b96433e0a57e2eabba8592fb
:alien: 适配 csdn 平台 spider 规则
2021-06-03T20:40:46+08:00
yadong.zhang
yadong.zhang0415@gmail.com
显示空白变更内容
内联
并排
Showing
3 changed file
with
59 addition
and
9 deletion
+59
-9
blog-admin/src/main/resources/HunterConfig.json
blog-admin/src/main/resources/HunterConfig.json
+45
-5
blog-admin/src/main/resources/templates/include/macros.ftl
blog-admin/src/main/resources/templates/include/macros.ftl
+1
-0
blog-admin/src/main/resources/templates/index.ftl
blog-admin/src/main/resources/templates/index.ftl
+13
-4
未找到文件。
blog-admin/src/main/resources/HunterConfig.json
浏览文件 @
ce7f0978
...
@@ -20,22 +20,21 @@
...
@@ -20,22 +20,21 @@
"domain"
:
"blog.csdn.net"
,
"domain"
:
"blog.csdn.net"
,
"titleRegex"
:
"//h1[@class=title-article]/html()"
,
"titleRegex"
:
"//h1[@class=title-article]/html()"
,
"authorRegex"
:
"//a[@class=follow-nickName]/html()"
,
"authorRegex"
:
"//a[@class=follow-nickName]/html()"
,
"releaseDateRegex"
:
"//div[@class=article-bar-top]/span[@class=time]/html()"
,
"releaseDateRegex"
:
"//div[@class=article-bar-top]/
div[@class='bar-content']/
span[@class=time]/html()"
,
"contentRegex"
:
"//div[@id=content_views]/html()"
,
"contentRegex"
:
"//div[@id=content_views]/html()"
,
"tagRegex"
:
"//span[@class=artic-tag-box]/a[@class=tag-link]/html()"
,
"tagRegex"
:
"//span[@class=artic-tag-box]/a[@class=tag-link]/html()"
,
"targetLinksRegex"
:
"
.*blog
\\
.csdn
\\
.net/{uid}/article/details/[0-9a-zA-Z]{1,15}
"
,
"targetLinksRegex"
:
"
(((http|ftp|https):
\\
/
\\
/[0-9a-zA-Z]{1,15}.blog.csdn.net/article/details/[0-9a-zA-Z]{1,15})|((http|ftp|https):
\\
/
\\
/blog.csdn.net/{uid}/article/details/[0-9a-zA-Z]{1,15}))
"
,
"header"
:
[
"header"
:
[
"Host=blog.csdn.net"
,
"Host=blog.csdn.net"
,
"Referer=https://blog.csdn.net/{uid}/article/list/1"
"Referer=https://blog.csdn.net/{uid}/article/list/1"
],
],
"cookie"
:
""
,
"entryUrls"
:
[
"entryUrls"
:
[
"https://blog.csdn.net/{uid}/article/list/1"
"https://blog.csdn.net/{uid}/article/list/1"
]
]
},
},
"iteye"
:
{
"iteye"
:
{
"domain"
:
"{uid}.iteye.com"
,
"domain"
:
"{uid}.iteye.com"
,
"titleRegex"
:
"//div[@class=blog_title]/h3/
a/html
()"
,
"titleRegex"
:
"//div[@class=blog_title]/h3/
text
()"
,
"authorRegex"
:
"//div[@id=blog_owner_name]/html()"
,
"authorRegex"
:
"//div[@id=blog_owner_name]/html()"
,
"releaseDateRegex"
:
"//div[@class=blog_bottom]/ul/li[1]/html()"
,
"releaseDateRegex"
:
"//div[@class=blog_bottom]/ul/li[1]/html()"
,
"contentRegex"
:
"//div[@class=iteye-blog-content-contain]/html()"
,
"contentRegex"
:
"//div[@class=iteye-blog-content-contain]/html()"
,
...
@@ -98,5 +97,46 @@
...
@@ -98,5 +97,46 @@
"entryUrls"
:
[
"entryUrls"
:
[
"https://www.v2ex.com/member/{uid}"
"https://www.v2ex.com/member/{uid}"
]
]
},
"oschina"
:
{
"domain"
:
"oschina.net"
,
"titleRegex"
:
"//h1[@class=article-box__title]/a/text()"
,
"authorRegex"
:
"//div[@class=article-box__meta]/div[@class=item-list]/div[2]/a/html()"
,
"releaseDateRegex"
:
"//div[@class=article-box__meta]/div[@class=item-list]/div[4]/html()"
,
"contentRegex"
:
"//div[@class=content]/html()"
,
"tagRegex"
:
"//div[@class=tags-box]/div[@class=tags-box__inner]/a/html()"
,
"targetLinksRegex"
:
"https://my.oschina.net/.*/blog/[0-9]{1,10}"
,
"header"
:
[
"Host=my.oschina.net"
,
"Referer=https://my.oschina.net"
],
"entryUrls"
:
[
"https://my.oschina.net/{uid}"
,
"https://my.oschina.net/u/{uid}"
]
},
"jianshu"
:
{
"resolver"
:
{
"releaseDate"
:
{
"type"
:
"regex"
,
"clazz"
:
"java.lang.Long"
,
"operator"
:
"* 1000"
}
},
"domain"
:
"jianshu.com"
,
"titleRegex"
:
"//h1[@class=_1RuRku]/text()"
,
"authorRegex"
:
"//span[@class=_22gUMi]/html()"
,
"releaseDateRegex"
:
".*
\"
first_shared_at
\"
:([0-9]+),.*"
,
"contentRegex"
:
"//article[@class=_2rhmJa]/html()"
,
"tagRegex"
:
"//div"
,
"targetLinksRegex"
:
"/p/[0-9a-zA-Z]{1,15}"
,
"header"
:
[
"Host=www.jianshu.com"
,
"Referer=https://www.jianshu.com/p/{uid}"
],
"entryUrls"
:
[
"https://www.jianshu.com/p/{uid}"
,
"https://www.jianshu.com/u/{uid}"
]
}
}
}
}
blog-admin/src/main/resources/templates/include/macros.ftl
浏览文件 @
ce7f0978
...
@@ -343,6 +343,7 @@
...
@@ -343,6 +343,7 @@
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<span
class=
"pull-left"
>
tips: 如不想显示该弹窗,可在
<code>
index.ftl
</code>
中搜索
<code>
aboutOneBlog
</code>
后删掉相关代码
</span>
<span
class=
"pull-left"
>
tips: 如不想显示该弹窗,可在
<code>
index.ftl
</code>
中搜索
<code>
aboutOneBlog
</code>
后删掉相关代码
</span>
<button
type=
"button"
class=
"btn btn-danger"
data-dismiss=
"modal"
id=
"neverShowNoticeModal"
><i
class=
"fa fa-close"
>
不再显示
</i></button>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
><i
class=
"fa fa-close"
>
关闭
</i></button>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
><i
class=
"fa fa-close"
>
关闭
</i></button>
</div>
</div>
</div>
</div>
...
...
blog-admin/src/main/resources/templates/index.ftl
浏览文件 @
ce7f0978
...
@@ -68,8 +68,6 @@
...
@@ -68,8 +68,6 @@
}
}
</style>
</style>
</@header>
</@header>
<#-- 网站首页的项目介绍内容 -->
<@aboutOneBlog></@aboutOneBlog>
<div class="row">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12 top_tiles">
<div class="col-md-12 col-sm-12 col-xs-12 top_tiles">
<#-- 文章 -->
<#-- 文章 -->
...
@@ -250,9 +248,21 @@
...
@@ -250,9 +248,21 @@
</div>
</div>
</div>
</div>
</div>
</div>
<#-- 网站首页的项目介绍内容 -->
<@aboutOneBlog></@aboutOneBlog>
<@footer>
<@footer>
<script src="https://cdn.jsdelivr.net/npm/echarts@4.1.0/dist/echarts.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@4.1.0/dist/echarts.min.js"></script>
<script src="/assets/js/zhyd.echarts.js"></script>
<script src="/assets/js/zhyd.echarts.js"></script>
<#-- 显示或者关闭首页的弹窗,当点击“不再显示后”,如果清缓存,这个弹窗仍然会再次显示 -->
<script type="text/javascript">
var neverShowNoticeModal = localStorage.getItem("neverShowNoticeModal");
if(!neverShowNoticeModal) {
$("#noticeModal").modal('show');
}
$("#neverShowNoticeModal").click(function (){
localStorage.setItem("neverShowNoticeModal", 1);
})
</script>
<script>
<script>
/* 顶部卡片统计 */
/* 顶部卡片统计 */
$.post("/statistics/siteInfo", function (json) {
$.post("/statistics/siteInfo", function (json) {
...
@@ -300,6 +310,5 @@
...
@@ -300,6 +310,5 @@
return resultArr;
return resultArr;
}
}
init_echarts();
init_echarts();
$("#noticeModal").modal('show');
</script>
</script>
</@footer>
</@footer>