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

commit 02c71e8043d77cd3f51ff2aecd350b1e1ba0d2f7
Author: Konrad Windszus <[email protected]>
AuthorDate: Sun Jun 7 20:50:36 2026 +0200

    Only conditionally include anchor js, gh-ribbon css and profile
    background images
    
    Minify separately
    Bump minimum doxia-sitetools requirement to 2.1.0
    
    This closes #327
---
 pom.xml                                          | 42 ++++++++++++++++++++----
 src/main/resources/META-INF/maven/site-macros.vm |  2 ++
 src/main/resources/META-INF/maven/skin.xml       | 28 ++++++++++++++--
 3 files changed, 62 insertions(+), 10 deletions(-)

diff --git a/pom.xml b/pom.xml
index 10f156f..7073791 100644
--- a/pom.xml
+++ b/pom.xml
@@ -149,7 +149,9 @@ under the License.
         
<directory>${project.build.directory}/${project.build.finalName}</directory>
         <includes>
           <include>css/apache-maven-fluido-${project.version}.min.css</include>
+          <include>css/gh-fork-ribbon.min.css</include>
           <include>js/apache-maven-fluido-${project.version}.min.js</include>
+          <include>js/anchor-${anchorjs.version}.min.js</include>
         </includes>
       </resource>
     </resources>
@@ -193,6 +195,12 @@ under the License.
         <groupId>com.samaxes.maven</groupId>
         <artifactId>minify-maven-plugin</artifactId>
         <version>1.7.6</version>
+        <configuration>
+          <webappSourceDir>${basedir}/src/main/resources</webappSourceDir>
+          <cssSourceDir>css</cssSourceDir>
+          <jsSourceDir>js</jsSourceDir>
+          <jsEngine>CLOSURE</jsEngine>
+        </configuration>
         <!-- https://github.com/samaxes/minify-maven-plugin/pull/176 -->
         <dependencies>
           <dependency>
@@ -203,33 +211,53 @@ under the License.
         </dependencies>
         <executions>
           <execution>
-            <id>default-minify</id>
+            <id>minify-main-resources</id>
             <goals>
               <goal>minify</goal>
             </goals>
             <phase>generate-resources</phase>
             <configuration>
-              <webappSourceDir>${basedir}/src/main/resources</webappSourceDir>
-              <cssSourceDir>css</cssSourceDir>
               <cssSourceFiles>
                 
<cssSourceFile>bootstrap-${bootstrap.version}.css</cssSourceFile>
                 
<cssSourceFile>bootstrap-${bootstrap.version}-responsive.css</cssSourceFile>
                 <cssSourceFile>maven-base.css</cssSourceFile>
                 <cssSourceFile>maven-theme.css</cssSourceFile>
                 <cssSourceFile>prettify.css</cssSourceFile>
-                <cssSourceFile>gh-fork-ribbon.css</cssSourceFile>
               </cssSourceFiles>
               
<cssFinalFile>apache-maven-fluido-${project.version}.css</cssFinalFile>
-              <jsSourceDir>js</jsSourceDir>
               <jsSourceFiles>
                 <jsSourceFile>jquery-${jquery.version}.js</jsSourceFile>
                 <jsSourceFile>bootstrap-${bootstrap.version}.js</jsSourceFile>
                 <jsSourceFile>prettify.js</jsSourceFile>
                 <jsSourceFile>fluido.js</jsSourceFile>
-                <jsSourceFile>anchor-${anchorjs.version}.js</jsSourceFile>
               </jsSourceFiles>
               
<jsFinalFile>apache-maven-fluido-${project.version}.js</jsFinalFile>
-              <jsEngine>CLOSURE</jsEngine>
+            </configuration>
+          </execution>
+          <execution>
+            <id>minify-anchor-resources</id>
+            <goals>
+              <goal>minify</goal>
+            </goals>
+            <phase>generate-resources</phase>
+            <configuration>
+              <jsSourceFiles>
+                <jsSourceFile>anchor-${anchorjs.version}.js</jsSourceFile>
+              </jsSourceFiles>
+              <jsFinalFile>anchor-${anchorjs.version}.js</jsFinalFile>
+            </configuration>
+          </execution>
+          <execution>
+            <id>minify-gh-fork-ribbon-resources</id>
+            <goals>
+              <goal>minify</goal>
+            </goals>
+            <phase>generate-resources</phase>
+            <configuration>
+              <cssSourceFiles>
+                <cssSourceFile>gh-fork-ribbon.css</cssSourceFile>
+              </cssSourceFiles>
+              <cssFinalFile>gh-fork-ribbon.css</cssFinalFile>
             </configuration>
           </execution>
         </executions>
diff --git a/src/main/resources/META-INF/maven/site-macros.vm 
b/src/main/resources/META-INF/maven/site-macros.vm
index 50e14b8..4d870c7 100644
--- a/src/main/resources/META-INF/maven/site-macros.vm
+++ b/src/main/resources/META-INF/maven/site-macros.vm
@@ -454,6 +454,7 @@ $indent     </ul>##
 ##
 #macro( forkMeOnGitHubHead )
 ##
+    <link rel="stylesheet" href="$relativePath/css/gh-fork-ribbon.css" />
 #*  *##set( $ribbonColor = "red" )
 #*  *##set( $definedRibbonColor = $site.getCustomChild( 
'fluidoSkin.gitHub.ribbonColor' ) )
 ##
@@ -561,6 +562,7 @@ Apache Maven Doxia Site Renderer#if( 
$doxiaSiteRendererVersion ) $doxiaSiteRende
 ##
 #macro( anchorJs )
 #**##if ( $decoration.getCustomChild( 'fluidoSkin.anchorJs' ) )
+    <script src="$relativePath/js/[email protected][email protected]"></script>
     <script>
 #*  *##if ( $decoration.getCustomValue( 'fluidoSkin.anchorJs.cssSelector' ) && 
$decoration.getCustomValue( 'fluidoSkin.anchorJs.cssSelector' ) != '' )
 #*    *##set ( $cssSelector = '"' + $decoration.getCustomValue( 
'fluidoSkin.anchorJs.cssSelector' ) + '"' )
diff --git a/src/main/resources/META-INF/maven/skin.xml 
b/src/main/resources/META-INF/maven/skin.xml
index 7d52067..7be53fb 100644
--- a/src/main/resources/META-INF/maven/skin.xml
+++ b/src/main/resources/META-INF/maven/skin.xml
@@ -19,9 +19,31 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<skin xmlns="http://maven.apache.org/SKIN/2.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  xsi:schemaLocation="http://maven.apache.org/SKIN/2.0.0 
http://maven.apache.org/xsd/skin-2.0.0.xsd";>
+<skin xmlns="http://maven.apache.org/SKIN/2.1.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/SKIN/2.1.0 
https://maven.apache.org/xsd/skin-2.1.0.xsd";>
   <prerequisites>
-    <doxia-sitetools>2.0.0</doxia-sitetools>
+    <doxia-sitetools>2.1.0</doxia-sitetools>
   </prerequisites>
+  <resource-conditions>
+    <resource-condition>
+      <resource-name>js/anchor-${anchorjs.version}.min.js</resource-name>
+      <vtl-condition>custom.fluidoSkin.anchorJs</vtl-condition>
+    </resource-condition>
+    <resource-condition>
+      <resource-name>css/gh-fork-ribbon.min.css</resource-name>
+      <vtl-condition>custom.fluidoSkin.gitHub</vtl-condition>
+    </resource-condition>
+    <resource-condition>
+      <resource-name>images/profiles/pre-release.png</resource-name>
+      <vtl-condition>custom.fluidoSkin.profile == 'pre-release'</vtl-condition>
+    </resource-condition>
+    <resource-condition>
+      <resource-name>images/profiles/retired.png</resource-name>
+      <vtl-condition>custom.fluidoSkin.profile == 'retired'</vtl-condition>
+    </resource-condition>
+    <resource-condition>
+      <resource-name>images/profiles/sandbox.png</resource-name>
+      <vtl-condition>custom.fluidoSkin.profile == 'sandbox'</vtl-condition>
+    </resource-condition>
+  </resource-conditions>
 </skin>

Reply via email to