Skip to content
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

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

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

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

sammcj opened this issue May 7, 2014 · 22 comments

Comments

@sammcj
Copy link

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 jekyll build as of 2.x no longer builds a serveable site jekyll build as of 2.x no longer builds a serveable sites May 7, 2014
@parkr
Copy link
Member

parkr commented May 7, 2014

Please post your _config.yml.

@sammcj
Copy link
Author

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
Copy link
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
Copy link
Author

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
Copy link
Member

parkr commented May 7, 2014

Try

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

Does that work?

@sammcj
Copy link
Author

sammcj commented May 7, 2014

Updated _config as advised,
Exactly the same broken layout

@albertogg
Copy link
Member

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

@sammcj
Copy link
Author

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
Copy link
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.

@ghost
Copy link

ghost 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
Copy link
Member

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

@sammcj
Copy link
Author

sammcj commented May 7, 2014

No worries, hope it's an easy one.

@albertogg
Copy link
Member

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

@parkr
Copy link
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
Copy link
Author

sammcj commented May 7, 2014

@parkr Confirmed working.

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

@troyswanson
Copy link
Member

Well, this is a busy night 😉

@albertogg
Copy link
Member

LOL, @troyswanson indeed.

@parkr
Copy link
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 closed this as completed in 2dec333 May 7, 2014
parkr added a commit that referenced this issue May 7, 2014
@parkr
Copy link
Member

parkr commented May 7, 2014

@sammcj
Copy link
Author

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
Copy link
Member

parkr commented May 7, 2014

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

@troyswanson
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants