Skip to content

jekyll build as of 2.x no longer builds a serveable sites #2317

Closed
sammcj opened this Issue May 7, 2014 · 22 comments

5 participants

@sammcj
sammcj commented May 7, 2014
samm-mbp ~/git % jekyll new myblog
New jekyll site installed in /Users/samm/git/myblog.
samm-mbp ~/git % cd myblog
samm-mbp ~/git/myblog % jekyll serve
Configuration file: /Users/samm/git/myblog/_config.yml
            Source: /Users/samm/git/myblog
       Destination: /Users/samm/git/myblog/_site
      Generating...
                    done.
Configuration file: /Users/samm/git/myblog/_config.yml
    Server address: http://0.0.0.0:4000http://yourdomain.com/
  Server running... press ctrl-c to stop.

Browsing to localhost:4000 gives:

Not Found

`/' not found.
WEBrick/1.3.1 (Ruby/2.1.1/2014-02-24) at localhost:4000
samm-mbp ~/git/myblog % gem list | grep jekyll
jekyll (2.0.1)
jekyll-coffeescript (1.0.0)
jekyll-import (0.2.0)
jekyll-sass-converter (1.0.0)

OSX 10.9.2
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]

@sammcj sammcj changed the title from jekyll build as of 2.x no longer builds a serveable site to jekyll build as of 2.x no longer builds a serveable sites May 7, 2014
@parkr
Jekyll member
parkr commented May 7, 2014

Please post your _config.yml.

@sammcj
sammcj commented May 7, 2014

I'm just using the standard one thats generated by jekyll new:

samm-mbp ~/git/myblog % cat _config.yml
# Site settings
name: Dat site title tho
title: Your awesome title
email: your-email@domain.com
description: "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: "http://yourdomain.com"

# Build settings
markdown: kramdown
permalinks: pretty
@parkr
Jekyll member
parkr commented May 7, 2014

Change url to http://yourdomain.com and remove baseurl. http://blog.parkermoore.de/2014/04/27/clearing-up-confusion-around-baseurl/

@sammcj
sammcj commented May 7, 2014

Changed baseurl to url

# Site settings
name: Dat site title tho
title: Your awesome title
email: your-email@domain.com
description: "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."
url: "http://yourdomain.com"

# Build settings
markdown: kramdown
permalinks: pretty

The default site now loads but is broken.
Screenshot: http://i.imgur.com/l21oEOX.png

@parkr
Jekyll member
parkr commented May 7, 2014

Try

baseurl: "/"
url: "http://yourdomain.com"

Does that work?

@sammcj
sammcj commented May 7, 2014

Updated _config as advised,
Exactly the same broken layout

@albertogg
Jekyll member

Yes, and maybe your site is broken because you used {{ site.baseurl }} in various parts and now this variable changed.

@sammcj
sammcj commented May 7, 2014

@albertogg My site isn't broken, this is a brand new site generated by jekyll new as per the docs

@parkr
Jekyll member
parkr commented May 7, 2014

Yes, and maybe your site is broken because you used {{ site.baseurl }} in various parts and now this variable changed.

Yeah, Ben's updated site template ( #2268 ) uses baseurl heavily. Urgh.

@w0lfe
w0lfe commented May 7, 2014

@sammcj I get the the same error when using baseurl: "/" setting it as an empty string, "", seems to not break the layout though

@albertogg
Jekyll member

let's check! and fix this. thanks @sammcj!

@sammcj
sammcj commented May 7, 2014

No worries, hope it's an easy one.

@albertogg
Jekyll member

@parkr are you on it? I can fixit I assume.

@parkr
Jekyll member
parkr commented May 7, 2014

All I had to do was:

diff --git a/_config.yml b/_config.yml
index 15256bf..2175150 100644
--- a/_config.yml
+++ b/_config.yml
@@ -3,7 +3,8 @@ name: Dat site title tho
 title: Your awesome title
 email: your-email@domain.com
 description: "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: "http://yourdomain.com"
+baseurl: ""
+url: "http://yourdomain.com"

 # Build settings
 markdown: kramdown

to get it working perfectly.

@sammcj
sammcj commented May 7, 2014

@parkr Confirmed working.

Thanks guys, this was probably the fastest turnaround I've ever seen!

@troyswanson
Jekyll member

Well, this is a busy night :wink:

@albertogg
Jekyll member

LOL, @troyswanson indeed.

@parkr
Jekyll member
parkr commented May 7, 2014

Thanks guys, this was probably the fastest turnaround I've ever seen!

That's how we roll.

@parkr parkr added a commit that closed this issue May 7, 2014
@parkr parkr Set baseurl to nothing in new template site.
Previously, it caused all sorts of errors.
Fixes #2317.
2dec333
@parkr parkr closed this in 2dec333 May 7, 2014
@parkr parkr added a commit that referenced this issue May 7, 2014
@parkr parkr Default baseurl to "" rather than to "/"
Also a fix for #2317
97e9fb2
@sammcj
sammcj commented May 7, 2014

Already updated ;)

samm-mbp ~/git % gem update
Updating installed gems
Updating jekyll
Fetching: jekyll-2.0.2.gem (100%)
Successfully installed jekyll-2.0.2
Parsing documentation for jekyll-2.0.2
Installing ri documentation for jekyll-2.0.2
Installing darkfish documentation for jekyll-2.0.2
Done installing documentation for jekyll after 2 seconds
Gems updated: jekyll

Love your work!

@parkr
Jekyll member
parkr commented May 7, 2014

Happy to help! Come back and file new issues as you run into them! :)

@troyswanson
Jekyll member

Or hit us up on jekyll-help for more abstract web dev related questions!

@qckanemoto qckanemoto referenced this issue in qckanemoto/jekyll-qck-theme Dec 9, 2015
Merged

revert integration of site.url and site.baseurl #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.