Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indicate use of baseurl configuration for Github Pages deployment #57

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

markwkidd
Copy link

@markwkidd markwkidd commented Nov 22, 2024

I have been learning Jekyll and Just the Docs recently, thank you for this very helpful template. Based on my experience customizing Just the Docs, my intention with this PR is to bring the Just the Docs README and default configuration closer to the approach recommended by Jekyll.

If I understand Jekyll correctly, when a site is going to be served from a subfolder, the baseurl parameter should be set in _config.yml. Jekyll resources often specifically name a Github Pages deployment as an example of a situation when baseurl should be used.

So if I have a github repo named cushaw-handbook that I am deploying via Github Pages, I believe that the correct Jekyll configuration would include:

url: https://markwkidd.github.io
baseurl: cushaw-handbook

In my situation this is relevant to image processing and styling. With baseurl set, I can now use functionality Jekyll's relative_url function in my content:

![Drying seeds removed from fruit]( {{ '/assets/images/recipes/cut-fruit-with-seeds.jpg' | relative_url }} )

Thank you for considering this patch.

indicate use of baseurl when deploying from a subfolder
add empty `baseurl` field to serve as placeholder to be used when the template is deployed to Google Pages
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.

1 participant