maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1447677 - in /maven/skins/trunk/maven-fluido-skin: pom.xml src/main/resources/META-INF/maven/site.vm src/site/apt/index.apt.vm src/site/site.xml
Date Tue, 19 Feb 2013 11:23:14 GMT
Author: olamy
Date: Tue Feb 19 11:23:14 2013
New Revision: 1447677

URL: http://svn.apache.org/r1447677
Log:
[MSKINS-75] Add Piwik web analytics tracking code integration to Fluido skin
Submitted by Michael Koch

Modified:
    maven/skins/trunk/maven-fluido-skin/pom.xml
    maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
    maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm
    maven/skins/trunk/maven-fluido-skin/src/site/site.xml

Modified: maven/skins/trunk/maven-fluido-skin/pom.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/pom.xml?rev=1447677&r1=1447676&r2=1447677&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/pom.xml (original)
+++ maven/skins/trunk/maven-fluido-skin/pom.xml Tue Feb 19 11:23:14 2013
@@ -587,6 +587,21 @@
                   <outputDirectory>${project.build.directory}/site/mskins-41/</outputDirectory>
                 </configuration>
               </execution>
+              <execution>
+                <id>copy-mskins-75</id>
+                <phase>site</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  <resources>
+                    <resource>
+                      <directory>${project.build.directory}/it/mskins-75/target/site/</directory>
+                    </resource>
+                  </resources>
+                  <outputDirectory>${project.build.directory}/site/mskins-75/</outputDirectory>
+                </configuration>
+              </execution>
             </executions>
           </plugin>
         </plugins>

Modified: maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm?rev=1447677&r1=1447676&r2=1447677&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm (original)
+++ maven/skins/trunk/maven-fluido-skin/src/main/resources/META-INF/maven/site.vm Tue Feb
19 11:23:14 2013
@@ -539,6 +539,27 @@
   #end
 #end
 ##
+#macro ( piwik )
+  #if ( $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'piwik' ).getChild( 'piwikUrl'
)
+        && $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'piwik' ).getChild(
'idsite' ) )
+    #set ( $piwikUrl =  $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'piwik' ).getChild(
'piwikUrl' ).getValue() )
+    #set ( $idsite =  $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'piwik' ).getChild(
'idsite' ).getValue() )
+    
+    <!-- Piwik -->
+    <script type="text/javascript">
+    var pkBaseURL = (("https:" == document.location.protocol) ? "https://$piwikUrl/" : "http://$piwikUrl/");
+    document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+    </script><script type="text/javascript">
+    try {
+    var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", $idsite);
+    piwikTracker.trackPageView();
+    piwikTracker.enableLinkTracking();
+    } catch( err ) {}
+    </script><noscript><p><img src="http://$piwikUrl/piwik.php?idsite=$idsite"
style="border:0" alt=""/></p></noscript>
+    <!-- End Piwik Tag -->
+  #end
+#end
+##
 #macro ( googleAnalytics $accountId )
   #if( $accountId && $accountId != "" )
     <!-- Google Analytics -->
@@ -1082,5 +1103,6 @@
         #ohloh()
       </div>
     </footer>
+    #piwik()
   </body>
 </html>

Modified: maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm?rev=1447677&r1=1447676&r2=1447677&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm (original)
+++ maven/skins/trunk/maven-fluido-skin/src/site/apt/index.apt.vm Tue Feb 19 11:23:14 2013
@@ -420,6 +420,31 @@ Welcome to ${project.name}!
 
  <<Note>> in order the Google plusone button appears, <<<$\{project.url\}>>>
property <<must>> be set in the <<<pom.xml>>>!
 
+** Piwik web analytics
+
+ Since version <<1.4>>, fluido-skin supports inserting {{{http://piwik.org/}Piwik
web analytics}}
+ {{{http://piwik.org/docs/javascript-tracking/#toc-where-can-i-find-the-piwik-tracking-code}tracking
code}} into the generated pages.
+ Users have to declare: 
+
+ * <<<custom.fluidoSkin.piwik.piwikUrl>>>: URL of the Piwik installation
without protocol, leading and trailing slashes (i. e. without <<http://>>).
+ 
+ * <<<custom.fluidoSkin.piwik.idsite>>>: ID in the Piwik installation of
the site which is tracked.
+
++-----+
+<project name="xxx">
+  [...]
+  <custom>
+    <fluidoSkin>
+        <piwik>
+            <piwikUrl>example.org/piwik</piwikUrl>
+            <idsite>1</idsite>
+        </piwik>
+    </fluidoSkin>
+  </custom>
+  [...]
+</project>
++-----+
+
 Acknowledgment
 
   ${project.name} contains/redistributes {{{http://glyphicons.com}Glyphicons Halflings}}
as part of Bootstrap by Twitter,

Modified: maven/skins/trunk/maven-fluido-skin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/skins/trunk/maven-fluido-skin/src/site/site.xml?rev=1447677&r1=1447676&r2=1447677&view=diff
==============================================================================
--- maven/skins/trunk/maven-fluido-skin/src/site/site.xml (original)
+++ maven/skins/trunk/maven-fluido-skin/src/site/site.xml Tue Feb 19 11:23:14 2013
@@ -78,6 +78,7 @@ under the License.
       <item name="MSKINS-34" href="./mskins-34/index.html"/>
       <item name="MSKINS-34 (topbar)" href="./mskins-34_topbar/index.html"/>
       <item name="MSKINS-41" href="./mskins-41/index.html"/>
+      <item name="MSKINS-75" href="./mskins-75/index.html"/>
     </menu>
 
     <menu ref="reports"/>



Mime
View raw message