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