Closed minhnh94 closed 5 years ago
@minhnh94
Thank you for using this plugin. To get img
and excerpt
, please specify eyeCatchImage and description in frontmatter of markdown file. For example, it is a description example as follows.
プラグインをご利用いただきありがとうございます。img
とexcerpt
を取得するには、markdownファイルのfrontmatterでeyeCatchImage
とdescription
を指定してください。例えば次のような記述例となります。
---
title: Title sample
tags:
- program
- diary
- web
date: 2018-10-17 12:00:00
eyeCatchImage: https://sample.image-01.jpg
description: Write excerpt here.
---
hoge hoge
Also, it is possible to omit eyeCatchImage
. In this case, the image file that appears first in the article is automatically acquired as img
.
また、eyeCatchImage
を省略することが可能です。この場合は、記事の中で1番目に登場する画像ファイルをimg
として自動取得します。
In addition, please specify isImage: true
andisExcerpt: true
options for themepopular_posts ()
and popular_posts_json ()
. For example, article.ejs of hexo-theme-landscape specifies as follows I will.
さらに、テーマに記述するpopular_posts()
やpopular_posts_json()
にはisImage: true
とisExcerpt: true
のオプション指定をしてください。例えばhexo-theme-landscapeのarticle.ejsでは次のように指定します。
<h3>Related posts</h3>
<div>
<%- popular_posts( {isImage: true, isExcerpt: true} , page ) %>
</div>
https://github.com/tea3/hexo-related-popular-posts/wiki/More-Settings#hepler
有用なプラグインありがとうございます。使わせていただいています。 ちょっと質問なんですが、popular_posts_json()が返している
{ date: '', img: '', title: 'Mentality to fight against loneliness and depression', path: '/en/lifestyle/mentality-to-fight-against-loneliness-and-depression/', excerpt: '' }
のような戻り値ですがimgとexcerptは空っぽです。 markdownファイルのfrontmatterでimgとexcerptを定義するようにしていますがここの戻り値ではゲットできないです。 どういう定義しかたでimgとexcerptが取得できるのですか?