aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.themes/classic/plugins/category_generator.rb4
-rw-r--r--.themes/classic/source/_includes/archive_post.html2
-rw-r--r--.themes/classic/source/_includes/article.html4
-rw-r--r--.themes/classic/source/_includes/asides/pinboard.html2
-rw-r--r--.themes/classic/source/_includes/asides/recent_posts.html2
-rw-r--r--.themes/classic/source/_includes/asides/twitter.html2
-rw-r--r--.themes/classic/source/_includes/head.html10
-rw-r--r--.themes/classic/source/_includes/header.html2
-rw-r--r--.themes/classic/source/_includes/navigation.html4
-rw-r--r--README.markdown17
-rw-r--r--_config.yml9
11 files changed, 42 insertions, 16 deletions
diff --git a/.themes/classic/plugins/category_generator.rb b/.themes/classic/plugins/category_generator.rb
index 8fd26682..c2e9a46e 100644
--- a/.themes/classic/plugins/category_generator.rb
+++ b/.themes/classic/plugins/category_generator.rb
@@ -129,8 +129,10 @@ module Jekyll
# Returns string
#
def category_links(categories)
+ dir = @context.registers[:site].config['category_dir']
+ root_url = @context.registers[:site].config['root']
categories = categories.sort!.map do |item|
- "<a class='category' href='/#{@context.registers[:site].config['category_dir']}/#{item.gsub(/_|\W/, '-')}/'>#{item}</a>"
+ "<a class='category' href='#{root_url}/#{dir}/#{item.gsub(/_|\W/, '-')}/'>#{item}</a>"
end
case categories.length
diff --git a/.themes/classic/source/_includes/archive_post.html b/.themes/classic/source/_includes/archive_post.html
index cd55c212..1e291c1b 100644
--- a/.themes/classic/source/_includes/archive_post.html
+++ b/.themes/classic/source/_includes/archive_post.html
@@ -1,5 +1,5 @@
{% capture category %}{{ post.categories | size }}{% endcapture %}
-<h1><a href="{{ post.url }}">{{post.title}}</a></h1>
+<h1><a href="{{ site.root }}{{ post.url }}">{{post.title}}</a></h1>
<time datetime="{{ post.date | datetime }}" pubdate>{{ post.date | date: "<span class='month'>%b</span> <span class='day'>%d</span> <span class='year'>%Y</span>"}}</time>
{% if category != '0' %}
<footer>
diff --git a/.themes/classic/source/_includes/article.html b/.themes/classic/source/_includes/article.html
index 90257b8e..fee7a19c 100644
--- a/.themes/classic/source/_includes/article.html
+++ b/.themes/classic/source/_includes/article.html
@@ -1,7 +1,7 @@
{% unless page.no_header %}
<header>
{% if index %}
- <h1 class="entry-title"><a href="{{ post.url }}">{{ post.title | titlecase }}</a></h1>
+ <h1 class="entry-title"><a href="{{ site.root }}{{ post.url }}">{{ post.title | titlecase }}</a></h1>
{% else %}
<h1 class="entry-title">{{ page.title | titlecase }}</h1>
{% endif %}
@@ -13,7 +13,7 @@
{% if index %}
<div class="entry-content">{{ content | exerpt | smart_quotes }}</div>
<footer>
- <a rel="full-article" href="{{ post.url }}">Read on &rarr;</a>
+ <a rel="full-article" href="{{ site.root }}{{ post.url }}">Read on &rarr;</a>
</footer>
{% else %}
<div class="entry-content">{{ content | smart_quotes }}</div>
diff --git a/.themes/classic/source/_includes/asides/pinboard.html b/.themes/classic/source/_includes/asides/pinboard.html
index 1cbb1379..bf656663 100644
--- a/.themes/classic/source/_includes/asides/pinboard.html
+++ b/.themes/classic/source/_includes/asides/pinboard.html
@@ -12,7 +12,7 @@
var pinboardInit = document.createElement('script');
pinboardInit.type = 'text/javascript';
pinboardInit.async = true;
- pinboardInit.src = '/javascripts/pinboard.js';
+ pinboardInit.src = '{{ site.root }}/javascripts/pinboard.js';
document.getElementsByTagName('head')[0].appendChild(pinboardInit);
})();
</script>
diff --git a/.themes/classic/source/_includes/asides/recent_posts.html b/.themes/classic/source/_includes/asides/recent_posts.html
index 1f100960..9b8f47a2 100644
--- a/.themes/classic/source/_includes/asides/recent_posts.html
+++ b/.themes/classic/source/_includes/asides/recent_posts.html
@@ -3,7 +3,7 @@
<ul id="recent_posts">
{% for post in site.posts limit: site.recent_posts %}
<li class="post">
- <a href="{{ post.url }}">{{ post.title }}</a>
+ <a href="{{ site.root }}{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
diff --git a/.themes/classic/source/_includes/asides/twitter.html b/.themes/classic/source/_includes/asides/twitter.html
index 15cab8bc..d10d9e28 100644
--- a/.themes/classic/source/_includes/asides/twitter.html
+++ b/.themes/classic/source/_includes/asides/twitter.html
@@ -9,7 +9,7 @@
getTwitterFeed("{{site.twitter_user}}", {{site.twitter_tweet_count}}, {{site.twitter_show_replies}});
});
</script>
- <script src="/javascripts/twitter.js" type="text/javascript"> </script>
+ <script src="{{ site.root }}/javascripts/twitter.js" type="text/javascript"> </script>
{% if site.twitter_follow_button %}
<a href="http://twitter.com/{{ site.twitter_user }}" class="twitter-follow-button" data-width="208px" data-show-count="{{ site.twitter_show_follower_count }}">Follow @{{ site.twitter_user }}</a>
{% else %}
diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html
index ff684edd..43214921 100644
--- a/.themes/classic/source/_includes/head.html
+++ b/.themes/classic/source/_includes/head.html
@@ -19,14 +19,14 @@
<meta name="keywords" content="{{page.keywords}}"/>
{% endif %}
- <link href="/images/favicon.png" rel="shortcut icon" />
- <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
- <script src="/javascripts/modernizr-2.0.js"></script>
+ <link href="{{ site.url }}/images/favicon.png" rel="shortcut icon" />
+ <link href="{{ site.url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
+ <script src="{{ site.url }}/javascripts/modernizr-2.0.js"></script>
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
- <script src="/javascripts/octopress.js" type="text/javascript"></script>
+ <script src="{{ site.url }}/javascripts/octopress.js" type="text/javascript"></script>
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
- <link href="/atom.xml" rel="alternate" title="{{site.title}}" type="application/atom+xml"/>
+ <link href="{{ site.url }}/atom.xml" rel="alternate" title="{{site.title}}" type="application/atom+xml"/>
{% include google_analytics.html %}
{% include google_plus_one.html %}
{% include twitter_sharing.html %}
diff --git a/.themes/classic/source/_includes/header.html b/.themes/classic/source/_includes/header.html
index de153086..5c97e7a7 100644
--- a/.themes/classic/source/_includes/header.html
+++ b/.themes/classic/source/_includes/header.html
@@ -1,5 +1,5 @@
<hgroup>
- <h1><a href="/">{{ site.title }}</a></h1>
+ <h1><a href="{{ site.root }}">{{ site.title }}</a></h1>
{% if site.subtitle %}
<h2>{{ site.subtitle }}</h2>
{% endif %}
diff --git a/.themes/classic/source/_includes/navigation.html b/.themes/classic/source/_includes/navigation.html
index d5592539..81571389 100644
--- a/.themes/classic/source/_includes/navigation.html
+++ b/.themes/classic/source/_includes/navigation.html
@@ -11,6 +11,6 @@
</fieldset>
</form>
<ul role="main-nav">
- <li><a href="/">Blog</a></li>
- <li><a href="/blog/archives">Archives</a></li>
+ <li><a href="{{ site.root }}/">Blog</a></li>
+ <li><a href="{{ site.root }}/blog/archives">Archives</a></li>
</ul>
diff --git a/README.markdown b/README.markdown
index 2ebcd4e1..79ef8e18 100644
--- a/README.markdown
+++ b/README.markdown
@@ -118,6 +118,23 @@ The `config_deploy` rake task takes a branch name as an argument and creates a [
This prepares your branch for easy deployment. The `rake deploy` task copies the generated blog from the `public` directory to the `_deploy` directory, adds new files, removes old files, sets a commit message, and pushes to Github.
Github will queue your site for publishing (which usually occurs instantly or within minutes if it's your first commit).
+**Please note,** Github's project pages will be published to a subdirectory and you'll have to make sure you set up your urls correctly in your configs.
+
+For Octopress my cofigs would be set up like this:
+
+ # _config.yaml
+ destination: public/octopress
+ url: http://imathis.github.com/octopress
+ subscribe_rss: /octopress/atom.xml
+ root: /octopress
+
+ # config.rb
+ http_path = "/octopress"
+
+ # Rakefile
+ public_dir = "public/octopress"
+
+
## License
(The MIT License)
diff --git a/_config.yml b/_config.yml
index 35e55899..963ea8de 100644
--- a/_config.yml
+++ b/_config.yml
@@ -22,7 +22,14 @@ recent_posts: 5
category_dir: blog/categories
simple_search: http://google.com/search
-# Optional configurations
+# ----------------------- #
+# Optional configurations #
+# ----------------------- #
+
+# If publishing to a subdirectory as in http://site.com/project set this:
+# root: /project
+# If left blank, urls will be mapped to '/'
+root:
# RSS feeds can list your email address if you like
email: