jangdelong / hexo-theme-xups

hexo主题xups

Home Page:https://jelon.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

摘要怎么在md文件里写?用什么标签或关键字?

labike opened this issue · comments

commented

image

commented

摘要就写在blogexperpt,编译的时候会读取这字段的内容作为摘要,主要是在文章列表展示需要。

commented

给个模板吧,显示摘要,点击阅读更多,跳去文章页面,自己不好配置! 谢谢!
给你看一下我写的:
image
image

commented

你这md格式不对。应该像下面这样:

---
title: 这是标题
blogexcerpt: 这是摘要...
---

这是正文
这是正文
这是正文

blogexpcerpt 要写在标题那里。

commented

o, 我試一下,赶在下班之前 弄好, 谢谢!

commented

其实我自己Hexo博客项目里面是有一个md文件的脚手架的,但是在主题项目里面没有。

commented

那你怎么不放到主题里面呢?这样别人用方便很多。
还有个问题: 在headers.ejs里面这段切换标题栏的代码不用改,是会自动映射到相应的lab/about/commets中的吧

`

            <% for (var i in theme.menu) { %>  
    
                <li rel="<%= url_for(path) %>" class="item <%= url_for(theme.menu[i].link) == url_for(path).substring(0, url_for(path).lastIndexOf('/') + 1) ? 'current' : ''   %>">
                    <a href="<%= url_for(theme.menu[i].link) %>" title="<%= theme.menu[i].name %>" class="<%= theme.menu[i].icon %>">&nbsp;<%= theme.menu[i].name %></a>
                </li>
                <% } %>
        </ul>`
    

    如果是这样的话,切换到lab/commets/about页面是404,大概是什么原因导致的?

commented

这是自定义页面来的要自己新建一个page才行hexo new page 'about',哦,你这个问题我后面调整一下,把这些自定义页面也加上来。

commented

thanks