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

[FEATURE] 增加合集/系列功能 #359

Closed
6 tasks done
Lruihao opened this issue Sep 8, 2023 · 5 comments · Fixed by #387
Closed
6 tasks done

[FEATURE] 增加合集/系列功能 #359

Lruihao opened this issue Sep 8, 2023 · 5 comments · Fixed by #387
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Lruihao
Copy link
Member

Lruihao commented Sep 8, 2023

Describe the feature you want 描述你的功能需求

增加合集功能

一番对比斟酌,个人认为合集比系列适用面更广,故该功能名词敲定为“合集”,英文“Collection”。

TODO list

  • 所有合集
  • 文章标头显示合集
  • 文末显示合集导航(重点是导航)
    • {icon} 合集·{collection name} 总数 (链接到 term list 页面)
    • 上一篇 下一篇 按钮
    • 样式完善、I18n
  • 侧栏显示合集列表(重点是列表)
    • {icon} 合集·{collection name} 总数
    • 合集列表
    • < 4/10 >
    • 样式完善、I18n
  • 增加合集导航配置
    • 启用:true/false
    • 位置:侧栏/底部
  • term list 页面考虑是否增加 正序/反序 按钮 后续再统一考虑实现

需求背景

在实际写作过程中,可能需要围绕某个主题进行长篇幅的写作记录,如果写在一篇文章上会导致篇幅过长,阅读压力增大,如果分篇叙述,仅仅依靠分类又使“系列”文章关联性大大减弱,遂考虑加入“系列”功能需求。

举例

主题:关于拖拽式 dashboard 的设计与开发
分类:Vue2
标签:dashboard, 仪表盘, …
合集:《合集·拖拽式 dashboard 系列》
系列文章:

  • 拖拽式 dashboard 的需求分析
  • 拖拽式 dashboard 的布局模板 - 设计篇
  • 拖拽式 dashboard 的组件配置 - 设计篇
  • 拖拽式 dashboard 的模板使用 - 开发篇
  • 拖拽式 dashboard 的组件开发 - 开发篇
  • 拖拽式 dashboard xx 组件的开发过程
  • 拖拽式 dashboard 系列总结

样式设计 i18n

  • 位置:文章末尾
  • UI 待定:
    • 标题:《合集·{collection name}》
    • 列表:合集文章列表
    • 按钮与统计:上一篇/下一篇 总计篇数等

合集列表排序说明

  1. 有 weight,从小到大排序
  2. 没有 weight,按时间旧到新(sorted by date in ascending order)
  3. 上一篇(旧) 下一篇(新)

注:这和首页文章的按时间线排序的方式不一样

Useful reference 有价值的参考

相关issues #227 #270

参考

  • 微信公众号合集
  • 抖音视频合集
@Lruihao Lruihao added the enhancement New feature or request label Sep 8, 2023
@Lruihao Lruihao added this to the v1.0.0 milestone Sep 8, 2023
@Lruihao Lruihao self-assigned this Sep 8, 2023
@Lruihao Lruihao changed the title 增加系列功能 [FEATURE]增加系列功能 Sep 8, 2023
@Lruihao Lruihao changed the title [FEATURE]增加系列功能 [FEATURE] 增加系列功能 Sep 8, 2023
@Lruihao Lruihao changed the title [FEATURE] 增加系列功能 [FEATURE] 增加合集/系列功能 Sep 9, 2023
@Lruihao Lruihao linked a pull request Dec 6, 2023 that will close this issue
@Lruihao Lruihao modified the milestones: v1.0.0, v0.3.0 Dec 6, 2023
Lruihao added a commit that referenced this issue Dec 11, 2023
…ntains spaces) decode error (#359)

By the way fixed collection nav css
@Lruihao
Copy link
Member Author

Lruihao commented Dec 15, 2023

  1. 增加 taxonomies 配置:

FixIt/hugo.toml

Lines 257 to 265 in 804d1e4

# -------------------------------------------------------------------------------------
# Taxonomies Configuration
# See: https://gohugo.io/content-management/taxonomies/#configure-taxonomies
# -------------------------------------------------------------------------------------
[taxonomies]
category = "categories"
tag = "tags"
collection = "collections"

  1. 相关配置:
  • params.page.collectionList
  • params.page.collectionNavigation

FixIt/hugo.toml

Lines 431 to 434 in 4b2ff9e

# FixIt 0.3.0 | NEW whether to enable collection list at the sidebar
collectionList = false
# FixIt 0.3.0 | NEW whether to enable collection navigation at the end of the post
collectionNavigation = false

  1. front matter:
  • collections 数组
  • collectionList
  • collectionNavigation

范例:拖拽式仪表盘系列

范例源码:https://github.com/Lruihao/hugo-blog/tree/main/content/posts/draggable-dashboard

@CXwudi
Copy link

CXwudi commented Jan 1, 2024

太好了,最棒的新年礼物🎁

@CXwudi
Copy link

CXwudi commented Jan 1, 2024

但不知道这个“下一篇文章”为什么会显示成< 下一篇文章的样子而不是下一篇文章 >,还是说这就是这么设计的
Screenshot_20240101-024336

@Lruihao
Copy link
Member Author

Lruihao commented Jan 1, 2024

但不知道这个“下一篇文章”为什么会显示成< 下一篇文章的样子而不是下一篇文章 >,还是说这就是这么设计的

设计如此:P

@GitHubd3b7c
Copy link

想请问一下,想要手动排序的情况下,使用weight的同时会造成文章,如何避免在不置顶的情况下排序呢

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
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants