Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 7, 2025

Problem

GitHub Pages deployment shows broken styling with oversized logo and incorrect layout, while local Jekyll server displays correctly. This affects the user experience for visitors accessing the tutorial documentation.

Root Cause

The Jekyll configuration had two critical issues:

  1. Incorrect baseurl configuration: Set to empty string "" instead of the GitHub Pages subpath
  2. Theme files excluded from build: Essential theme directories were incorrectly excluded, preventing proper styling

Changes Made

Fixed baseurl and url configuration

# Before
baseurl: ""
url: "https://codinggirlsclub.github.io/ai-clacky-workshop-tutorial"

# After  
baseurl: "/ai-clacky-workshop-tutorial"
url: "https://codinggirlsclub.github.io"

Removed theme files from exclude list

# Before - incorrectly excluded theme files
exclude:
  - docs/
  - .github/
  - Gemfile
  - Gemfile.lock
  - vendor/
  - README.md
  - _includes/      # ❌ Theme essential
  - _layouts/       # ❌ Theme essential  
  - assets/css/     # ❌ Theme essential
  - assets/js/      # ❌ Theme essential

# After - only exclude non-theme files
exclude:
  - docs/
  - .github/
  - Gemfile
  - Gemfile.lock
  - vendor/
  - README.md

Expected Result

  • ✅ GitHub Pages properly loads just-the-docs theme styling
  • ✅ Logo displays at correct size
  • ✅ Layout matches local Jekyll server appearance
  • ✅ Consistent user experience across local and deployed versions

Testing

The changes follow Jekyll and GitHub Pages best practices:

  • baseurl correctly handles repository subpath deployment
  • url points to the base GitHub Pages domain
  • Theme files are preserved for proper rendering

Fixes styling issues reported in the repository documentation.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: sundevilyang <1499214+sundevilyang@users.noreply.github.com>
Copilot AI changed the title [WIP] 修复 GitHub Pages 样式显示问题 Fix GitHub Pages Jekyll configuration for proper theme styling Jul 7, 2025
Copilot AI requested a review from sundevilyang July 7, 2025 01:51
@sundevilyang sundevilyang marked this pull request as ready for review July 7, 2025 01:52
@sundevilyang sundevilyang merged commit ec84ebb into main Jul 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants