-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Look for site.github.url if it exists #25
Conversation
--- | ||
|
||
<div class="home"> | ||
|
||
<h1 class="page-heading">Posts</h1> | ||
|
||
{% assign custom_url = site.url | append: site.baseurl %} | ||
{% assign full_base_url = site.github.url | default: custom_url %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user sets a base url, wouldn't this result in http://username.github.io/project/project/
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to assume users are going to look to the default theme as an example of how they should build their own site... I'd really rather avoid this complexity if possible. Is there any way to do this without assigns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user sets a base url, wouldn't this result in http://username.github.io/project/project/?
What do you mean by this
? custom_url
is site.url + site.baseurl
, and full_base_url
is site.github.url
OR custom_url
, if site.github.url
doesn't exist.
Is there any way to do this without assigns?
We need to allow plugins or provide a filter like this in Jekyll or the jekyll-github-metadata plugin. Due to the scope at render time (starts with just the page content, then includes each successive layout in turn), we have to calculate this each time. Alternatively, Jekyll could introduce site.full_url
.
LGTM. |
ever since this got merged, I'm no longer able to access /cc @parkr, @benbalter |
Write an awesome description for your new site here. You can edit this | ||
line in _config.yml. It will appear in your document head meta (for | ||
Google search results) and in your feed.xml site description. | ||
baseurl: "/minima" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parkr did you mean to include a baseurl by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is useful for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll hv to update readme to reflect this change..
I think that having a full URL (with |
This fixes #17. /cc @benbalter
This requires a change in the
jekyll new
template, sadly, namely in the listing ofsite.posts
. We could potentially ship aninclude
forposts_list
or something so we don't have to update it in Jekyll in the future?