From 13acbcc52ba8e49b2fb063718c0e665db63173bf Mon Sep 17 00:00:00 2001 From: Jim Lim Date: Thu, 24 Oct 2013 19:56:34 -0700 Subject: [PATCH 1/5] exclude Gemfile from _site --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 8d2bbce..ca31949 100644 --- a/_config.yml +++ b/_config.yml @@ -66,4 +66,4 @@ kramdown: coderay_css: class include: [".htaccess"] -exclude: ["lib", "config.rb", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules"] \ No newline at end of file +exclude: ["lib", "config.rb", "Gemfile", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules"] From 79c9622e83c4eff426456733b9506912eafbb37a Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Fri, 25 Oct 2013 10:13:33 -0400 Subject: [PATCH 2/5] Update site.url and exclude Gemfile.lock --- _config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index ca31949..c114364 100644 --- a/_config.yml +++ b/_config.yml @@ -3,8 +3,8 @@ description: Describe your website here. logo: site-logo.png disqus_shortname: search: true -#Comment out url when working locally to resolve base urls correctly -url: http://your-website.com +#Change url to your domain. Leave localhost server or blank when working locally. +url: http://localhost:4000 # Owner/author information owner: @@ -66,4 +66,4 @@ kramdown: coderay_css: class include: [".htaccess"] -exclude: ["lib", "config.rb", "Gemfile", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules"] +exclude: ["lib", "config.rb", "Gemfile", "Capfile", "Gemfile.lock", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules"] From 7365c85e91feffb8a24a462417b5af7585c4cb84 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Thu, 2 Jan 2014 11:22:49 -0500 Subject: [PATCH 3/5] Add Kramdown dependency. Fixes #43 --- Gemfile | 2 +- _config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 549ccc3..d583f36 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' gem 'jekyll' -gem 'jekyll-minibundle' +gem 'kramdown' gem 'coderay' gem 'rake' gem 'thor' diff --git a/_config.yml b/_config.yml index c114364..8b437a0 100644 --- a/_config.yml +++ b/_config.yml @@ -3,7 +3,7 @@ description: Describe your website here. logo: site-logo.png disqus_shortname: search: true -#Change url to your domain. Leave localhost server or blank when working locally. +# Change url to your domain. Leave localhost server or blank when working locally. url: http://localhost:4000 # Owner/author information From 51d92c8aa0f3ddad348899757470c166195996fa Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Thu, 2 Jan 2014 11:23:34 -0500 Subject: [PATCH 4/5] Load Disqus comments properly --- _includes/scripts.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/scripts.html b/_includes/scripts.html index ad470f5..135bbd4 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -54,4 +54,4 @@ })(); {% endif %} -{% if site.disqus_shortname and page.comments %}{% include disqus_comments.html %}{% endif %} \ No newline at end of file +{% if page.comments %}{% include disqus_comments.html %}{% endif %} \ No newline at end of file From 72c9bd90cccf2c6f3ea5d7c3725a49e4891fce51 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Thu, 2 Jan 2014 11:30:57 -0500 Subject: [PATCH 5/5] Add notes about setting site.url properly --- README.md | 8 +++++--- theme-setup.md | 13 +++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1c9af86..bcd47c0 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,10 @@ description: Site description for the metas. logo: site-logo.png disqus_shortname: shortname search: true -#Comment out url when working locally to resolve base urls correctly -url: http://whatever.com +# Your site's domain goes here. When working locally use localhost server leave blank +# PS. If you set this wrong stylesheets and scripts won't load and most links will break. +# PPS. If you leave it blank for local testing home links won't work, they'll be fine for live domains though. +url: http://localhost:4000 # Owner/author information owner: @@ -144,6 +146,6 @@ Having a problem getting something to work or want to know why I setup something ## License -This theme is free and open source software, distributed under the [GNU General Public License](LICENSE) version 2 or later. So feel free to use this Jekyll theme on your site without linking back to me or using a disclaimer. +This theme is free and open source software, distributed under the [GNU General Public License](LICENSE) version 2 or later. So feel free to to modify this theme to suit your needs. If you'd like to give me credit somewhere on your blog or tweet a shout out to [@mmistakes](https://twitter.com/mmistakes), that would be pretty sweet. diff --git a/theme-setup.md b/theme-setup.md index 3e51eb0..4d07310 100644 --- a/theme-setup.md +++ b/theme-setup.md @@ -37,8 +37,10 @@ description: Site description for the metas. logo: site-logo.png disqus_shortname: shortname search: true -#Comment out url when working locally to resolve base urls correctly -url: http://whatever.com +# Your site's domain goes here. When working locally use localhost server leave blank +# PS. If you set this wrong stylesheets and scripts won't load and most links will break. +# PPS. If you leave it blank for local testing home links won't work, they'll be fine for live domains though. +url: http://localhost:4000 # Owner/author information owner: @@ -120,8 +122,7 @@ so-simple-theme/ ### _config.yml -Most of the variables found here are used in the .html files found in `_includes` if you need to add or remove anything. A good place to start would be to change the title, tagline, description, and url of your site. When working locally comment out `url`[^1] or else you will get a bunch of broken links because they are absolute and prefixed with `{{ "{{ site.url " }}}}` in the various `_includes` and `_layouts`. Just remember to uncomment `url` when building for deployment or pushing to **gh-pages**... - +Most of the variables found here are used in the .html files found in `_includes` if you need to add or remove anything. A good place to start would be to change the title, tagline, description, and url of your site. Links are absolute and prefixed with `{{ "{{ site.url " }}}}` in the various `_includes` and `_layouts`, so remember to properly set `url`[^1] and use `http://localhost:4000` when developing locally or else the theme's stylesheet and scripts won't load. #### Disqus Comments Create a [Disqus](http://disqus.com) account and change `disqus_shortname` in `_config.yml` to the Disqus *shortname* you just setup. To enable commenting on a post, add the following to its front matter: @@ -260,8 +261,8 @@ Having a problem getting something to work or want to know why I setup something ## License -This theme is free and open source software, distributed under the [GNU General Public License]({{ site.url }}/LICENSE) version 2 or later. So feel free to use this Jekyll theme on your site without linking back to me or using a disclaimer. +This theme is free and open source software, distributed under the [GNU General Public License]({{ site.url }}/LICENSE) version 2 or later. So feel free to to modify this theme to suit your needs. If you'd like to give me credit somewhere on your blog or tweet a shout out to [@mmistakes](https://twitter.com/mmistakes), that would be pretty sweet. -[^1]: Used to generate absolute urls in *sitemap.xml*, *feed.xml*, and for canonical urls in *head.html*. Don't include a trailing `/` in your base url ie: http://mademistakes.com. When developing locally remove or comment out this line so local CSS, JS, and image assets are used. \ No newline at end of file +[^1]: Used to generate absolute urls in `sitemap.xml`, `feed.xml`, and for canonical urls in `head.html`. Don't include a trailing `/` in your base url ie: http://mademistakes.com. When developing locally I suggest using http://localhost:4000 or whatever server you're using to properly load the theme's stylesheet, scripts, and image assets. If you leave this variable blank all links will resolve correctly except those pointing home. \ No newline at end of file