Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Resolve incorrect HOME_PATH/BASE_PATH settings

JB/setup needs to account for  being falsy. Also add better usage instructions for BASE_PATH. Fixes #30
  • Loading branch information...
commit 3a2df76133171e1cd576708a60694e7d0632b671 1 parent eb40808
@plusjade plusjade authored
Showing with 21 additions and 7 deletions.
  1. +20 −6 _config.yml
  2. +1 −1  _includes/JB/setup
View
26 _config.yml
@@ -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]
View
2  _includes/JB/setup
@@ -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 %}
Please sign in to comment.
Something went wrong with that request. Please try again.