Giter Club home page Giter Club logo

Comments (8)

tea3 avatar tea3 commented on June 3, 2024

@xaoxuu
Please specify eyeCatchImage and description in frontmatter of markdown file. It is explained in detail issue #13.

Please see the follow about frontmatter.
https://github.com/tea3/hexo-related-popular-posts/wiki/More-Settings#customize-html

from hexo-related-popular-posts.

xaoxuu avatar xaoxuu commented on June 3, 2024

Can I change the eyeCatchImage attribute in the blog's _config.yml ? Because the theme already uses other attributes, I have to duplicate the image link.

headimg: https://gitee.com/xaoxuu/cdn-assets/raw/master/blog/[email protected]
eyeCatchImage: https://gitee.com/xaoxuu/cdn-assets/raw/master/blog/[email protected]

This attribute may be different in different themes, such as header_img: or cover_img: ...

It would be great if it can be customized. 😁

from hexo-related-popular-posts.

tea3 avatar tea3 commented on June 3, 2024

@xaoxuu
I'm sorry. It cannot be specified in _config.xml. This attribute is a value specified for each article.

#13 (comment)

from hexo-related-popular-posts.

xaoxuu avatar xaoxuu commented on June 3, 2024

What I mean is, allow users to change eyeCatchImage to other attribute names to suit the user's hexo theme, for example:

Edit in blog/_config.yml:

popularPosts:
  eyeCatchImageAttributeName: themeHeaderImage

So users can write in front-matter like this:

---
title: xxx
themeHeaderImage: https://xxx.png
---

Instead of having to write both:

---
title: xxx
themeHeaderImage: https://xxx.png
eyeCatchImage: https://xxx.png
---

from hexo-related-popular-posts.

tea3 avatar tea3 commented on June 3, 2024

@xaoxuu
I see. Actually , this plugin supports the postImage and ampSettings attributes in addition to eyeCatchImage. Can't be customized, but can these attributes use?

if (post.eyeCatchImage || post.postImage || (post.ampSettings && post.ampSettings.titleImage.path) ) {

from hexo-related-popular-posts.

xaoxuu avatar xaoxuu commented on June 3, 2024

I submitted a pr about this, you can see if it works.

from hexo-related-popular-posts.

tea3 avatar tea3 commented on June 3, 2024

@xaoxuu
Thank you for suggestion. I want to merge tonight or tomorrow. Please wait for 🙏🏻

from hexo-related-popular-posts.

xaoxuu avatar xaoxuu commented on June 3, 2024

Thank you 🤝

from hexo-related-popular-posts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.