在编写新文章页面强制加入description和keywords字段并在前台文章页面输出
主题的functions.php文件,找到function themeFields($layout) {
添加如下代码:

$title = new Typecho_Widget_Helper_Form_Element_Text('title', NULL, NULL, _t('文章title标题'), _t('SEO设置'));
$keywords = new Typecho_Widget_Helper_Form_Element_Text('keywords', NULL, NULL, _t('文章keywords关键词'), _t('SEO设置'));
$description = new Typecho_Widget_Helper_Form_Element_Text('description', NULL, NULL, _t('文章description描述'), _t('SEO设置'));
$layout->addItem($title);
$layout->addItem($keywords);
$layout->addItem($description);

在模板header.php文件中长到meta项添加如下代码:

<meta name="description" content="<?php $d=$this->fields->description;if(empty($d) || !$this->is('single')){if($this->getDescription()){echo $this->getDescription();}}else{ echo $d;};?>" />
<meta name="keywords" content="<?php $k=$this->fields->keyword;if(empty($k) || !$this->is('single')){echo $this->keywords();}else{ echo $k;};?>" />

最后在模板header.php文件中找到<?php $this->header(); ?>替换为:

<?php $this->header('keywords=&description='); ?>