這是 Shoka 主題可能會出現的 bug,如果使用 ShokaX 可能不需要修改

  • 解決方式
  1. 添加隨機文章,來增加底部高度
/_config.shoka.yml
widgets:
  random_posts: true
  1. 添加 min-height
  • shoka 需要修改 styl 檔案
hexo-theme-shoka\source\css\_common\outline\outline.styl
>.inner {
    width: $content-desktop;
    align-items: flex-start;
    min-height: 100vh; // 新增此行
    display: flex;
    justify-content: space-between;
    if (hexo-config('sidebar.position') == 'left') {
  • shokaX 插件
/scripts/addFooterMinHeight.js
hexo.extend.filter.register('theme_inject', function(injects) {
    injects.style.push('views/addFooterMinHeight.styl');
});
/views/addFooterMinHeight.styl
main {
    >.inner {
        min-height: 90vh;
    }
}