Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Script request] Add posts cover Front-Matter for themes #3

Open
7 of 10 tasks
remi-guan opened this issue Nov 2, 2021 · 0 comments
Open
7 of 10 tasks

[Script request] Add posts cover Front-Matter for themes #3

remi-guan opened this issue Nov 2, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@remi-guan
Copy link

Theme Branch:

  • Aurora:cover
  • Fluid:index_img 95961a4
  • Stun:top_image
  • Icarus:cover
  • Keep:V/A
  • Kaze: banner_img
  • Inside:thumbnail
  • Stellar: cover
  • Minidyne: V/A
  • Landscape: V/A

Describe the solution you'd like
Change cover: <link> in the posts front-matter to the themes required field, for example, theme Fluid uses index_img, so we need this script.

// scripts/meta-space-post-filter.js
hexo.extend.filter.register('before_post_render', function (data) {
  data.cover && (data.index_img = data.cover);
  return data;
});

Additional context:

If you're resolving one of the pending requests, please comment and link to this issue in your PR, so I can mark it as resolved.

@remi-guan remi-guan added the enhancement New feature or request label Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant