Skip to content

Commit

Permalink
Resolve incorrect HOME_PATH/BASE_PATH settings
Browse files Browse the repository at this point in the history
JB/setup needs to account for  being falsy. Also add better usage instructions for BASE_PATH. Fixes plusjade#30
  • Loading branch information
plusjade committed Feb 6, 2012
1 parent eb40808 commit 3a2df76
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
26 changes: 20 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,28 @@ JB :
version : 0.2.0

# All links will be namespaced by BASE_PATH if defined.
# This is required for hosting GitHub Project Pages.
# If you are deploying this website for one of your GitHub projects
# you must set BASE_PATH to the name of your GitHub project.
# Links in your website should always be prefixed with {{BASE_PATH}}
# however this value will be dynamically changed depending on your deployment situation.
#
# Leave this blank if you have defined a CNAME for your site (pages.github.com)
# NOTE: When in localhost, your site will run from root "/" regardless of BASE_PATH
# CNAME (http://yourcustomdomain.com)
# DO NOT SET BASE_PATH
# (urls will be prefixed with "/" and work relatively)
#
BASE_PATH : ""
# GitHub Pages (http://username.github.com)
# DO NOT SET BASE_PATH
# (urls will be prefixed with "/" and work relatively)
#
# GitHub Project Pages (http://username.github.com/project-name)
#
# A GitHub Project site exists in the `gh-pages` branch of one of your repositories.
# REQUIRED! Set BASE_PATH to: http://username.github.com/project-name
#
# CAUTION:
# - When in Localhost, your site will run from root "/" regardless of BASE_PATH
# - Only the following values are falsy: ["", null, false]
# - When setting BASE_PATH it must be a valid url.
# This means always setting the protocol (http|https) or prefixing with "/"
BASE_PATH : false

# By default, the asset_path is automatically defined relative to BASE_PATH plus the enabled theme.
# ex: [BASE_PATH]/assets/themes/[THEME-NAME]
Expand Down
2 changes: 1 addition & 1 deletion _includes/JB/setup
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% if site.JB.setup.provider == "custom" %}
{% include custom/setup %}
{% else %}
{% if site.safe and site.JB.BASE_PATH %}
{% if site.safe and site.JB.BASE_PATH and site.JB.BASE_PATH != '' %}
{% assign BASE_PATH = site.JB.BASE_PATH %}
{% assign HOME_PATH = site.JB.BASE_PATH %}
{% else %}
Expand Down

0 comments on commit 3a2df76

Please sign in to comment.