happy_seed 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +11 -0
- data/bin/happy_seed +2 -4
- data/happy_seed.rb +41 -1
- data/lib/generators/happy_seed/admin/templates/docs/README.07.admin.rdoc +1 -1
- data/lib/generators/happy_seed/base/templates/docs/README.00.base.rdoc +6 -6
- data/lib/generators/happy_seed/bootstrap/bootstrap_generator.rb +1 -2
- data/lib/generators/happy_seed/facebook/templates/docs/README.06.facebook.rdoc +1 -1
- data/lib/generators/happy_seed/instagram/templates/docs/README.05.instagram.rdoc +1 -1
- data/lib/generators/happy_seed/jazz_hands/templates/docs/README.12.jazz_hands.rdoc +1 -1
- data/lib/generators/happy_seed/omniauth/templates/docs/README.04.omniauth.rdoc +2 -2
- data/lib/generators/happy_seed/plugin/plugin_generator.rb +4 -2
- data/lib/generators/happy_seed/splash/templates/docs/README.02.splash.rdoc +1 -1
- data/lib/generators/happy_seed/static/static_generator.rb +19 -0
- data/lib/generators/happy_seed/static/templates/.gitignore +18 -0
- data/lib/generators/happy_seed/static/templates/Gemfile +21 -0
- data/lib/generators/happy_seed/static/templates/config.rb +55 -0
- data/lib/generators/happy_seed/static/templates/data/site.yml +4 -0
- data/lib/generators/happy_seed/static/templates/source/images/.gitkeep +0 -0
- data/lib/generators/happy_seed/static/templates/source/index.html.haml +68 -0
- data/lib/generators/happy_seed/static/templates/source/javascripts/all.js +3 -0
- data/lib/generators/happy_seed/static/templates/source/layouts/_footer.haml +7 -0
- data/lib/generators/happy_seed/static/templates/source/layouts/_javascripts.erb +9 -0
- data/lib/generators/happy_seed/static/templates/source/layouts/_main_header.haml +16 -0
- data/lib/generators/happy_seed/static/templates/source/layouts/layout.haml +19 -0
- data/lib/generators/happy_seed/static/templates/source/stylesheets/animate.css +3158 -0
- data/lib/generators/happy_seed/static/templates/source/stylesheets/application.css.scss +24 -0
- data/lib/generators/happy_seed/static/templates/source/stylesheets/fonts/socicon-webfont.eot +0 -0
- data/lib/generators/happy_seed/static/templates/source/stylesheets/fonts/socicon-webfont.svg +90 -0
- data/lib/generators/happy_seed/static/templates/source/stylesheets/fonts/socicon-webfont.ttf +0 -0
- data/lib/generators/happy_seed/static/templates/source/stylesheets/fonts/socicon-webfont.woff +0 -0
- data/lib/generators/happy_seed/static/templates/source/stylesheets/socicons.css +124 -0
- data/lib/generators/happy_seed/static_blog/static_blog_generator.rb +19 -0
- data/lib/generators/happy_seed/static_blog/templates/.gitignore +18 -0
- data/lib/generators/happy_seed/static_blog/templates/Gemfile +23 -0
- data/lib/generators/happy_seed/static_blog/templates/Gemfile.lock +166 -0
- data/lib/generators/happy_seed/static_blog/templates/config.rb +83 -0
- data/lib/generators/happy_seed/static_blog/templates/data/site.yml +13 -0
- data/lib/generators/happy_seed/static_blog/templates/source/2014-10-21-this-is-a-published-post.html.markdown +8 -0
- data/lib/generators/happy_seed/static_blog/templates/source/2014-11-25-post-2.html.markdown +9 -0
- data/lib/generators/happy_seed/static_blog/templates/source/about.html.haml +8 -0
- data/lib/generators/happy_seed/static_blog/templates/source/calendar.html.haml +34 -0
- data/lib/generators/happy_seed/static_blog/templates/source/drafts/this-is-a-draft-post.html.markdown +9 -0
- data/lib/generators/happy_seed/static_blog/templates/source/images/.gitkeep +0 -0
- data/lib/generators/happy_seed/static_blog/templates/source/index.html.haml +19 -0
- data/lib/generators/happy_seed/static_blog/templates/source/javascripts/all.js +3 -0
- data/lib/generators/happy_seed/static_blog/templates/source/layouts/_article_footer.erb +22 -0
- data/lib/generators/happy_seed/static_blog/templates/source/layouts/_article_header.haml +15 -0
- data/lib/generators/happy_seed/static_blog/templates/source/layouts/_footer.haml +12 -0
- data/lib/generators/happy_seed/static_blog/templates/source/layouts/_javascripts.erb +9 -0
- data/lib/generators/happy_seed/static_blog/templates/source/layouts/_main_header.haml +17 -0
- data/lib/generators/happy_seed/static_blog/templates/source/layouts/article_layout.haml +26 -0
- data/lib/generators/happy_seed/static_blog/templates/source/layouts/layout.haml +19 -0
- data/lib/generators/happy_seed/static_blog/templates/source/stylesheets/animate.css +3158 -0
- data/lib/generators/happy_seed/static_blog/templates/source/stylesheets/application.css.scss +229 -0
- data/lib/generators/happy_seed/static_blog/templates/source/stylesheets/fonts/socicon-webfont.eot +0 -0
- data/lib/generators/happy_seed/static_blog/templates/source/stylesheets/fonts/socicon-webfont.svg +90 -0
- data/lib/generators/happy_seed/static_blog/templates/source/stylesheets/fonts/socicon-webfont.ttf +0 -0
- data/lib/generators/happy_seed/static_blog/templates/source/stylesheets/fonts/socicon-webfont.woff +0 -0
- data/lib/generators/happy_seed/static_blog/templates/source/stylesheets/socicons.css +124 -0
- data/lib/generators/happy_seed/static_blog/templates/source/tag.html.haml +23 -0
- data/lib/generators/happy_seed/twitter/templates/docs/README.05.twitter.rdoc +6 -2
- data/lib/generators/happy_seed/twitter/twitter_generator.rb +2 -1
- data/lib/happy_seed.rb +2 -0
- data/lib/happy_seed/cli.rb +44 -0
- data/lib/happy_seed/version.rb +1 -1
- metadata +65 -4
- data/bin/happy_seed_plugin +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 499f73fbe5c91a363d8196f2f44ff5442617cc0f
|
4
|
+
data.tar.gz: 16b26596414023026c09cafb219daedc55fbd1be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89957a545522b552e0873533bf4abd84b909b4166f01e2c8aa4d68af763899a8ef10e63ef61d20ed7c1268d0a536fcb9b1e9e88e607ca5530d3d50cdd6370f34
|
7
|
+
data.tar.gz: fec01e3e90de59a0f899b6c8348d626e136626b1c31d64b972df5c4e50b868f5baa4655ed8e763aca74b635729f9e0837fcf2fa4d08690cf47bd36ccd183468b
|
data/Rakefile
CHANGED
@@ -30,3 +30,14 @@ end
|
|
30
30
|
|
31
31
|
|
32
32
|
task default: :test
|
33
|
+
|
34
|
+
desc "Copy readme files into the doc directory"
|
35
|
+
task :sync_docs do
|
36
|
+
system( "mkdir -p website/source/docs" )
|
37
|
+
`find lib -name README\\* -print`.each_line do |file|
|
38
|
+
file.gsub!( /\n/, "" )
|
39
|
+
out = file.gsub( /.*\//, "" ).gsub( /.rdoc/, ".html.markdown" )
|
40
|
+
# puts file, out
|
41
|
+
system( "cp #{file} website/source/docs/#{out}" )
|
42
|
+
end
|
43
|
+
end
|
data/bin/happy_seed
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby -wU
|
2
2
|
|
3
|
-
|
4
|
-
gem_root = spec.gem_dir
|
3
|
+
require 'happy_seed/cli'
|
5
4
|
|
6
|
-
|
7
|
-
system( "rails new -m #{file} #{ARGV.join( " " )}" )
|
5
|
+
HappySeed::Cli.start( ARGV )
|
data/happy_seed.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
gem 'haml-rails'
|
2
1
|
gsub_file 'Gemfile', /.*sqlite3.*/, ""
|
2
|
+
gem 'haml-rails'
|
3
|
+
gem "httparty"
|
3
4
|
|
4
5
|
gem_group :development, :test do
|
5
6
|
gem "sqlite3"
|
@@ -90,6 +91,45 @@ if yes?( "You would like to install jazz hands?" )
|
|
90
91
|
packages << "jazz_hands"
|
91
92
|
end
|
92
93
|
|
94
|
+
puts "Adding rake task to convert templates to ERB. If you need to do this, please run:"
|
95
|
+
puts "rake html2erb"
|
96
|
+
rakefile "haml2erb.rake",
|
97
|
+
%q{
|
98
|
+
desc "Converts everything to erb"
|
99
|
+
task :haml2erb do
|
100
|
+
require 'httparty'
|
101
|
+
|
102
|
+
FileUtils.mkdir_p "lib/templates/erb"
|
103
|
+
|
104
|
+
Dir.glob( "**/*.haml").each do |f|
|
105
|
+
puts "Converting #{f}"
|
106
|
+
|
107
|
+
data = File.read( f )
|
108
|
+
|
109
|
+
resp = HTTParty.post( "http://haml2erb.herokuapp.com/api.html", { query: { haml: data } } )
|
110
|
+
|
111
|
+
puts "FROM--------"
|
112
|
+
puts data
|
113
|
+
puts "TO--------"
|
114
|
+
puts resp.body
|
115
|
+
|
116
|
+
outfile = f.gsub( /\.haml/, ".erb" )
|
117
|
+
|
118
|
+
if outfile =~ /templates\/haml/
|
119
|
+
outfile.gsub!( /templates\/haml/, "templates/erb" )
|
120
|
+
puts "outfile = #{outfile}"
|
121
|
+
|
122
|
+
FileUtils.mkdir_p( Pathname.new( outfile ).dirname )
|
123
|
+
end
|
124
|
+
|
125
|
+
File.open( outfile, "w" ) do |out|
|
126
|
+
out.puts resp.body
|
127
|
+
end
|
128
|
+
|
129
|
+
FileUtils.mv( f, "#{f}.bak" )
|
130
|
+
end
|
131
|
+
end
|
132
|
+
}
|
93
133
|
puts "Setting up git"
|
94
134
|
git :init
|
95
135
|
git add: "."
|
@@ -8,7 +8,7 @@ The happy_seed bootstrap generator
|
|
8
8
|
* Installs active admin from git
|
9
9
|
* Runs the active_admin:install generator
|
10
10
|
* Creates AdminUser model
|
11
|
-
* Creates basic newsletter/campaign admin panel if MAILCHIMP_API_KEY is active
|
11
|
+
* Creates basic newsletter/campaign admin panel if `MAILCHIMP_API_KEY` is active
|
12
12
|
|
13
13
|
### Why do you want this?
|
14
14
|
|
@@ -3,11 +3,11 @@ HappySeed Base Install
|
|
3
3
|
|
4
4
|
### What does this do?
|
5
5
|
|
6
|
-
The happy_seed application template sets up haml
|
6
|
+
The `happy_seed` application template sets up `haml`, `meta-tags`, disables `turbolinks`, and installs the `happy_seed` generators into your application.
|
7
7
|
|
8
|
-
The happy_seed:base generator installs dotenv-rails
|
8
|
+
The `happy_seed:base` generator installs `dotenv-rails`, `unicorn`, http site authentication, and the `setup_controller`.
|
9
9
|
|
10
|
-
/setup is used to see the happy_seed documentation for each of the installed generators, and copies things into the rails doc directory. The setup_controller is only visible locally.
|
10
|
+
/setup is used to see the `happy_seed` documentation for each of the installed generators, and copies things into the rails doc directory. The `setup_controller` is only visible locally.
|
11
11
|
|
12
12
|
### Why do you want this?
|
13
13
|
|
@@ -26,9 +26,9 @@ Finally we setup some basic HTTP auth and a simple setup controller to help navi
|
|
26
26
|
|
27
27
|
The AWS env variables are there for reference
|
28
28
|
|
29
|
-
If the HTTP_AUTH_
|
29
|
+
If the `HTTP_AUTH_*` variables are set, `application_controller` will force them to be used for authentication to let people into the site. (The `happy_seed:splash` generator will not use this.)
|
30
30
|
|
31
|
-
AWS_ACCESS_KEY stuff isn't used, but is here for reference.
|
31
|
+
`AWS_ACCESS_KEY` stuff isn't used, but is here for reference.
|
32
32
|
|
33
33
|
```
|
34
34
|
AWS_ACCESS_KEY_ID=
|
@@ -40,4 +40,4 @@ AWS_ACCESS_KEY stuff isn't used, but is here for reference.
|
|
40
40
|
|
41
41
|
### What needs to be done?
|
42
42
|
|
43
|
-
Even though the setup controller only works locally, you should plan on removing the setup_controller since it shows the configuration variables.
|
43
|
+
Even though the setup controller only works locally, you should plan on removing the `setup_controller` since it shows the configuration variables.
|
@@ -3,7 +3,7 @@ HappySeed Facebook Install
|
|
3
3
|
|
4
4
|
### What does this do?
|
5
5
|
|
6
|
-
The happy_seed:facebook depends upon happy_seed:omniauth and
|
6
|
+
The `happy_seed:facebook` depends upon `happy_seed:omniauth` and
|
7
7
|
|
8
8
|
* Installs facebook authentication
|
9
9
|
* Installs links in the nav bar and use signup/signin pages
|
@@ -7,7 +7,7 @@ HappySeed Jazz Hands Install
|
|
7
7
|
|
8
8
|
### Why do you want this?
|
9
9
|
|
10
|
-
As per the jazz_hands repo https://github.com/nixme/jazz_hands
|
10
|
+
As per the `jazz_hands` repo https://github.com/nixme/jazz_hands
|
11
11
|
|
12
12
|
Spending hours in the rails console? Spruce it up and show off those hard-working hands!
|
13
13
|
|
@@ -3,7 +3,7 @@ HappySeed Omniauth Install
|
|
3
3
|
|
4
4
|
### What does this do?
|
5
5
|
|
6
|
-
The happy_seed:omniauth generator depends upon happy_seed:devise and
|
6
|
+
The `happy_seed:omniauth` generator depends upon `happy_seed:devise` and
|
7
7
|
|
8
8
|
* Generates an Intentity model, linked to user
|
9
9
|
* Installs omniauth
|
@@ -28,4 +28,4 @@ na (done in the providers)
|
|
28
28
|
|
29
29
|
### What needs to be done?
|
30
30
|
|
31
|
-
This is a base module which is used by happy_seed:twitter
|
31
|
+
This is a base module which is used by `happy_seed:twitter`, `happy_seed:facebook` and `happy_seed:instagram`.
|
@@ -7,8 +7,10 @@ module HappySeed
|
|
7
7
|
source_root File.expand_path('../templates', __FILE__)
|
8
8
|
def generate_rails_plugin
|
9
9
|
source_root = File.expand_path('../templates', __FILE__)
|
10
|
-
|
11
|
-
|
10
|
+
args.shift
|
11
|
+
puts args
|
12
|
+
app_name = args.shift
|
13
|
+
system "rails plugin new #{app_name} -T --dummy-path=spec/dummy #{args.join( " ")}"
|
12
14
|
|
13
15
|
insert_into_file "#{app_name}/#{app_name}.gemspec", File.read( "#{source_root}/gemspec" ), :before => "\nend\n"
|
14
16
|
|
@@ -3,7 +3,7 @@ HappySeed Splash Install
|
|
3
3
|
|
4
4
|
### What does this do?
|
5
5
|
|
6
|
-
The happy_seed:splash generator depends upon the happy_seed:bootstrap generator and will prompt you to run it if it hasn't already.
|
6
|
+
The `happy_seed:splash` generator depends upon the `happy_seed:bootstrap` generator and will prompt you to run it if it hasn't already.
|
7
7
|
|
8
8
|
* Installs a splash screen with sign up for the mailing list.
|
9
9
|
* Installs a base styling for the splash screen
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
module HappySeed
|
4
|
+
module Generators
|
5
|
+
class StaticGenerator < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
def generate_rails_plugin
|
9
|
+
source_root = File.expand_path('../templates', __FILE__)
|
10
|
+
args.shift
|
11
|
+
app_name = args.shift
|
12
|
+
|
13
|
+
self.destination_root = app_name
|
14
|
+
|
15
|
+
directory "."
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile ~/.gitignore_global
|
6
|
+
|
7
|
+
# Ignore bundler config
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the build directory
|
11
|
+
/build
|
12
|
+
|
13
|
+
# Ignore cache
|
14
|
+
/.sass-cache
|
15
|
+
/.cache
|
16
|
+
|
17
|
+
# Ignore .DS_store file
|
18
|
+
.DS_Store
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# If you do not have OpenSSL installed, update
|
2
|
+
# the following line to use "http://" instead
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gem "middleman", "~>3.3.7"
|
6
|
+
gem "middleman-deploy"
|
7
|
+
gem "middleman-autometatags"
|
8
|
+
gem "middleman-livereload", "~> 3.1.0"
|
9
|
+
gem 'middleman-bootstrap-navbar'
|
10
|
+
|
11
|
+
gem "bootstrap-sass"
|
12
|
+
gem "jquery-middleman"
|
13
|
+
|
14
|
+
# For faster file watcher updates on Windows:
|
15
|
+
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
|
16
|
+
|
17
|
+
# Windows does not come with time zone data
|
18
|
+
gem "tzinfo-data", platforms: [:mswin, :mingw]
|
19
|
+
|
20
|
+
gem "builder", "~> 3.0"
|
21
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# For custom domains on github pages
|
2
|
+
page "CNAME", layout: false
|
3
|
+
|
4
|
+
set :css_dir, 'stylesheets'
|
5
|
+
set :js_dir, 'javascripts'
|
6
|
+
set :images_dir, 'images'
|
7
|
+
|
8
|
+
# Better markdown support
|
9
|
+
# set :markdown, :tables => true, :autolink => true, :gh_blockcode => true, :fenced_code_blocks => true
|
10
|
+
# set :markdown_engine, :redcarpet
|
11
|
+
|
12
|
+
activate :meta_tags
|
13
|
+
|
14
|
+
# Turn this on if you want to make your url's prettier, without the .html
|
15
|
+
# activate :directory_indexes
|
16
|
+
|
17
|
+
# Automatic image dimensions on image_tag helper
|
18
|
+
# activate :automatic_image_sizes
|
19
|
+
|
20
|
+
# Easier bootstrap navbars
|
21
|
+
activate :bootstrap_navbar
|
22
|
+
|
23
|
+
configure :development do
|
24
|
+
activate :livereload
|
25
|
+
end
|
26
|
+
|
27
|
+
# Build-specific configuration
|
28
|
+
configure :build do
|
29
|
+
# Any files you want to ignore:
|
30
|
+
ignore '/admin/*'
|
31
|
+
ignore '/stylesheets/admin/*'
|
32
|
+
|
33
|
+
# For example, change the Compass output style for deployment
|
34
|
+
activate :minify_css
|
35
|
+
|
36
|
+
# Minify Javascript on build
|
37
|
+
activate :minify_javascript
|
38
|
+
|
39
|
+
# Enable cache buster
|
40
|
+
activate :asset_hash
|
41
|
+
|
42
|
+
# Use relative URLs
|
43
|
+
activate :relative_assets
|
44
|
+
|
45
|
+
# Or use a different image path
|
46
|
+
# set :http_prefix, "/blog/"
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
# This will push to the gh-pages branch of the repo, which will
|
51
|
+
# host it on github pages (If this is a github repository)
|
52
|
+
activate :deploy do |deploy|
|
53
|
+
deploy.method = :git
|
54
|
+
deploy.build_before = true
|
55
|
+
end
|
File without changes
|
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
title: Welcome to Happy Seeds Static Site
|
3
|
+
---
|
4
|
+
|
5
|
+
.container
|
6
|
+
.row
|
7
|
+
.col-xs-12
|
8
|
+
%h1.animated.bounce.text-center Welcome to Happy Seed
|
9
|
+
|
10
|
+
.row
|
11
|
+
.col-sm-6
|
12
|
+
%h2 What's installed
|
13
|
+
|
14
|
+
%p.lead
|
15
|
+
= "Here is a basic middleman app that's setup with Bootstrap-SASS, jQuery,"
|
16
|
+
= link_to "animate.css", "http://daneden.github.io/animate.css/"
|
17
|
+
and
|
18
|
+
= link_to "socicons", "http://socicon.com"
|
19
|
+
= "."
|
20
|
+
|
21
|
+
%p.lead
|
22
|
+
The following middleman components are installed
|
23
|
+
|
24
|
+
%ul
|
25
|
+
%li middleman
|
26
|
+
%li middleman-deploy
|
27
|
+
%li middleman-meta-tags
|
28
|
+
%li middleman-livereload
|
29
|
+
%li middleman-bootstrap-navbar
|
30
|
+
|
31
|
+
|
32
|
+
= link_to "Read Middleman Documentation", "http://middlemanapp.com/"
|
33
|
+
|
34
|
+
.col-sm-6
|
35
|
+
%h2 What's configured
|
36
|
+
|
37
|
+
%p.lead
|
38
|
+
%ul
|
39
|
+
%li Layout and files moved to HAML
|
40
|
+
%li Bootstrap-Sass is included via Sass @import;
|
41
|
+
%li CNAME file gets generated if it exists for github pages subdomaining
|
42
|
+
%li data/site.yml file for default site meta data
|
43
|
+
%li meta_tags is enabled with the auto_meta tagger
|
44
|
+
%li Bootstrap nav bar helpers are actived
|
45
|
+
%li Livereload is on for development
|
46
|
+
%li Asset cleanup is on for build
|
47
|
+
%li Deploy to github pages setup by default
|
48
|
+
|
49
|
+
.row
|
50
|
+
.col-sm-6
|
51
|
+
%h2 Site meta data
|
52
|
+
|
53
|
+
%pre~"title: \"My Static Site\"\npublisher_twitter: \"@HappyFunCorp\"\ntwitter_id: \"@wschenk\"\n# google_analytics_id:\n"
|
54
|
+
|
55
|
+
%p
|
56
|
+
Set google_analytics_id for it to show up on a build version of the page.
|
57
|
+
|
58
|
+
.col-sm-6
|
59
|
+
%h2 Example social icons
|
60
|
+
%ul
|
61
|
+
%li
|
62
|
+
%a{ href: "http://twitter.com/HappyFunCorp" }
|
63
|
+
%span.socicon.socicon-twitter.fgcolor
|
64
|
+
= "@HappyFunCorp"
|
65
|
+
%li
|
66
|
+
%a{ href: "http://sublimeguile.com/"}
|
67
|
+
%span.socicon.socicon-tumblr.fgcolor
|
68
|
+
Tumblr
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= javascript_include_tag 'all' %>
|
2
|
+
<script type="text/javascript">
|
3
|
+
<% if config.environment == :build && data['site']['google_analytics_id'] %>
|
4
|
+
var _gaq=[['_setAccount','<%= data['site']['google_analytics_id'] %>'],['_trackPageview']];
|
5
|
+
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
6
|
+
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
7
|
+
s.parentNode.insertBefore(g,s)}(document,'script'));
|
8
|
+
<% end %>
|
9
|
+
</script>
|