本文介绍了新版自定义侧边栏的使用方法。
此功能将在1.9.0版本中发布。

旧版本不支持排序

新旧对比

新版代码

- name: history
  title: 那年今日 
  class: card-history
  id:
  icon: solitude st-clock-fill
  content_class:
  content_id: history-baidu
  content_css: 'height:80px;overflow:hidden'
  content_html: '<div class="history_swiper-container" id="history-container" style="width: 100%;height: 100%;margin-top: 6px">
        <div id="history_container_wrapper" class="swiper-wrapper"></div>
      </div>'

旧版代码

home: # 如果在首页显示
  noSticky: # 如果需要固定在右侧
    - class_name: card-history
      id_name:
      name: 那年今日
      icon: solitude st-clock-fill
      class_content:
      id_content: history-baidu
      style_content: 'height:80px;overflow:hidden'
      html: '<div class="history_swiper-container" id="history-container" style="width: 100%;height: 100%;margin-top: 6px">'

新版新增

在写好后直接在配置文件中像内置侧边栏一样添加即可。

aside:
  home:
-   noSticky: "about"
+   noSticky: "about,history" # 添加在自定义侧边栏文件中的 name
    Sticky: "allInfo"
  post:
    noSticky: "about"
    Sticky: "newestPost"
  page:
    noSticky: "about"
    Sticky: "newestPost,allInfo"