Add guidance for local Jekyll preview with custom baseurl
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll
What part(s) of the article would you like to see updated?
The "Testing your site locally" section needs updating. Add information about running Jekyll locally when _config.yml has a baseurl set to the GitHub repository's link. This change supports users who encounter local preview issues due to baseurl conflicts. The expected outcome is clearer guidance on using bundle exec jekyll serve --baseurl="" to run Jekyll locally without modifying _config.yml, improving the local development experience for GitHub Pages sites.
Additional information
This issue affects users who set their baseurl in _config.yml to match their GitHub Pages URL structure, which is a common practice. The problem occurs consistently for these users when trying to preview their site locally. While the exact number of affected users is unknown, it's a recurring issue for developers working with GitHub Pages. No screenshots seemed necessary, as the change involves adding a command and explanation to the documentation.
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
@g-nitin Thank you for opening an issue and linking it to your PR! ✨
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
UQAutOwc-EVANIwf1MG2m_M0wsubYsZnwUvPMMCkI8a3fkQx
Is this issue open?
Is this issue open?
@rajneesh-18 Hello! 👋 There is currently a PR waiting for review that will resolve this issue - https://github.com/github/docs/pull/34182
If you're looking an issue to pick up take a look at our help wanted section to find open issues you can work on! ✨