hexo-theme-keep icon indicating copy to clipboard operation
hexo-theme-keep copied to clipboard

关于description文字换行的问题

Open jacksparrow414 opened this issue 4 years ago • 3 comments

在首屏的description选项中,如果想要展示多行文字,应该怎么写呢? description: a, b 想要的首屏效果是: a, b 而不是a,b 使用\n,|, |+都未能实现段落效果

jacksparrow414 avatar May 17 '21 13:05 jacksparrow414

@jacksparrow414 目前不支持换行,后续版本再加上

XPoet avatar May 24 '21 14:05 XPoet

好的,感谢. 😃

jacksparrow414 avatar May 25 '21 01:05 jacksparrow414

我有同样的需求,我不是前端程序员,艰难地看了一下代码,貌似是first-screen.ejs文件中第4行的"<%= theme.style.first_screen.description || config.description %>"这里处理的,查了一下ejs中<%= %>会转义处理,<%- %>不转义处理,不知道是否是因为安全性的考虑选择了<%= %>?

Learner110110 avatar Feb 10 '22 09:02 Learner110110

@jacksparrow414 @Learner110110 Keep 主题 v3.5.0 即将发布,首屏描述将会支持换行,换行符 ||

XPoet avatar Sep 26 '22 14:09 XPoet

Keep 主题 v3.4.6 已支持该功能,请使用最新版本。

npm install [email protected]
  # First screen style settings
  first_screen:
    enable: true # Option values: true | false

    # First screen description
    # You can use the "||" to begin a newline, maximum is two lines.
    description: Keep writing and Keep loving. || this is a test sentence

XPoet avatar Sep 27 '22 14:09 XPoet