Skip to content

Commit

Permalink
Use jekyll-netlify to figure out the correct context
Browse files Browse the repository at this point in the history
  • Loading branch information
astorije committed Dec 9, 2018
1 parent 41bb7ad commit c3ec241
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
source "https://rubygems.org"

gem 'jekyll', '3.8.4'
gem 'jekyll-sitemap', '1.2.0'

group :jekyll_plugins do
gem 'jekyll-netlify', '0.2.0'
gem 'jekyll-sitemap', '1.2.0'
end
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-netlify (0.2.0)
jekyll (~> 3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sitemap (1.2.0)
Expand Down Expand Up @@ -60,6 +62,7 @@ PLATFORMS

DEPENDENCIES
jekyll (= 3.8.4)
jekyll-netlify (= 0.2.0)
jekyll-sitemap (= 1.2.0)

BUNDLED WITH
Expand Down
2 changes: 0 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ include:
kramdown:
toc_levels: "2"
url: https://thelounge.chat # Domain used by jekyll-sitemap in sitemap.xml
plugins:
- jekyll-sitemap
permalink: /:path
collections:
docs:
Expand Down
2 changes: 1 addition & 1 deletion robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
---

User-Agent: *
{% if jekyll.environment == "production" %}Allow: /{% else %}Disallow: /{% endif %}
{% if site.netlify.context == "production" %}Allow: /{% else %}Disallow: /{% endif %}
Sitemap: {{ site.url }}/sitemap.xml
Host: thelounge.chat

0 comments on commit c3ec241

Please sign in to comment.