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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1d40012  Remove the Facebook like and Twitter follow buttons
1d40012 is described below

commit 1d40012a662923bb478d9752c9321386c2e59478
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sun Nov 1 11:42:13 2026 +0000

    Remove the Facebook like and Twitter follow buttons
    
    Both loaded a script from a third-party host on every page view, while the 
ASF privacy policy integrates social media plug-ins with a two-click method. 
Their site.xml configuration is now ignored.
---
 src/it/mskins-161/verify.groovy                    | 39 ++++-----------
 src/it/{mskins-33 => mskins-24}/verify.groovy      | 18 +++----
 .../{mskins-33 => mskins-24_topbar}/verify.groovy  | 18 +++----
 src/it/mskins-33/verify.groovy                     | 16 +++----
 src/it/mskins-33_topbar/verify.groovy              | 16 +++----
 src/main/resources/META-INF/maven/site-macros.vm   | 55 ---------------------
 src/main/resources/META-INF/maven/site.vm          | 13 +----
 src/site/markdown/index.md.vm                      | 56 +---------------------
 8 files changed, 43 insertions(+), 188 deletions(-)

diff --git a/src/it/mskins-161/verify.groovy b/src/it/mskins-161/verify.groovy
index 1b307d3..35b0781 100644
--- a/src/it/mskins-161/verify.groovy
+++ b/src/it/mskins-161/verify.groovy
@@ -19,33 +19,14 @@
 
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.exists()
-assert buildLog.text.contains('[INFO] BUILD SUCCESS')
-
-File index = new File( basedir, 'sidebar-fb-like-share/target/site/index.html')
-assert index.exists()
-assert index.text.contains('<div id="fb-root"></div>')
-assert index.text.contains('<script async defer crossorigin="anonymous" 
src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0";></script>')
-assert index.text.contains(
-        '<div class="fb-like" style="border:none; margin-top: 10px" 
data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-161/"; 
data-layout="box_count" data-show-faces="false" data-action="like" 
data-share="true"></div>')
-
-index = new File( basedir, 'sidebar-fb-recommend-share/target/site/index.html')
-assert index.exists()
-assert index.text.contains('<div id="fb-root"></div>')
-assert index.text.contains('<script async defer crossorigin="anonymous" 
src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0";></script>')
-assert index.text.contains(
-        '<div class="fb-like" style="border:none; margin-top: 10px" 
data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-161/"; 
data-layout="button" data-show-faces="false" data-action="recommend" 
data-share="true"></div>')
-
-index = new File( basedir, 'topbar-fb-like-share/target/site/index.html')
-assert index.exists()
-assert index.text.contains('<div id="fb-root"></div>')
-assert index.text.contains('<script async defer crossorigin="anonymous" 
src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0";></script>')
-assert index.text.contains(
-        '<div class="fb-like pull-right" style="border:none; margin-top: 10px" 
data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-161/"; 
data-layout="button_count" data-show-faces="false" data-action="like" 
data-share="true"></div>')
-
-index = new File( basedir, 'topbar-fb-recommend-share/target/site/index.html')
-assert index.exists()
-assert index.text.contains('<div id="fb-root"></div>')
-assert index.text.contains('<script async defer crossorigin="anonymous" 
src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0";></script>')
-assert index.text.contains(
-        '<div class="fb-like pull-right" style="border:none; margin-top: 10px" 
data-href="http://maven.apache.org/skins/maven-fluido-skin/mskins-161/"; 
data-layout="button_count" data-show-faces="false" data-action="recommend" 
data-share="true"></div>')
+assert buildLog.text.contains( '[INFO] BUILD SUCCESS' )
 
+for ( String module : [ 'sidebar-fb-like-share', 'sidebar-fb-recommend-share', 
'topbar-fb-like-share', 'topbar-fb-recommend-share' ] ) {
+    String html = new File( basedir, module + '/target/site/index.html' ).text
+    // Facebook and Twitter buttons were removed: nothing from their hosts is 
loaded or rendered
+    assert !html.contains( 'connect.facebook.net' )
+    assert !html.contains( 'fb-root' )
+    assert !html.contains( 'class="fb-like' )
+    assert !html.contains( 'platform.twitter.com' )
+    assert !html.contains( 'twitter-follow-button' )
+}
diff --git a/src/it/mskins-33/verify.groovy b/src/it/mskins-24/verify.groovy
similarity index 54%
copy from src/it/mskins-33/verify.groovy
copy to src/it/mskins-24/verify.groovy
index dccf675..d14a9dc 100644
--- a/src/it/mskins-33/verify.groovy
+++ b/src/it/mskins-24/verify.groovy
@@ -17,14 +17,10 @@
  * under the License.
  */
 
-File buildLog = new File( basedir, 'build.log' )
-assert buildLog.exists()
-assert buildLog.text.contains('[INFO] BUILD SUCCESS')
-
-File index = new File( basedir, 'target/site/index.html')
-assert index.exists()
-assert index.text.contains('<div id="fb-root"></div>')
-assert index.text.contains('<script async defer crossorigin="anonymous" 
src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0";></script>')
-assert index.text.contains(
-        '<div class="fb-like" style="border:none; margin-top: 10px" 
data-href="https://maven.apache.org/skins/maven-fluido-skin/mskins-33/"; 
data-layout="box_count" data-show-faces="false" data-action="like" 
data-share="false"></div>')
-
+String html = new File( basedir, 'target/site/index.html' ).text
+// Facebook and Twitter buttons were removed: nothing from their hosts is 
loaded or rendered
+assert !html.contains( 'connect.facebook.net' )
+assert !html.contains( 'fb-root' )
+assert !html.contains( 'class="fb-like' )
+assert !html.contains( 'platform.twitter.com' )
+assert !html.contains( 'twitter-follow-button' )
diff --git a/src/it/mskins-33/verify.groovy 
b/src/it/mskins-24_topbar/verify.groovy
similarity index 54%
copy from src/it/mskins-33/verify.groovy
copy to src/it/mskins-24_topbar/verify.groovy
index dccf675..d14a9dc 100644
--- a/src/it/mskins-33/verify.groovy
+++ b/src/it/mskins-24_topbar/verify.groovy
@@ -17,14 +17,10 @@
  * under the License.
  */
 
-File buildLog = new File( basedir, 'build.log' )
-assert buildLog.exists()
-assert buildLog.text.contains('[INFO] BUILD SUCCESS')
-
-File index = new File( basedir, 'target/site/index.html')
-assert index.exists()
-assert index.text.contains('<div id="fb-root"></div>')
-assert index.text.contains('<script async defer crossorigin="anonymous" 
src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0";></script>')
-assert index.text.contains(
-        '<div class="fb-like" style="border:none; margin-top: 10px" 
data-href="https://maven.apache.org/skins/maven-fluido-skin/mskins-33/"; 
data-layout="box_count" data-show-faces="false" data-action="like" 
data-share="false"></div>')
-
+String html = new File( basedir, 'target/site/index.html' ).text
+// Facebook and Twitter buttons were removed: nothing from their hosts is 
loaded or rendered
+assert !html.contains( 'connect.facebook.net' )
+assert !html.contains( 'fb-root' )
+assert !html.contains( 'class="fb-like' )
+assert !html.contains( 'platform.twitter.com' )
+assert !html.contains( 'twitter-follow-button' )
diff --git a/src/it/mskins-33/verify.groovy b/src/it/mskins-33/verify.groovy
index dccf675..147d1b1 100644
--- a/src/it/mskins-33/verify.groovy
+++ b/src/it/mskins-33/verify.groovy
@@ -19,12 +19,12 @@
 
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.exists()
-assert buildLog.text.contains('[INFO] BUILD SUCCESS')
-
-File index = new File( basedir, 'target/site/index.html')
-assert index.exists()
-assert index.text.contains('<div id="fb-root"></div>')
-assert index.text.contains('<script async defer crossorigin="anonymous" 
src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0";></script>')
-assert index.text.contains(
-        '<div class="fb-like" style="border:none; margin-top: 10px" 
data-href="https://maven.apache.org/skins/maven-fluido-skin/mskins-33/"; 
data-layout="box_count" data-show-faces="false" data-action="like" 
data-share="false"></div>')
+assert buildLog.text.contains( '[INFO] BUILD SUCCESS' )
 
+String html = new File( basedir, 'target/site/index.html' ).text
+// Facebook and Twitter buttons were removed: nothing from their hosts is 
loaded or rendered
+assert !html.contains( 'connect.facebook.net' )
+assert !html.contains( 'fb-root' )
+assert !html.contains( 'class="fb-like' )
+assert !html.contains( 'platform.twitter.com' )
+assert !html.contains( 'twitter-follow-button' )
diff --git a/src/it/mskins-33_topbar/verify.groovy 
b/src/it/mskins-33_topbar/verify.groovy
index 635a694..147d1b1 100644
--- a/src/it/mskins-33_topbar/verify.groovy
+++ b/src/it/mskins-33_topbar/verify.groovy
@@ -19,12 +19,12 @@
 
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.exists()
-assert buildLog.text.contains('[INFO] BUILD SUCCESS')
-
-File index = new File( basedir, 'target/site/index.html')
-assert index.exists()
-assert index.text.contains('<div id="fb-root"></div>')
-assert index.text.contains('<script async defer crossorigin="anonymous" 
src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0";></script>')
-assert index.text.contains(
-        '<div class="fb-like pull-right" style="border:none; margin-top: 10px" 
data-href="https://maven.apache.org/skins/maven-fluido-skin/mskins-33/"; 
data-layout="button_count" data-show-faces="false" data-action="like" 
data-share="false"></div>')
+assert buildLog.text.contains( '[INFO] BUILD SUCCESS' )
 
+String html = new File( basedir, 'target/site/index.html' ).text
+// Facebook and Twitter buttons were removed: nothing from their hosts is 
loaded or rendered
+assert !html.contains( 'connect.facebook.net' )
+assert !html.contains( 'fb-root' )
+assert !html.contains( 'class="fb-like' )
+assert !html.contains( 'platform.twitter.com' )
+assert !html.contains( 'twitter-follow-button' )
diff --git a/src/main/resources/META-INF/maven/site-macros.vm 
b/src/main/resources/META-INF/maven/site-macros.vm
index f5d177d..482fc31 100644
--- a/src/main/resources/META-INF/maven/site-macros.vm
+++ b/src/main/resources/META-INF/maven/site-macros.vm
@@ -502,61 +502,6 @@ $indent     </ul>##
 #**##end
 #end
 ##
-#macro( facebookLoadSDK )
-#**##if( $site.getCustomChild( 'fluidoSkin.facebookLike' ) && $project.url )
-    <!-- Load Facebook SDK for JavaScript -->
-    <div id="fb-root"></div>
-    <script async defer crossorigin="anonymous" 
src="https://connect.facebook.net/#if( $locale.toString() 
)$locale#{else}en#end/sdk.js#xfbml=1&version=v6.0"></script>
-#**##end
-#end
-##
-#macro( facebookLike $sideBarEnabled )
-#**##if( $site.getCustomChild( 'fluidoSkin.facebookLike' ) && $project.url )
-##
-#*  *##set( $layout = "box_count" )
-#*  *##if( !$sideBarEnabled )
-#*    *##set( $layout = "button_count" )
-#*  *##end
-#*  *##set( $layout = $site.getCustomValue( 'fluidoSkin.facebookLike.layout', 
$layout ) )
-##
-#*  *##set( $action = "like" )
-#*  *##if( $convert.toBoolean( $site.getCustomValue( 
'fluidoSkin.facebookLike.recommend', 'false' ) ) )
-#*    *##set( $action = "recommend" )
-#*  *##end
-##
-#*  *##set( $shareButton = $convert.toBoolean( $site.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
-#end
-##
-#macro( followTwitter $sideBarEnabled )
-#**##if( $site.getCustomChild( 'fluidoSkin.twitter.user' ) )
-#*  *##set( $user = $site.getCustomValue( 'fluidoSkin.twitter.user' ) )
-#*  *##set( $showUser = $convert.toBoolean( $site.getCustomValue( 
'fluidoSkin.twitter.showUser', 'false' ) ) )
-#*  *##set( $showFollowers = $convert.toBoolean( $site.getCustomValue( 
'fluidoSkin.twitter.showFollowers', 'false' ) ) )
-##
-#*  *##if( $sideBarEnabled )
-#*    *##set( $dataSize = "medium" )
-#*    *##set( $dataAlign = "left" )
-    <div id="twitter" style="border:none; margin-top: 10px">
-#*  *##else
-#*    *##set( $dataSize = "large" )
-#*    *##set( $dataAlign = "right" )
-    <ul class="nav pull-right" style="border:none; margin-top: 7px"><li>
-#*  *##end
-##
-    <a href="https://twitter.com/${user}"; class="twitter-follow-button" 
data-show-count="${showFollowers}" data-align="${dataAlign}" 
data-size="${dataSize}" data-show-screen-name="${showUser}" data-lang="#if( 
$locale.toString() )$locale#{else}en#end" data-dnt="true" >Follow ${user}</a>
-    <script async src="https://platform.twitter.com/widgets.js"; 
charset="utf-8"></script>
-##
-#*  *##if( $sideBarEnabled )
-    </div>
-#*  *##else
-    </li></ul>
-#*  *##end
-#**##end
-#end
-##
 #macro( generatedBy )
 Apache Maven Doxia Site Renderer#if( $doxiaSiteRendererVersion ) 
$doxiaSiteRendererVersion#end##
 #end
diff --git a/src/main/resources/META-INF/maven/site.vm 
b/src/main/resources/META-INF/maven/site.vm
index acc5b49..fe925e6 100644
--- a/src/main/resources/META-INF/maven/site.vm
+++ b/src/main/resources/META-INF/maven/site.vm
@@ -74,7 +74,6 @@
   <body>
 #**##end
 #**##forkMeOnGitHub()
-#**##facebookLoadSDK()
 ##
 #**##set( $sideBarEnabled = $convert.toBoolean( $site.getCustomValue( 
'fluidoSkin.sideBarEnabled', 'true' ) ) && !$standalone )
 #**##set( $searchEnabled = $site.getCustomChild( 'fluidoSkin.googleSearch' )
@@ -158,11 +157,6 @@
 #*        *##googleSearch( true )
 #*      *##end
 ##
-#*      *##if( !$sideBarEnabled )
-#*        *##facebookLike( $sideBarEnabled )
-#*        *##followTwitter( $sideBarEnabled )
-#*      *##end
-##
 ##        ## MSKINS-31
 #*      *##if( $site.body
               && $site.body.links
@@ -228,17 +222,12 @@
 #*      *##publishDate( "navigation-bottom" $site.publishDate $site.version )
           </nav>
 ## no empty box when nothing is configured for it
-#*      *##if( $searchEnabled || ( $site.getCustomChild( 
'fluidoSkin.facebookLike' ) && $project.url )
-              || $site.getCustomChild( 'fluidoSkin.twitter.user' ) || ( 
$site.poweredBy && !$site.poweredBy.isEmpty() ) )
+#*      *##if( $searchEnabled || ( $site.poweredBy && 
!$site.poweredBy.isEmpty() ) )
           <div class="well sidebar-nav">
 #*        *##if( $searchEnabled )
 #*          *##googleSearch( false )
 #*        *##end
             <div id="poweredBy">
-#*          *##facebookLike( $sideBarEnabled )
-              <div class="clear"></div>
-#*          *##followTwitter( $sideBarEnabled )
-              <div class="clear"></div>
 #*          *##builtByLogo( $site.poweredBy )
             </div>
           </div>
diff --git a/src/site/markdown/index.md.vm b/src/site/markdown/index.md.vm
index ed88237..c7c2b2a 100644
--- a/src/site/markdown/index.md.vm
+++ b/src/site/markdown/index.md.vm
@@ -346,63 +346,11 @@ As shown in [MojoHaus Maven plugins 
list](https://www.mojohaus.org/plugins.html)
 
 ${esc.h}${esc.h}${esc.h} <a id="Twitter_follow_button"></a>Twitter follow 
button
 
-Since version **1\.1**, fluido-skin supports the Twitter [follow 
button](https://dev.twitter.com/web/follow-button) to simplify its integration. 
Users must define:
-
-- `custom.fluidoSkin.twitter.user`: **required**, it is the Twitter id to 
suggest to follow;
-- `custom.fluidoSkin.twitter.showUser`: **optional**, flag to mark the user 
has to be shown (`false` by default);
-- `custom.fluidoSkin.twitter.showFollowers`: **optional**, flag to mark the 
followers ribbon has to be shown (`false` by default).
-
-    ```xml
-    <site xmlns="http://maven.apache.org/SITE/2.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-      xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 
https://maven.apache.org/xsd/site-2.0.0.xsd";>
-      [...]
-      <custom>
-        <fluidoSkin>
-          <twitter>
-            <user>simonetripodi</user>
-            <showUser>true</showUser>
-            <showFollowers>true</showFollowers>
-          </twitter>
-        </fluidoSkin>
-      </custom>
-      [...]
-    </site>
-    ```
-
-    By default, it is rendered in the sidebar, if the topbar only is available 
it will be rendered there.
+Removed in **2\.2\.0**: the button loaded a script from a third-party host on 
every page view, while the [ASF privacy 
policy](https://privacy.apache.org/policies/privacy-policy-public.html) 
integrates social media plug-ins with a two-click method. The `twitter` 
configuration is ignored.
 
 ${esc.h}${esc.h}${esc.h} <a id="Facebook_like_button"></a>Facebook like button
 
-Since version **1\.2**, fluido-skin supports the Facebook 
[like](https://developers.facebook.com/docs/plugins/like-button) integration. 
Users can define similar option to Facebook SDK:
-
-- `custom.fluidoSkin.facebookLike.recommend`: **optional**, if set to `true` 
**Recommend** button will be rendered instead of **Like**
-- `custom.fluidoSkin.facebookLike.shareButton`: **optional**, if set to `true` 
**Share Button** will be included.
-- `custom.fluidoSkin.facebookLike.layout`: **optional** facebook layout, Can 
be one of:
-    - `standard`
-    - `button_count`: default if sidebar is not enabled
-    - `button`
-    - `box_count`: default if sidebar is enabled
-
-        ```xml
-        <site xmlns="http://maven.apache.org/SITE/2.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-          xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 
https://maven.apache.org/xsd/site-2.0.0.xsd";>
-          [...]
-          <custom>
-            <fluidoSkin>
-              <facebookLike>
-                <recommend>true/false</recommend>
-                <shareButton>true/false</shareButton>
-                <layout>box_count</layout>
-              </facebookLike>
-            </fluidoSkin>
-          </custom>
-          [...]
-        </site>
-        ```
-
-    By default, it is rendered in the sidebar, if the topbar only is available 
it will be rendered there.
-
-    **Note** in order the Facebook like button appears, `${project.url}` 
property **must** be set in the `pom.xml`!
+Removed in **2\.2\.0**, for the same reason. The `facebookLike` configuration 
is ignored.
 
 ${esc.h}${esc.h}${esc.h} <a id="Flattr_button"></a>Flattr button
 

Reply via email to