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

how to append site keywords to each post #442

Closed
sunnycomes opened this issue Mar 30, 2019 · 1 comment
Closed

how to append site keywords to each post #442

sunnycomes opened this issue Mar 30, 2019 · 1 comment
Labels
discussion Any questions about this theme.

Comments

@sunnycomes
Copy link

Please make sure you took care of the following things before you submit this issue. Thank you!

  • [ √ ] I have set up and configured my blog according to the Hexo docs and the Icarus docs;
  • [ √] I have looked up Github issues and found no solutions to my problems.

My site keywords in hexo_root/_config.yml are: CJ Sun, Caijun Sun, IOVI. How can I append them to keywords of each post when generating html files? For example, my post Learning from Source Code, word2vec has 3 tags, respectively are Machine Learning, Word2vec, Word Embedding. By default, the generated html will be

<meta name="keywords" content="Machine Learning,Word2vec,Word Embedding">.

I need it to be

<meta name="keywords" content="Machine Learning,Word2vec,Word Embedding, CJ Sun, Caijun Sun, IOVI">.

I have read your code and tried to solve it, however it failed. Any solutions? Please give me some hints.

@ppoffice ppoffice added the discussion Any questions about this theme. label Apr 1, 2019
@ppoffice
Copy link
Owner

ppoffice commented Apr 1, 2019

@sunnycomes You can try to override the keywords for each post. For example, you may put the keywords in your post's front-matter:

  title: Getting Started with Icarus
  date: 2018-10-22 19:23:59
  thumbnail: /gallery/thumbnails/desert.jpg
  tags:
  - Getting Started
+ keywords: Machine Learning, Word2vec, Word Embedding, CJ Sun, Caijun Sun, IOVI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Any questions about this theme.
Projects
None yet
Development

No branches or pull requests

2 participants