默认情况下Typecho首页会全文输出所有文章内容,如果文章篇幅较长,不利于排版和阅读,通常需要对首页摘要字数进行限制,找到主题目录下面的index.php文件,找到如下代码:

<?php $this->content('- 阅读剩余部分 -'); ?>

将其替换为

<?php $this->excerpt(); ?>

如果要按制摘要的输出字数,可以修改代码为100

<?php $this->excerpt(100, '...'); ?>
最后修改:2023 年 01 月 12 日
如果觉得我的文章对你有用,请随意赞赏