You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/05/10 20:23:06 UTC

[maven-fluido-skin] branch MSKINS-186 created (now 90c24e9)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch MSKINS-186
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git


      at 90c24e9  [MSKINS-186] Velocity warns about usage of null values

This branch includes the following new commits:

     new 90c24e9  [MSKINS-186] Velocity warns about usage of null values

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-fluido-skin] 01/01: [MSKINS-186] Velocity warns about usage of null values

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MSKINS-186
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git

commit 90c24e96283b2816a0c995ee7a696c5c51767b98
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue May 10 20:21:49 2022 +0200

    [MSKINS-186] Velocity warns about usage of null values
    
    This closes #28
---
 src/main/resources/META-INF/maven/site-macros.vm | 12 ++++++------
 src/main/resources/META-INF/maven/site.vm        |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/main/resources/META-INF/maven/site-macros.vm b/src/main/resources/META-INF/maven/site-macros.vm
index 29acdab..78085ad 100644
--- a/src/main/resources/META-INF/maven/site-macros.vm
+++ b/src/main/resources/META-INF/maven/site-macros.vm
@@ -582,10 +582,10 @@ $indent     </ul>##
       })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
       ga('create', '$accountId', 'auto');
       ga('send', 'pageview');
-#**##if( $decoration.getCustomValue( 'fluidoSkin.googleAnalytics.anonymizeIp', 'true' ) == 'true' )
+#**##if( $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.googleAnalytics.anonymizeIp', 'true' ) ) )
       ga('set', 'anonymizeIp', true);
 #**##end
-#**##if( $decoration.getCustomValue( 'fluidoSkin.googleAnalytics.forceSSL', 'true' ) == 'true' )
+#**##if( $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.googleAnalytics.forceSSL', 'true' ) ) )
       ga('set', 'forceSSL', true);
 #**##end
     </script>
@@ -697,11 +697,11 @@ $indent     </ul>##
 #*  *##set( $layout = $decoration.getCustomValue( 'fluidoSkin.facebookLike.layout', $layout ) )
 ##
 #*  *##set( $action = 'like' )
-#*  *##if ( $decoration.getCustomValue( 'fluidoSkin.facebookLike.recommend' ).equalsIgnoreCase( 'true' ) )
+#*  *##if ( $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.facebookLike.recommend', 'false' ) ) )
 #*    *##set( $action = 'recommend' )
 #*  *##end
 ##
-#*  *##set( $shareButton = $decoration.getCustomValue( 'fluidoSkin.facebookLike.shareButton', '' ).equalsIgnoreCase( 'true' ) )
+#*  *##set( $shareButton = $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.facebookLike.shareButton', 'false' ) ) )
 ##
     <div class="fb-like#if( !$sideBarEnabled ) pull-right#end" style="border:none; margin-top: 10px" data-href="$project.url" data-layout="$layout" data-show-faces="false" data-action="$action" data-share="$shareButton"></div>
 #**##end
@@ -710,8 +710,8 @@ $indent     </ul>##
 #macro ( followTwitter $sideBarEnabled )
 #**##if ( $decoration.getCustomChild( 'fluidoSkin.twitter.user' ) )
 #*  *##set( $user = $decoration.getCustomValue( 'fluidoSkin.twitter.user' ) )
-#*  *##set( $showUser = $decoration.getCustomValue( 'fluidoSkin.twitter.showUser', '' ).equalsIgnoreCase( 'true' ) )
-#*  *##set( $showFollowers = $decoration.getCustomValue( 'fluidoSkin.twitter.showFollowers', '' ).equalsIgnoreCase( 'true' ) )
+#*  *##set( $showUser = $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.twitter.showUser', 'false' ) ) )
+#*  *##set( $showFollowers = $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.twitter.showFollowers', 'false' ) ) )
 ##
 #*  *##if ( $sideBarEnabled )
 #*    *##set( $dataSize = "medium" )
diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm
index 78dda53..eea8f63 100644
--- a/src/main/resources/META-INF/maven/site.vm
+++ b/src/main/resources/META-INF/maven/site.vm
@@ -17,7 +17,7 @@
 ## under the License.
 ##
 #parse( "site-macros.vm" )
-#set ( $skipGenerationDate = 'true' == $decoration.getCustomValue( 'fluidoSkin.skipGenerationDate' ) )
+#set ( $skipGenerationDate = $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.skipGenerationDate', 'false' ) ) )
 <!--
  | Generated by #generatedBy()
 #if( $docRenderingContext && ( $docRenderingContext.generator || $docRenderingContext.doxiaSource ) ) from##
@@ -57,7 +57,7 @@
 #**##matomo( $decoration.custom.getChild('matomo') )
 #**##flattrHead()
   </head>
-#**##set ( $topBarEnabled = 'true' == $decoration.getCustomValue( 'fluidoSkin.topBarEnabled' ) )
+#**##set ( $topBarEnabled = $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.topBarEnabled', 'false' ) ) )
 #**##if ( $topBarEnabled )
   <body class="topBarEnabled">
 #**##else
@@ -66,7 +66,7 @@
 #**##forkMeOnGitHub()
 #**##facebookLoadSDK()
 ##
-#**##set ( $sideBarEnabled = 'false' != $decoration.getCustomValue( 'fluidoSkin.sideBarEnabled' ) )
+#**##set ( $sideBarEnabled = $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.sideBarEnabled', 'true' ) ) )
 #**##set ( $searchEnabled = $decoration.getCustomChild( 'fluidoSkin.googleSearch' )
              && ( $decoration.getCustomValue( 'fluidoSkin.googleSearch.sitesearch' ) || $project.url ) )
 ##
@@ -241,7 +241,7 @@
 #*      *##if ( $title && $title.endsWith( "Project License" ) )
 #*        *#$bodyContent
 #*      *##else
-#*        *##if ( 'true' == $decoration.getCustomValue( 'fluidoSkin.sourceLineNumbersEnabled' ) )
+#*        *##if ( $convert.toBoolean( $decoration.getCustomValue( 'fluidoSkin.sourceLineNumbersEnabled', 'false' ) ) )
 #*          *##set ( $sourceStyle = "prettyprint linenums" )
 #*        *##else
 #*          *##set ( $sourceStyle = "prettyprint" )