You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Jekyll主题无法更新无报错,页面仍渲染Minima主题

Fixing Jekyll Theme Not Replacing Minima

Hey there! I’ve run into this exact issue before when switching Jekyll themes—let’s walk through the most common fixes to get your new official Gem-based theme working:

  • Double-check your Gemfile configuration
    Make sure you’ve properly added your desired official theme and commented out Minima. For example, if you’re using the Primer theme (one of GitHub’s official options), your Gemfile should look like this:

    source "https://rubygems.org"
    
    # Comment out the Minima line to disable it
    # gem "minima"
    
    # Add your new official theme
    gem "jekyll-theme-primer"
    

    After updating the Gemfile, run bundle install to install the new theme and update your dependencies.

  • Update your _config.yml file
    Jekyll won’t switch themes unless you explicitly set it in your config. Open _config.yml and replace the existing theme line with your new theme’s name:

    theme: jekyll-theme-primer
    

    Note: Don’t confuse this with remote_theme—that’s for GitHub-hosted themes, not Gem-based ones.

  • Clear Jekyll’s cache and restart the server
    Jekyll caches assets and theme files aggressively. Run this command to clear the cache:

    bundle exec jekyll clean
    

    Then restart your server with bundle exec to ensure you’re using the dependencies from your Gemfile:

    bundle exec jekyll serve
    

    Skipping bundle exec can cause Jekyll to use old global dependencies instead of your project’s specific ones.

  • Remove local theme directories
    If you have a local _theme folder or a minima directory in your project, Jekyll will prioritize these over the Gem-installed themes. Delete any local theme-related folders to force Jekyll to use the Gem version.

  • Verify your installed gems
    Run bundle list to check if your new theme is installed and if Minima is still present. If Minima is listed, double-check that you commented it out in your Gemfile and run bundle update to remove it.

Once you’ve gone through these steps, your localhost:4000 should load your new theme instead of Minima. Let me know if any of these steps don’t work—I can help troubleshoot further!

内容的提问来源于stack exchange,提问作者bortman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 10:27:43