f-dong / hexo-theme-minimalism

hexo 极简主题
https://minimalism.codeover.cn
MIT License
314 stars 58 forks source link

[BUG]归档无法展示所有的文章,仅仅展示了部分文章 #36

Closed 0x783kb closed 3 months ago

0x783kb commented 3 months ago

提交前检查单

Bug 描述 清晰地描述,请提供

title: 0x783kb
subtitle: ''
description: ''
keywords: thearthunting
author: ''
language: en
timezone: ''
url: ''
permalink: ':year/:month/:day/:title/'
permalink_defaults: null
pretty_urls:
  trailing_index: true
  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: null
new_post_name: ':title.md'
default_layout: post
titlecase: false
external_link:
  enable: true
  field: site
  exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: true
marked:
  prependRoot: true
  postAsset: true
relative_link: false
future: true
syntax_highlighter: highlight.js
highlight:
  line_number: true
  auto_detect: false
  tab_replace: ''
  wrap: true
  hljs: false
prismjs:
  preprocess: true
  line_number: true
  tab_replace: ''
index_generator:
  path: ''
  per_page: 10
  order_by: '-date'
default_category: uncategorized
category_map: null
tag_map: null
meta_generator: true
date_format: YYYY-MM-DD
time_format: HH:mm:ss
updated_option: mtime
per_page: 10
pagination_dir: page
include: null
exclude: null
ignore: null
theme: minimalism
deploy:
  type: ''
permalink_pinyin:
  enable: true # 启用插件
  separator: '-' # 分词符,将使用此符号分隔两个汉字间的拼音

sitemap:
  path: # 可选只要一个
    - sitemap.xml
    - sitemap.txt
  rel: true # 是否在页面头部添加 rel="sitemap" 链接

encrypt:
   enable: true
$ cat _config.yml 
menu:
  Index:
    url: /
    External: false
    name: 首页
  Tags:
    url: /tags
    External: false
    name: 标签
  Categories:
    url: /categories
    External: false
    name: 分类
  Archives:
    url: /archives
    External: false
    name: 归档
  About:
    url: /about
    External: false
    name: 关于

# 深色主题
dark_theme:
  enable: true
  mode: auto # 可选 auto、dark

# 联系方式
contact:
  #github: "https://github.com/f-dong"
  twitter:
  weibo:
  zhihu:
  facebook:

# 首页头像图片
avatar: /imanges/avatar.ico

# 站点图标
favicon: /imanges/avatar.ico

# 谷歌统计 跟踪 ID
ga:

# 百度统计 The baidu web analytics
baidu_tongji:

comment:
  enable: false
  system: twikoo # 可选 gitalk、twikoo
  config:
    gitalk:
      clientId:
      clientSecret:
      repository: # 仓库名
      owner: # 仓库所有者
      createIssueManually: false # 如果当前页面没有相应的 isssue 且登录的用户属于 admin,则会自动创建 issue。如果设置为 true,则显示一个初始化页面,创建 issue 需要点击 init 按钮。
    twikoo:
      envId: #  腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app)
      region: # 环境地域,腾讯云传
      mark: # 一个twikoo服务端应用于多个内容时,可填写此项

# 底部链接
bottom_link:
  rss:
    url:
    text: RSS
  icp:
    url: # beian.miit.gov.cn
    text: # 沪ICP备 09007032号-1

# 底部显示来源信息
bottom_source:
  enable: true

# 脚注
footnote:
  enable: true # 是否开启脚注解析
  ignoreCodeBlock: false # 是否忽略代码块中的脚注

# 图片配置
image:
  lazyload_enable: true # 图片懒加载
  lazyload_placeholder: # 图片懒加载占位图
  photo_zoom: simple-lightbox # 可选 simple-lightbox、fancybox、false(禁用)

# cdn 配置
cdn:
  enable: false
  # CDN 提供者
  provider: jsdelivr # 可选 jsdelivr、unpkg、bootcdn

复现方法 复现该 Bug 的步骤:

访问之后,点击归档,只展示了10个文章

预期结果 该功能本来应该是怎么样的

展示全部

第二页的文章并没有生成归档

电脑(请填写以下信息):

其他 如有其他内容,请提供

0x783kb commented 3 months ago

我发现这个文章是可以展示的,需要你自己手动在你的博客域名后,增加/archives/page/3/index.html,这样可以查看其他的归档文档,或者调整_config.minimalism.yml中配置

index_generator:
  path: 'archives'
  per_page: 10 #参数值调整为20、30等
  order_by: -date

我也在尝试如何增加分页提示,比如下一页

f-dong commented 3 months ago

归档和分类的分页确实有问题,因为之前做了个隐藏文章的功能导致与 hexo 官方的分页组件发生了冲突,我近期抽空再看下这个问题,看看有没有全新的解决方案吧

f-dong commented 3 months ago

已经处理了,更新至 1.3.9 版本,归档页会显示所有文章

0x783kb commented 3 months ago

我感觉这个解决方案并没有完美解决这个问题。虽然解决了这个问题,但新的问题出现了。代码这里并没有缩紧或者换行

image image
0x783kb commented 3 months ago

在hexo-theme-minimalism-1.3.8这个版本中并没有出现这个问题。

f-dong commented 3 months ago

哈哈,是我疏忽大意了,调整表格样式时忽略了这里,你先回退一下吧,明天再重新调整下

f-dong commented 3 months ago

问题以解决

0x783kb commented 3 months ago

感谢,不错不错