Skip to content

Commit

Permalink
修复SEO问题
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoOuBa committed Feb 23, 2021
1 parent 3041eeb commit 15f7bee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/head.php
Expand Up @@ -12,8 +12,10 @@
<link rel="shortcut icon" href="<?php echo $this->options->JFavicon ? $this->options->JFavicon : 'https://cdn.jsdelivr.net/npm/typecho_joe_theme@4.3.5/assets/img/favicon.ico'; ?>" />

<!-- Typecho自有函数 -->
<?php if ($this->fields->keywords || $this->fields->desc) : ?>
<?php $this->header('keywords=' . $this->fields->keywords . '&description=' . $this->fields->desc); ?>
<?php if ($this->is('single')) : ?>
<meta name="description" content="<?php $this->fields->desc(); ?>" />
<meta name="keywords" content="<?php $this->fields->keywords(); ?>" />
<?php $this->header('keywords=&description='); ?>
<?php else : ?>
<?php $this->header(); ?>
<?php endif; ?>
Expand Down

0 comments on commit 15f7bee

Please sign in to comment.