seo优化

This commit is contained in:
LingZhaoHui 2020-09-30 00:49:32 +08:00
parent 7f631bd6cd
commit 829399038f
4 changed files with 47 additions and 47 deletions

View File

@ -32,7 +32,7 @@
<div class="blog-slider__wrp swiper-wrapper"> <div class="blog-slider__wrp swiper-wrapper">
<div class="blog-slider__item swiper-slide"> <div class="blog-slider__item swiper-slide">
<div class="blog-slider__img"> <div class="blog-slider__img">
<a href="${servePath}${article.articlePermalink}"> <a href="${article.articlePermalink}">
<img class="thumbnail" src="${adminUser.userAvatar!}" data-src="${article.articleImg1URL}" alt="${article.articleTitle!}" referrerpolicy="origin"> <img class="thumbnail" src="${adminUser.userAvatar!}" data-src="${article.articleImg1URL}" alt="${article.articleTitle!}" referrerpolicy="origin">
</a> </a>
</div> </div>
@ -41,19 +41,19 @@
<span class="blog-slider__code" <span class="blog-slider__code"
style="display:inline-block">${article.articleUpdateDate?string("yyyy年MM月dd日")}</span> style="display:inline-block">${article.articleUpdateDate?string("yyyy年MM月dd日")}</span>
<#if article.categoryURI??> <#if article.categoryURI??>
<span><a class="has-link-black-ter" <h1 style="display:inline-block"><a class="has-link-black-ter"
href="${servePath}/category/${article.categoryURI}">${article.articleCategory}</a></span> href="/category/${article.categoryURI}">${article.articleCategory}</a></h1>
</#if> </#if>
</div> </div>
<div class="blog-slider__title "><a class="title is-5" <h2 class="blog-slider__title "><a class="title is-5"
href="${servePath}${article.articlePermalink}">${article.articleTitle!}</a> href="${article.articlePermalink}">${article.articleTitle!}</a>
</div> </h2>
<div class="blog-slider__text" content=""> <div class="blog-slider__text" content="">
<#if article.articleAbstractText!?length gt 24> <#if article.articleAbstractText!?length gt 24>
${article.articleAbstractText!?substring(0, 24)} ......<#else> ${article.articleAbstractText!?substring(0, 24)} ......<#else>
${article.articleAbstractText!}</#if> ${article.articleAbstractText!}</#if>
</div> </div>
<a href="${servePath}${article.articlePermalink}" <a href="${article.articlePermalink}"
class="blog-slider__button">阅读更多</a> class="blog-slider__button">阅读更多</a>
</div> </div>
</div> </div>
@ -64,7 +64,7 @@
<#else> <#else>
<div class="card"> <div class="card">
<div class="card-image"> <div class="card-image">
<a href="${servePath}${article.articlePermalink}"> <a href="${article.articlePermalink}">
<img class="thumbnail" src="${adminUser.userAvatar!}" data-src="${article.articleImg1URL}" alt="${article.articleTitle!}" referrerpolicy="origin"> <img class="thumbnail" src="${adminUser.userAvatar!}" data-src="${article.articleImg1URL}" alt="${article.articleTitle!}" referrerpolicy="origin">
</a> </a>
</div> </div>
@ -74,17 +74,17 @@
<time <time
class="level-item has-text-grey">${article.articleUpdateDate?string("yyyy年MM月dd日")}</time> class="level-item has-text-grey">${article.articleUpdateDate?string("yyyy年MM月dd日")}</time>
<#if article.articleCategory != ""> <#if article.articleCategory != "">
<a class="has-link-black-ter" <h1 style="display:inline-block"> <a class="has-link-black-ter"
href="${servePath}/category/${article.categoryURI}">${article.articleCategory}</a> href="/category/${article.categoryURI}">${article.articleCategory}</a></h1>
</#if> </#if>
</div> </div>
</div> </div>
<h3 class="title is-size-5 is-size-5-mobile has-text-weight-normal"> <h2 class="title is-size-5 is-size-5-mobile has-text-weight-normal">
<a class="has-link-black-ter" <a class="has-link-black-ter"
href="${servePath}${article.articlePermalink}">${article.articleTitle!}</a> href="${article.articlePermalink}">${article.articleTitle!}</a>
</h3> </h2>
<div id="is-hidden-touch" class="content is-hidden-touch"> <div id="is-hidden-touch" class="content is-hidden-touch">
<#if article.articleAbstractText!?length gt 128> <#if article.articleAbstractText!?length gt 128>
${article.articleAbstractText!?substring(0, 128)} ......<#else> ${article.articleAbstractText!?substring(0, 128)} ......<#else>
@ -96,7 +96,7 @@
<div class="level-start"> <div class="level-start">
<div class="level-item"> <div class="level-item">
<a class="button is-size-7 is-light" <a class="button is-size-7 is-light"
href="${servePath}${article.articlePermalink}">阅读更多</a> href="${article.articlePermalink}">阅读更多</a>
</div> </div>
</div> </div>
</div> </div>
@ -119,13 +119,13 @@
<div class="pagination-previous"> <div class="pagination-previous">
<a class="is-flex-grow has-text-black-ter" <a class="is-flex-grow has-text-black-ter"
href="${servePath}${path}?p=${paginationPreviousPageNum}">上一页</a> href="${path}?p=${paginationPreviousPageNum}">上一页</a>
</div> </div>
</#if> </#if>
<#if paginationCurrentPageNum !=paginationLastPageNum> <#if paginationCurrentPageNum !=paginationLastPageNum>
<div class="pagination-next"> <div class="pagination-next">
<a class="is-flex-grow has-text-black-ter" <a class="is-flex-grow has-text-black-ter"
href="${servePath}${path}?p=${paginationNextPageNum}">下一页</a> href="${path}?p=${paginationNextPageNum}">下一页</a>
</div> </div>
</#if> </#if>
@ -136,7 +136,7 @@
<li><span class="pagination-link is-current">${paginationPageNum}</span></li> <li><span class="pagination-link is-current">${paginationPageNum}</span></li>
<#else> <#else>
<li><a class="pagination-link" <li><a class="pagination-link"
href="${servePath}${path}?p=${paginationPageNum}">${paginationPageNum}</a></li> href="${path}?p=${paginationPageNum}">${paginationPageNum}</a></li>
</#if> </#if>
</#list> </#list>
</ul> </ul>

View File

@ -74,7 +74,7 @@
<nav class="navbar navbar-main is-paddingless "> <nav class="navbar navbar-main is-paddingless ">
<div class="container "> <div class="container ">
<div class="navbar-brand transparent"> <div class="navbar-brand transparent">
<a class="navbar-item navbar-logo" href="${servePath}" rel="start"> <a class="navbar-item navbar-logo" href="/" rel="start">
<img src="${faviconURL}" alt="${blogTitle!}" height="28"/> <img src="${faviconURL}" alt="${blogTitle!}" height="28"/>
&nbsp;${blogTitle!} &nbsp;${blogTitle!}
</a> </a>
@ -87,9 +87,9 @@
<div id="navMenu" class="navbar-menu transparent"> <div id="navMenu" class="navbar-menu transparent">
<div class="navbar-start transparent"> <div class="navbar-start transparent">
<div class="navbar-start"> <div class="navbar-start">
<a class="navbar-item" href="${servePath}/tags.html" rel="section">${allTagsLabel}</a> <a class="navbar-item" href="/tags.html" rel="section">${allTagsLabel}</a>
<a class="navbar-item" href="${servePath}/archives.html" rel="section">${archiveLabel}</a> <a class="navbar-item" href="/archives.html" rel="section">${archiveLabel}</a>
<a class="navbar-item" href="${servePath}/links.html" rel="section">${linkLabel}</a> <a class="navbar-item" href="/links.html" rel="section">${linkLabel}</a>
<#list pageNavigations as page> <#list pageNavigations as page>
<a class="navbar-item" href="${page.pagePermalink}" target="${page.pageOpenTarget}" <a class="navbar-item" href="${page.pagePermalink}" target="${page.pageOpenTarget}"
rel="section"> rel="section">
@ -102,14 +102,14 @@
<div class="navbar-end"> <div class="navbar-end">
<#if isLoggedIn> <#if isLoggedIn>
<a class="navbar-item" href="${servePath}/admin-index.do#main" title="${adminLabel}"> <a class="navbar-item" href="/admin-index.do#main" title="${adminLabel}">
${adminLabel} ${adminLabel}
</a> </a>
<a class="navbar-item" href="${logoutURL}"> <a class="navbar-item" href="${logoutURL}">
${logoutLabel} ${logoutLabel}
</a> </a>
<#else> <#else>
<a class="navbar-item" href="${servePath}/start"> <a class="navbar-item" href="/start">
${startToUseLabel} ${startToUseLabel}
</a> </a>
</#if> </#if>

View File

@ -20,9 +20,9 @@
<div class="card widget"> <div class="card widget">
<div class="card-content" style="width:100%"> <div class="card-content" style="width:100%">
<div class="menu"> <div class="menu">
<h3 class="menu-label"> <div class="menu-label">
${noticeBoardLabel} ${noticeBoardLabel}
</h3> </div>
<ul class="menu-list"> <ul class="menu-list">
${noticeBoard} ${noticeBoard}
</ul> </ul>
@ -39,14 +39,14 @@
</div> </div>
<div class="card widget"> <div class="card widget">
<div class="card-content"> <div class="card-content">
<h3 class="menu-label"> <div class="menu-label">
${mostViewCountArticlesLabel} ${mostViewCountArticlesLabel}
</h3> </div>
<#list mostViewCountArticles as article> <#list mostViewCountArticles as article>
<article class="media"> <article class="media">
<#if article.articleImg1URL?? && article.articleImg1URL!=''> <#if article.articleImg1URL?? && article.articleImg1URL!=''>
<a href="${servePath}${article.articlePermalink}" class="media-left"> <a href="${article.articlePermalink}" class="media-left">
<p class="image is-64x64"> <p class="image is-64x64">
<img class="thumbnail" src="${adminUser.userAvatar!}" data-src="${article.articleImg1URL!}" alt="${article.articleTitle!}"> <img class="thumbnail" src="${adminUser.userAvatar!}" data-src="${article.articleImg1URL!}" alt="${article.articleTitle!}">
</p> </p>
@ -60,7 +60,7 @@
${article.articleViewCount}浏览 ${article.articleViewCount}浏览
</div> </div>
</div> </div>
<a href="${servePath}${article.articlePermalink}" <a href="${article.articlePermalink}"
class="title has-link-black-ter is-size-6 has-text-weight-normal">${article.articleTitle!}</a> class="title has-link-black-ter is-size-6 has-text-weight-normal">${article.articleTitle!}</a>
</div> </div>
</div> </div>
@ -72,11 +72,11 @@
<div class="card widget"> <div class="card widget">
<div class="card-content"> <div class="card-content">
<div class="menu"> <div class="menu">
<h3 class="menu-label">${tagLabel}</h3> <div class="menu-label">${tagLabel}</div>
<div class="field is-grouped is-grouped-multiline"> <div class="field is-grouped is-grouped-multiline">
<#list mostUsedTags as tag> <#list mostUsedTags as tag>
<div class="control"> <div class="control">
<a class="tags has-addons" href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}"> <a class="tags has-addons" href="/tags/${tag.tagTitle?url('UTF-8')}">
<span class="tag">${tag.tagTitle}</span> <span class="tag">${tag.tagTitle}</span>
<span class="tag is-grey">${tag.tagPublishedRefCount!}</span> <span class="tag is-grey">${tag.tagPublishedRefCount!}</span>
</a> </a>

View File

@ -124,13 +124,13 @@ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);">
<div class="card widget"> <div class="card widget">
<div class="card-content"> <div class="card-content">
<div class="menu"> <div class="menu">
<h3 class="menu-label"> <div class="menu-label">
${categoryLabel} ${categoryLabel}
</h3> </div>
<ul class="menu-list"> <ul class="menu-list">
<#list mostUsedCategories as category> <#list mostUsedCategories as category>
<li> <li>
<a class="level is-marginless" href="${servePath}/category/${category.categoryURI}"> <a class="level is-marginless" href="/category/${category.categoryURI}">
<span class="level-start"> <span class="level-start">
<span class="level-item">${category.categoryTitle}</span> <span class="level-item">${category.categoryTitle}</span>
</span> </span>
@ -146,12 +146,12 @@ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);">
</div> </div>
<div class="card widget"> <div class="card widget">
<div class="card-content"> <div class="card-content">
<h3 class="menu-label"> <div class="menu-label">
${recentCommentsLabel} ${recentCommentsLabel}
</h3> </div>
<#list recentComments as comment> <#list recentComments as comment>
<article class="media"> <article class="media">
<a href="${servePath}${comment.commentSharpURL}" class="media-left"> <a href="${comment.commentSharpURL}" class="media-left">
<p class="image is-48x48"> <p class="image is-48x48">
<img class="thumbnail" src="${adminUser.userAvatar!}" <img class="thumbnail" src="${adminUser.userAvatar!}"
data-src="${comment.commentThumbnailURL}" data-src="${comment.commentThumbnailURL}"
@ -168,7 +168,7 @@ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);">
${comment.commentDate2?string("yyyy-MM-dd")} ${comment.commentDate2?string("yyyy-MM-dd")}
</div> </div>
</div> </div>
<a href="${servePath}${comment.commentSharpURL}" <a href="${comment.commentSharpURL}"
class="title has-link-black-ter is-size-6 class="title has-link-black-ter is-size-6
has-text-weight-normal"> ${comment.commentContent}</a> has-text-weight-normal"> ${comment.commentContent}</a>
</div> </div>
@ -181,9 +181,9 @@ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);">
<div class="card widget"> <div class="card widget">
<div class="card-content" style="width:100%"> <div class="card-content" style="width:100%">
<div class="menu"> <div class="menu">
<h3 class="menu-label"> <div class="menu-label">
${noticeBoardLabel} ${noticeBoardLabel}
</h3> </div>
<ul class="menu-list"> <ul class="menu-list">
${noticeBoard} ${noticeBoard}
</ul> </ul>
@ -201,13 +201,13 @@ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);">
</div> </div>
<div class="card widget"> <div class="card widget">
<div class="card-content"> <div class="card-content">
<h3 class="menu-label"> <div class="menu-label">
${mostViewCountArticlesLabel} ${mostViewCountArticlesLabel}
</h3> </div>
<#list mostViewCountArticles as article> <#list mostViewCountArticles as article>
<article class="media"> <article class="media">
<#if article.articleImg1URL?? && article.articleImg1URL!=''> <#if article.articleImg1URL?? && article.articleImg1URL!=''>
<a href="${servePath}${article.articlePermalink}" class="media-left"> <a href="${article.articlePermalink}" class="media-left">
<p class="image is-64x64"> <p class="image is-64x64">
<img class="thumbnail" src="${adminUser.userAvatar!}" data-src="${article.articleImg1URL!}" <img class="thumbnail" src="${adminUser.userAvatar!}" data-src="${article.articleImg1URL!}"
alt="${article.articleTitle!}"> alt="${article.articleTitle!}">
@ -221,7 +221,7 @@ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);">
<div class="has-text-grey is-size-7 is-uppercase">${article.articleViewCount}浏览 <div class="has-text-grey is-size-7 is-uppercase">${article.articleViewCount}浏览
</div> </div>
</div> </div>
<a href="${servePath}${article.articlePermalink}" <a href="${article.articlePermalink}"
class="title has-link-black-ter is-size-6 has-text-weight-normal">${article.articleTitle!}</a> class="title has-link-black-ter is-size-6 has-text-weight-normal">${article.articleTitle!}</a>
</div> </div>
</div> </div>
@ -234,13 +234,13 @@ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);">
<div class="card widget"> <div class="card widget">
<div class="card-content"> <div class="card-content">
<div class="menu"> <div class="menu">
<h3 class="menu-label"> <div class="menu-label">
${tagLabel} ${tagLabel}
</h3> </div>
<div class="field is-grouped is-grouped-multiline"> <div class="field is-grouped is-grouped-multiline">
<#list mostUsedTags as tag> <#list mostUsedTags as tag>
<div class="control"> <div class="control">
<a class="tags has-addons" href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}"> <a class="tags has-addons" href="/tags/${tag.tagTitle?url('UTF-8')}">
<span class="tag">${tag.tagTitle}</span> <span class="tag">${tag.tagTitle}</span>
<span class="tag is-grey">${tag.tagPublishedRefCount!}</span> <span class="tag is-grey">${tag.tagPublishedRefCount!}</span>
</a> </a>