mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
seo优化标题,描述,文章
This commit is contained in:
@@ -147,12 +147,12 @@ class Post extends Model
|
|||||||
|
|
||||||
public function getShareTextAttr()
|
public function getShareTextAttr()
|
||||||
{
|
{
|
||||||
$shareText = get_system_config('post_share_text_tpl');
|
$share_text = get_system_config('post_share_text_tpl');
|
||||||
|
|
||||||
$shareText = str_replace('%post_title%',$this->getAttr('title'),$shareText);
|
$share_text = str_replace('%post_title%',$this->getAttr('title'),$share_text);
|
||||||
$shareText = str_replace('%post_desc%',$this->getAttr('desc'),$shareText);
|
$share_text = str_replace('%post_desc%',$this->getAttr('desc'),$share_text);
|
||||||
$shareText = str_replace('%post_url%',$this->getAttr('read_url'),$shareText);
|
$share_text = str_replace('%post_url%',$this->getAttr('read_url'),$share_text);
|
||||||
|
|
||||||
return $shareText;
|
return $share_text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<div class="layui-col-md2">
|
<div class="layui-col-md2">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<a href="{:url('Index/index')}">
|
<a href="/">
|
||||||
<img src="{:get_source_link(get_system_config('site_logo'))}" alt="">
|
<img src="{:get_source_link(get_system_config('site_logo'))}" alt="">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-left-container">
|
<div class="nav-left-container">
|
||||||
<div class="nav-left-list">
|
<div class="nav-left-list">
|
||||||
<a href="{:url('Index/index')}" {eq name='$Request.param.category_id|default=0' value='0'} class="current" {/eq}>全部</a>
|
<a href="/" {eq name='$Request.param.category_id|default=0' value='0'} class="current" {/eq}>全部</a>
|
||||||
{volist name='list_header_nav' id='nav'}
|
{volist name='list_header_nav' id='nav'}
|
||||||
<a href="{$nav.value}" target="{$nav.target}">{$nav.title}</a>
|
<a href="{$nav.value}" target="{$nav.target}">{$nav.title}</a>
|
||||||
{/volist}
|
{/volist}
|
||||||
|
|||||||
@@ -13,22 +13,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="plus-post-list">
|
<div class="plus-post-list">
|
||||||
{volist name='top_posts' id='post'}
|
{volist name='top_posts' id='post_top'}
|
||||||
<a href="{:url('Post/read',['id'=>$post.id])}" class="plus-post-item"
|
<a href="{:url('Post/read',['id'=>$post.id])}" class="plus-post-item"
|
||||||
onmouseover="$(this).find('.poster').addClass('layui-anim-scale')"
|
onmouseover="$(this).find('.poster').addClass('layui-anim-scale')"
|
||||||
onmouseout="$(this).find('.poster').removeClass('layui-anim-scale')">
|
onmouseout="$(this).find('.poster').removeClass('layui-anim-scale')">
|
||||||
{notempty name='$post->getData("poster")'}
|
{notempty name='$post_top->getData("poster")'}
|
||||||
|
<div class="poster layui-anim" style="background-image: url('{$post_top.poster}');"></div>
|
||||||
<div class="poster layui-anim" style="background-image: url('{$post.poster}');"></div>
|
|
||||||
{/notempty}
|
{/notempty}
|
||||||
|
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="title">{$post.title}</div>
|
<div class="title">{$post_top.title}</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
{/volist}
|
{/volist}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{:get_system_config('site_name')}</title>
|
<title>{:get_system_config('site_name')}</title>
|
||||||
|
<meta name="description" content="{:get_system_config('site_desc')}{$current_category.title|default='全部文章'}.{$current_category.desc|default=''}">
|
||||||
{include file='common/_require'/}
|
{include file='common/_require'/}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{$post.title}</title>
|
<title>{$post.title}</title>
|
||||||
|
<meta name="description" content="{$post.desc|default=$post.title}" />
|
||||||
{include file='common/_require'/}
|
{include file='common/_require'/}
|
||||||
|
|
||||||
<link rel="stylesheet" href="/static/lib/quill/quill.snow.css">
|
<link rel="stylesheet" href="/static/lib/quill/quill.snow.css">
|
||||||
<link rel="stylesheet" href="/static/lib/highlight/styles/vs.css">
|
<link rel="stylesheet" href="/static/lib/highlight/styles/vs.css">
|
||||||
<script src="/static/lib/highlight/highlight.pack.js"></script>
|
<script src="/static/lib/highlight/highlight.pack.js"></script>
|
||||||
@@ -50,9 +50,9 @@
|
|||||||
<div class="layui-col-md7">
|
<div class="layui-col-md7">
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<div class="content-container">
|
<div class="content-container">
|
||||||
<div class="title">
|
<h1 class="title">
|
||||||
{$post.title}
|
{$post.title}
|
||||||
</div>
|
</h1>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span>{$post->publish_time_text}</span>
|
<span>{$post->publish_time_text}</span>
|
||||||
<span>{:get_system_config('default_author')}</span>
|
<span>{:get_system_config('default_author')}</span>
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
<div class="ql-snow">
|
<div class="ql-snow">
|
||||||
<div class="ql-editor">{$post->content_html|raw}</div>
|
<article class="ql-editor">{$post->content_html|raw}</article>
|
||||||
</div>
|
</div>
|
||||||
<div class="copyright">
|
<div class="copyright">
|
||||||
{:get_system_config('post_copyright')}
|
{:get_system_config('post_copyright')}
|
||||||
|
|||||||
Reference in New Issue
Block a user