forked from bitcoin-dot-org/Bitcoin.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pulls bitcoin-dot-org#1048 and bitcoin-dot-org#1051
- 1048: Conditionally build some pages differently based on environmental variables - 1051: Backend: cache events and contributor listings
- Loading branch information
Showing
12 changed files
with
181 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ ehthumbs.db | |
Thumbs.db | ||
.bundle | ||
vendor | ||
_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This file is licensed under the MIT License (MIT) available on | ||
# http://opensource.org/licenses/MIT. | ||
|
||
## env.rb takes select environmental variables and makes them available | ||
## to the site templates. Currently, only variables starting with | ||
## BITCOINORG_ are exported | ||
|
||
module Jekyll | ||
class EnvGenerator < Generator | ||
def generate(site) | ||
## If necessary, initialize env hash table | ||
site.config["env"] = site.config["env"] ? site.config["env"] : {} | ||
|
||
## Load matching environmental variables in to array | ||
ENV.keys.grep /^BITCOINORG_/ do |key| | ||
site.config['env'].merge!({ key => ENV[key] }) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
--- | ||
# This file is licensed under the MIT License (MIT) available on | ||
# http://opensource.org/licenses/MIT. | ||
|
||
layout: null | ||
--- | ||
{% if site.env.BITCOINORG_BUILD_TYPE == 'preview' %} | ||
User-agent: * | ||
Disallow: / | ||
{% else %} | ||
Sitemap: https://bitcoin.org/sitemap.xml | ||
{% endif %} |