tea3 / hexo-related-popular-posts

A hexo plugin that generates a list of links to related posts and popular posts. Also , this plugin can get Visitor Counts (PV) on posts.
MIT License
109 stars 15 forks source link

Multiple posts could not contain a same tag (TypeError: this.localeData(...).postformat is not a function) #31

Open yihuajack opened 4 years ago

yihuajack commented 4 years ago

For BUG

OS version

Node version(node -v)

v12.18.4

Your site _config.yml

url: https://yihuajack.github.io
root: /
permalink: posts/:abbrlink.html
abbrlink:
    alg: crc16   #算法: crc16(default) and crc32
    rep: dec     #进制: dec(default) and hex
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: true
  tab_replace: ''
  wrap: true
  hljs: false
prismjs:
  enable: false
  preprocess: true
  line_number: true
  tab_replace: ''
index_generator:
  path: ''
  per_page: 10
  order_by: -date
default_category: uncategorized
category_map:
tag_map:
meta_generator: true
date_format: YYYY-MM-DD
time_format: HH:mm:ss
updated_option: 'mtime'
per_page: 10
pagination_dir: page
include:
exclude:
ignore:
plugin:
- hexo-generator-feed
feed:
  type: atom
  path: atom.xml
  limit: 20
  hub:
  content:
  content_limit: 140
  content_limit_delim: ' '
  order_by: -date
  autodiscovery: true
  template:
theme: next
deploy:
  type: git
  repo:
    github: xxx
    coding: xxx
githubEmojis:
  enable: true
  className: github-emoji
  inject: true
  styles:
  customEmojis:
    e-mail: https://twemoji.maxcdn.com/v/13.0.1/72x72/1f4e7.png
algolia:
  applicationID: xxx
  apiKey: xxx
  adminApiKey: xxx
  indexName: Ayka's Blog
  chunkSize: 5000

Your theme _config.yml

scheme: Pisces
darkmode: true
menu:
  home: / || fa fa-home
  about: /about/ || fa fa-user
  tags: /tags/ || fa fa-tags
  categories: /categories/ || fa fa-th
  archives: /archives/ || fa fa-archive
  #schedule: /schedule/ || fa fa-calendar
  #sitemap: /sitemap.xml || fa fa-sitemap
  commonweal: /404/ || fa fa-heartbeat
  links: /links/ || fa fa-link
avatar:
  url: /images/avatar.jpg
  rounded: true
  rotated: true
links:
  CSDN: https://blog.csdn.net/yihuajack
related_posts:
  enable: true
  title: 相关文章 # Custom header, leave empty to use the default one
  display_in_home: false
  params:
    maxCount: 5
    #PPMixingRate: 0.0
    isDate: true
calendar:
  calendar_id: yihuajack@gmail.com # Your Google account E-Mail
  api_key: xxx
  orderBy: startTime
  offsetMax: 24 # Time Range
  offsetMin: 4 # Time Range
  showDeleted: false
  singleEvents: true
  maxResults: 250
github_banner:
  enable: true
  permalink: https://github.com/yihuajack
  title: Follow me on GitHub
font:
  enable: true
  global:
    external: true
    family: Lato
    size:
  title:
    external: true
    family:
    size:
  headings:
    external: true
    family:
    size:
  posts:
    external: true
    family:
  codes:
    external: true
    family: JetBrains Mono
pjax: true
fancybox: true
valine:
  enable: true
  appid: xxx
  appkey: xxx
  notify: false # Mail notifier
  verify: false # Verification code
  placeholder: Just go go # Comment box placeholder
  avatar: mm # Gravatar style
  guest_info: nick,mail,link # Custom comment header
  pageSize: 10 # Pagination size
  language: en, zh-cn # Language, available values: en, zh-cn
  visitor: true # Article reading statistic
  comment_count: true # If false, comment count will only be displayed in post page, not in home page
  recordIP: false # Whether to record the commenter IP
  serverURLs: 
rating:
  enable: true
  id: 27455    # <app_id>
  color:  fc6423
algolia_search:
  enable: true
  hits:
    per_page: 10
  labels:
    input_placeholder: Search for Posts
    hits_empty: "We didn't find any results for the search: ${query}"
    hits_stats: "${hits} results found in ${time} ms"
defaultlinks:
  - nickname: Heson     # 昵称
    avatar: https://cdn.jsdelivr.net/gh/heson525/pic@master/pic/avatar03.png    # 头像地址
    site: https://www.heson10.com #友链地址
    info: 人生在勤,不索何获
friendslinks:

Plugin version(npm ls --depth 0)

hexo-site@0.0.0 D:\Documents\Programming\HexoBlog
+-- gulp@4.0.2
+-- gulp-htmlclean@2.7.22
+-- gulp-htmlmin@5.0.1
+-- gulp-minify-css@1.2.4
+-- hexo@5.2.0
+-- hexo-abbrlink@2.2.1
+-- hexo-algolia@1.3.1
+-- hexo-deployer-git@2.1.0
+-- hexo-filter-github-emojis@2.1.0
+-- hexo-footnotes@1.0.2
+-- hexo-generator-archive@1.0.0
+-- hexo-generator-category@1.0.0
+-- hexo-generator-feed@3.0.0
+-- hexo-generator-index@2.0.0
+-- hexo-generator-searchdb@1.3.3
+-- hexo-generator-tag@1.0.0
+-- hexo-related-popular-posts@5.0.1
+-- hexo-renderer-ejs@1.0.0
+-- hexo-renderer-marked@3.3.0
+-- hexo-renderer-stylus@2.0.1
`-- hexo-server@2.0.0
hushanjushi commented 2 years ago

是的,我也遇到了,后面怎么解决的