-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "jekyll", "~> 3.2" | ||
gem "minima", path: "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
theme: minima | ||
title: Your awesome title | ||
email: your-email@domain.com | ||
author: Mr. GitHub User | ||
description: "Write an awesome description for your new site here. It will appear in your document head meta (for Google search results) and in your feed.xml site description." | ||
email: your-email@domain.com | ||
description: > # this means to ignore newlines until "baseurl:" | ||
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" | ||
twitter_username: jekyllrb | ||
github_username: jekyll | ||
|
||
collections: | ||
posts: | ||
permalink: /posts/:title | ||
# Build settings | ||
markdown: kramdown | ||
theme: minima | ||
exclude: | ||
- Gemfile | ||
- Gemfile.lock |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
--- | ||
layout: default | ||
layout: page | ||
--- | ||
|
||
<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 commentThe reason will be displayed to describe this comment to others. Learn more. If the user sets a base url, wouldn't this result in There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
What do you mean by
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 |
||
|
||
<ul class="post-list"> | ||
{% for post in site.posts %} | ||
<li> | ||
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span> | ||
|
||
<h2> | ||
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title | escape }}</a> | ||
<a class="post-link" href="{{ post.url | prepend: full_base_url }}">{{ post.title | escape }}</a> | ||
</h2> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
|
||
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p> | ||
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: full_base_url }}">via RSS</a></p> | ||
|
||
</div> |
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..