piwik-middleman 0.0.1

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.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/README.md +56 -0
  4. metadata +60 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 82fb9a70576170499060956a389be070a0a8d5f3e283de53c21ade8df64098d1
4
+ data.tar.gz: 2f347248fd3a862ca563897fd2276cfa1906482ff563b4f09c22f13b49213f7f
5
+ SHA512:
6
+ metadata.gz: 7bf9486bad987d8b7491e1481a6e55759320534472fe4dc364cee56540d525bd5b6fac5aada98e16902d2f90bef3547f05f53abcb6150cb2d56d7ad87b573132
7
+ data.tar.gz: 861ab4699289fb8fb9d6d6a0b9b5b2d48696b7536050edda66036ede5f8d2f13b1e103b82de7adfe9833e974e364a0475a0c46adf2cd58fc88391620123d0fbc
@@ -0,0 +1,15 @@
1
+ # Ignore bundler lock file
2
+ /Gemfile.lock
3
+
4
+ # Ignore pkg folder
5
+ /pkg
6
+
7
+ bin/
8
+
9
+ .DS_Store
10
+ *~
11
+ *.gem
12
+ *.sass-cache
13
+ .yardoc/*
14
+ Gemfile.lock
15
+
@@ -0,0 +1,56 @@
1
+ # Piwik-Middleman
2
+
3
+ It's an extension for the [Middleman](http://middlemanapp.com/) static site generator
4
+ to use [Piwik](https://piwik.org/).
5
+
6
+
7
+ ## Installation
8
+
9
+ Add `gem "piwik-middleman"` to your existing Gemfile and run `bundle install`.
10
+
11
+
12
+ ## Configuration
13
+
14
+ In your `config.rb` you can configure the settings as follow:
15
+
16
+ ```ruby
17
+ activate :piwik_middleman do |p|
18
+ p.domain = 'vimberlin.de'
19
+ p.url = 'piwik'
20
+ p.id = 1
21
+ end
22
+ ```
23
+
24
+
25
+ ## Helper
26
+
27
+ This plugin will add the following helper method:
28
+
29
+ ```erb
30
+ <%= piwik %>
31
+ ```
32
+
33
+
34
+ which will expand to
35
+
36
+
37
+ ```erb
38
+ <script type="text/javascript">
39
+ var _paq = _paq || [];
40
+ _paq.push(['trackPageView']);
41
+ _paq.push(['enableLinkTracking']);
42
+ (function() {
43
+ var u=(("https:" == document.location.protocol) ? "https" : "http") + "://#{config[:piwik_domain]}/#{config[:piwik_url]}/";
44
+ _paq.push(['setTrackerUrl', u+'piwik.php']);
45
+ _paq.push(['setSiteId', 1]);
46
+ var d=document, g=d.createElement('script'),
47
+ s=d.getElementsByTagName('script')[0];
48
+ g.type='text/javascript';
49
+ g.defer=true; g.async=true;
50
+ g.src=u+'piwik.js';
51
+ s.parentNode.insertBefore(g,s);
52
+ })();
53
+ </script>
54
+ <noscript><p><img src="https://#{config[:piwik_domain]}/#{config[:piwik_url]}/piwik.php?idsite=#{config[:piwik_id]}" style="border:0;" alt="" /></p></noscript>
55
+ ```
56
+
metadata ADDED
@@ -0,0 +1,60 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: piwik-middleman
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Matthias Guenther
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-12-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: middleman-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 4.2.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 4.2.1
27
+ description: Add tracking code for piwik
28
+ email:
29
+ - matthias@wikimatze.de
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files:
33
+ - README.md
34
+ files:
35
+ - ".gitignore"
36
+ - README.md
37
+ homepage: https://github.com/wikimatze/piwiki-middleman
38
+ licenses: []
39
+ metadata: {}
40
+ post_install_message:
41
+ rdoc_options: []
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ requirements: []
55
+ rubyforge_project:
56
+ rubygems_version: 2.7.2
57
+ signing_key:
58
+ specification_version: 4
59
+ summary: Add tracking code for piwik
60
+ test_files: []