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 30eb25465139a5d8012870aa1d143056bddb45d9 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Tue Nov 3 21:41:17 2026 +0100 Remove Google Analytics and Google Search Both made the reader's browser talk to a third-party host: the analytics script on every page view, the search box with every query. The Universal Analytics service the script used no longer collects data. A site descriptor that still sets googleAnalytics or googleSearch builds as before; the options are ignored. The documentation points to Matomo and to the head placeholder of the site descriptor instead. --- src/it/mskins-14/verify.groovy | 9 +-- .../mskins-143_default/src/site/apt/index.apt.vm | 2 +- src/it/mskins-143_default/verify.groovy | 10 +-- src/it/mskins-143_false/pom.xml | 62 ------------------ src/it/mskins-143_false/src/site/apt/index.apt.vm | 36 ---------- src/it/mskins-143_false/src/site/site.xml | 52 --------------- src/it/mskins-143_false/verify.groovy | 25 ------- src/it/mskins-143_true/pom.xml | 62 ------------------ src/it/mskins-143_true/src/site/apt/index.apt.vm | 36 ---------- src/it/mskins-143_true/src/site/site.xml | 52 --------------- .../verify.groovy | 10 ++- src/it/mskins-17/src/site/apt/index.apt.vm | 2 +- src/it/sidebar/src/site/apt/index.apt.vm | 2 +- src/it/topbar-inverse/src/site/apt/bar.apt.vm | 2 +- src/it/topbar-inverse/src/site/apt/beer.apt.vm | 2 +- src/it/topbar-inverse/src/site/apt/foo.apt.vm | 2 +- src/it/topbar-inverse/src/site/apt/index.apt.vm | 2 +- src/it/topbar-inverse/src/site/apt/wine.apt.vm | 2 +- src/it/topbar/src/site/apt/bar.apt.vm | 2 +- src/it/topbar/src/site/apt/beer.apt.vm | 2 +- src/it/topbar/src/site/apt/foo.apt.vm | 2 +- src/it/topbar/src/site/apt/index.apt.vm | 2 +- src/it/topbar/src/site/apt/wine.apt.vm | 2 +- src/main/resources/META-INF/maven/site-macros.vm | 34 ---------- src/main/resources/META-INF/maven/site.vm | 12 +--- src/site/markdown/index.md.vm | 76 ++-------------------- 26 files changed, 34 insertions(+), 468 deletions(-) diff --git a/src/it/mskins-14/verify.groovy b/src/it/mskins-14/verify.groovy index 390cba1..7c5e36f 100644 --- a/src/it/mskins-14/verify.groovy +++ b/src/it/mskins-14/verify.groovy @@ -17,8 +17,9 @@ * under the License. */ +// Google Search was removed in 2.2.0: a site.xml that still configures it builds, without a search form or any link to +// Google, and without the box below the menu that held the form String html = new File( basedir, "target/site/index.html" ).text - -// Google search configured: the box below the menu holds the search form -assert ( html =~ /class="sidebar-nav[ "]/ ).size() == 2 -assert html.contains( '<form id="search-form" action="https://www.google.com/search" method="get" >' ) +assert ( html =~ /class="sidebar-nav[ "]/ ).size() == 1 +assert !html.contains( 'search-form' ) +assert !html.toLowerCase().contains( 'google' ) diff --git a/src/it/mskins-143_default/src/site/apt/index.apt.vm b/src/it/mskins-143_default/src/site/apt/index.apt.vm index bd855b0..1152cc2 100644 --- a/src/it/mskins-143_default/src/site/apt/index.apt.vm +++ b/src/it/mskins-143_default/src/site/apt/index.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with additional Google Analytics options. + This is a test for ${skinName} with Google Analytics options, ignored since 2.2.0. ${skinDescription} * Actual configuration diff --git a/src/it/mskins-143_default/verify.groovy b/src/it/mskins-143_default/verify.groovy index 794a4b6..ee834f8 100644 --- a/src/it/mskins-143_default/verify.groovy +++ b/src/it/mskins-143_default/verify.groovy @@ -17,9 +17,11 @@ * under the License. */ +// Google Analytics was removed in 2.2.0: a site.xml that still configures it builds, and no page loads anything from +// Google File index = new File( basedir, "target/site/index.html" ) assert index.exists() -assert !index.text.contains( '_gaq.push([\'_setAccount\', \'FOO-BAR\']);' ) -assert index.text.contains( 'ga(\'create\', \'FOO-BAR\', \'auto\');' ) -assert index.text.contains( 'ga(\'set\', \'anonymizeIp\', true);' ) -assert index.text.contains( 'ga(\'set\', \'forceSSL\', true);' ) \ No newline at end of file +String html = index.text +assert !html.contains( 'google-analytics.com' ) +assert !html.contains( 'GoogleAnalyticsObject' ) +assert !html.contains( "ga('create'" ) diff --git a/src/it/mskins-143_false/pom.xml b/src/it/mskins-143_false/pom.xml deleted file mode 100644 index 0c5ebb4..0000000 --- a/src/it/mskins-143_false/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.maven.skins</groupId> - <artifactId>maven-skins</artifactId> - <version>@project.parent.version@</version> - </parent> - - <groupId>org.apache.maven.skins.its</groupId> - <artifactId>mskins-143_false</artifactId> - <version>@project.version@</version> - - <properties> - <skinName>@project.name@</skinName> - <skinDescription>@project.description@</skinDescription> - <skinGroupId>@project.groupId@</skinGroupId> - <skinArtifactId>@project.artifactId@</skinArtifactId> - <skinVersion>@project.version@</skinVersion> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-site-plugin</artifactId> - <version>@sitePluginVersion@</version> - </plugin> - </plugins> - </build> - - <reporting> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-project-info-reports-plugin</artifactId> - <version>@projectInfoReportsPluginVersion@</version> - <configuration> - <dependencyDetailsEnabled>false</dependencyDetailsEnabled> - </configuration> - </plugin> - </plugins> - </reporting> - -</project> diff --git a/src/it/mskins-143_false/src/site/apt/index.apt.vm b/src/it/mskins-143_false/src/site/apt/index.apt.vm deleted file mode 100644 index bd855b0..0000000 --- a/src/it/mskins-143_false/src/site/apt/index.apt.vm +++ /dev/null @@ -1,36 +0,0 @@ - ------ - ${project.name} - ------ - Jens Reimann - ------ - 2018-03-23 - ------ - -~~ Licensed to the Apache Software Foundation (ASF) under one -~~ or more contributor license agreements. See the NOTICE file -~~ distributed with this work for additional information -~~ regarding copyright ownership. The ASF licenses this file -~~ to you under the Apache License, Version 2.0 (the -~~ "License"); you may not use this file except in compliance -~~ with the License. You may obtain a copy of the License at -~~ -~~ http://www.apache.org/licenses/LICENSE-2.0 -~~ -~~ Unless required by applicable law or agreed to in writing, -~~ software distributed under the License is distributed on an -~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -~~ KIND, either express or implied. See the License for the -~~ specific language governing permissions and limitations -~~ under the License. - -~~ NOTE: For help with the syntax of this file, see: -~~ http://maven.apache.org/doxia/references/apt-format.html - -${project.name} - - This is a test for ${skinName} with additional Google Analytics options. - ${skinDescription} - -* Actual configuration - -%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml} diff --git a/src/it/mskins-143_false/src/site/site.xml b/src/it/mskins-143_false/src/site/site.xml deleted file mode 100644 index 389ac2f..0000000 --- a/src/it/mskins-143_false/src/site/site.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - --> - -<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" - name="${skinName}"> - - <skin> - <groupId>${skinGroupId}</groupId> - <artifactId>${skinArtifactId}</artifactId> - <version>${skinVersion}</version> - </skin> - - <!-- START SNIPPET: skin-custom-config --> - <custom> - <fluidoSkin> - <googleAnalytics> - <accountId>FOO-BAR</accountId> - <anonymizeIp>false</anonymizeIp> - <forceSSL>false</forceSSL> - </googleAnalytics> - </fluidoSkin> - </custom> - <!-- END SNIPPET: skin-custom-config --> - - <body> - <breadcrumbs> - <item name="Apache Maven Fluido Skin" href="https://maven.apache.org/skins/maven-fluido-skin/index.html" /> - </breadcrumbs> - </body> - -</site> diff --git a/src/it/mskins-143_false/verify.groovy b/src/it/mskins-143_false/verify.groovy deleted file mode 100644 index 2547ed8..0000000 --- a/src/it/mskins-143_false/verify.groovy +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -File index = new File( basedir, "target/site/index.html" ) -assert index.exists() -assert !index.text.contains( '_gaq.push([\'_setAccount\', \'FOO-BAR\']);' ) -assert index.text.contains( 'ga(\'create\', \'FOO-BAR\', \'auto\');' ) -assert !index.text.contains( 'ga(\'set\', \'anonymizeIp\', true);' ) -assert !index.text.contains( 'ga(\'set\', \'forceSSL\', true);' ) \ No newline at end of file diff --git a/src/it/mskins-143_true/pom.xml b/src/it/mskins-143_true/pom.xml deleted file mode 100644 index 2bf1090..0000000 --- a/src/it/mskins-143_true/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.maven.skins</groupId> - <artifactId>maven-skins</artifactId> - <version>@project.parent.version@</version> - </parent> - - <groupId>org.apache.maven.skins.its</groupId> - <artifactId>mskins-143_true</artifactId> - <version>@project.version@</version> - - <properties> - <skinName>@project.name@</skinName> - <skinDescription>@project.description@</skinDescription> - <skinGroupId>@project.groupId@</skinGroupId> - <skinArtifactId>@project.artifactId@</skinArtifactId> - <skinVersion>@project.version@</skinVersion> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-site-plugin</artifactId> - <version>@sitePluginVersion@</version> - </plugin> - </plugins> - </build> - - <reporting> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-project-info-reports-plugin</artifactId> - <version>@projectInfoReportsPluginVersion@</version> - <configuration> - <dependencyDetailsEnabled>true</dependencyDetailsEnabled> - </configuration> - </plugin> - </plugins> - </reporting> - -</project> diff --git a/src/it/mskins-143_true/src/site/apt/index.apt.vm b/src/it/mskins-143_true/src/site/apt/index.apt.vm deleted file mode 100644 index bd855b0..0000000 --- a/src/it/mskins-143_true/src/site/apt/index.apt.vm +++ /dev/null @@ -1,36 +0,0 @@ - ------ - ${project.name} - ------ - Jens Reimann - ------ - 2018-03-23 - ------ - -~~ Licensed to the Apache Software Foundation (ASF) under one -~~ or more contributor license agreements. See the NOTICE file -~~ distributed with this work for additional information -~~ regarding copyright ownership. The ASF licenses this file -~~ to you under the Apache License, Version 2.0 (the -~~ "License"); you may not use this file except in compliance -~~ with the License. You may obtain a copy of the License at -~~ -~~ http://www.apache.org/licenses/LICENSE-2.0 -~~ -~~ Unless required by applicable law or agreed to in writing, -~~ software distributed under the License is distributed on an -~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -~~ KIND, either express or implied. See the License for the -~~ specific language governing permissions and limitations -~~ under the License. - -~~ NOTE: For help with the syntax of this file, see: -~~ http://maven.apache.org/doxia/references/apt-format.html - -${project.name} - - This is a test for ${skinName} with additional Google Analytics options. - ${skinDescription} - -* Actual configuration - -%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml} diff --git a/src/it/mskins-143_true/src/site/site.xml b/src/it/mskins-143_true/src/site/site.xml deleted file mode 100644 index a92fc93..0000000 --- a/src/it/mskins-143_true/src/site/site.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - --> - -<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" - name="${skinName}"> - - <skin> - <groupId>${skinGroupId}</groupId> - <artifactId>${skinArtifactId}</artifactId> - <version>${skinVersion}</version> - </skin> - - <!-- START SNIPPET: skin-custom-config --> - <custom> - <fluidoSkin> - <googleAnalytics> - <accountId>FOO-BAR</accountId> - <anonymizeIp>true</anonymizeIp> - <forceSSL>true</forceSSL> - </googleAnalytics> - </fluidoSkin> - </custom> - <!-- END SNIPPET: skin-custom-config --> - - <body> - <breadcrumbs> - <item name="Apache Maven Fluido Skin" href="https://maven.apache.org/skins/maven-fluido-skin/index.html" /> - </breadcrumbs> - </body> - -</site> diff --git a/src/it/mskins-143_true/verify.groovy b/src/it/mskins-14_sitesearch/verify.groovy similarity index 69% rename from src/it/mskins-143_true/verify.groovy rename to src/it/mskins-14_sitesearch/verify.groovy index 794a4b6..c7ee5ab 100644 --- a/src/it/mskins-143_true/verify.groovy +++ b/src/it/mskins-14_sitesearch/verify.groovy @@ -17,9 +17,7 @@ * under the License. */ -File index = new File( basedir, "target/site/index.html" ) -assert index.exists() -assert !index.text.contains( '_gaq.push([\'_setAccount\', \'FOO-BAR\']);' ) -assert index.text.contains( 'ga(\'create\', \'FOO-BAR\', \'auto\');' ) -assert index.text.contains( 'ga(\'set\', \'anonymizeIp\', true);' ) -assert index.text.contains( 'ga(\'set\', \'forceSSL\', true);' ) \ No newline at end of file +// Google Search with a sitesearch value, removed in 2.2.0: the site builds and no page mentions Google +String html = new File( basedir, "target/site/index.html" ).text +assert !html.contains( 'search-form' ) +assert !html.toLowerCase().contains( 'google' ) diff --git a/src/it/mskins-17/src/site/apt/index.apt.vm b/src/it/mskins-17/src/site/apt/index.apt.vm index f6d50d5..61e9875 100644 --- a/src/it/mskins-17/src/site/apt/index.apt.vm +++ b/src/it/mskins-17/src/site/apt/index.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with sidebar enabled and Google Search. + This is a test for ${skinName} with sidebar enabled and a Google Search configuration, ignored since 2.2.0. ${skinDescription} * Actual configuration diff --git a/src/it/sidebar/src/site/apt/index.apt.vm b/src/it/sidebar/src/site/apt/index.apt.vm index b61a44e..5c97041 100644 --- a/src/it/sidebar/src/site/apt/index.apt.vm +++ b/src/it/sidebar/src/site/apt/index.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with sidebar enabled and Google Search. + This is a test for ${skinName} with sidebar enabled and a Google Search configuration, ignored since 2.2.0. ${skinDescription} * Actual configuration diff --git a/src/it/topbar-inverse/src/site/apt/bar.apt.vm b/src/it/topbar-inverse/src/site/apt/bar.apt.vm index b445ba9..57376ec 100644 --- a/src/it/topbar-inverse/src/site/apt/bar.apt.vm +++ b/src/it/topbar-inverse/src/site/apt/bar.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. bar.html diff --git a/src/it/topbar-inverse/src/site/apt/beer.apt.vm b/src/it/topbar-inverse/src/site/apt/beer.apt.vm index c05ba4b..ae31cb2 100644 --- a/src/it/topbar-inverse/src/site/apt/beer.apt.vm +++ b/src/it/topbar-inverse/src/site/apt/beer.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. beer.html diff --git a/src/it/topbar-inverse/src/site/apt/foo.apt.vm b/src/it/topbar-inverse/src/site/apt/foo.apt.vm index ee4727f..d17a3af 100644 --- a/src/it/topbar-inverse/src/site/apt/foo.apt.vm +++ b/src/it/topbar-inverse/src/site/apt/foo.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. foo.html diff --git a/src/it/topbar-inverse/src/site/apt/index.apt.vm b/src/it/topbar-inverse/src/site/apt/index.apt.vm index e3775ac..14dba29 100644 --- a/src/it/topbar-inverse/src/site/apt/index.apt.vm +++ b/src/it/topbar-inverse/src/site/apt/index.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. ${skinDescription} topbar width configured with navBarStyle to navbar-inverse. diff --git a/src/it/topbar-inverse/src/site/apt/wine.apt.vm b/src/it/topbar-inverse/src/site/apt/wine.apt.vm index eead457..ec0ebc1 100644 --- a/src/it/topbar-inverse/src/site/apt/wine.apt.vm +++ b/src/it/topbar-inverse/src/site/apt/wine.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. wine.html diff --git a/src/it/topbar/src/site/apt/bar.apt.vm b/src/it/topbar/src/site/apt/bar.apt.vm index b445ba9..57376ec 100644 --- a/src/it/topbar/src/site/apt/bar.apt.vm +++ b/src/it/topbar/src/site/apt/bar.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. bar.html diff --git a/src/it/topbar/src/site/apt/beer.apt.vm b/src/it/topbar/src/site/apt/beer.apt.vm index c05ba4b..ae31cb2 100644 --- a/src/it/topbar/src/site/apt/beer.apt.vm +++ b/src/it/topbar/src/site/apt/beer.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. beer.html diff --git a/src/it/topbar/src/site/apt/foo.apt.vm b/src/it/topbar/src/site/apt/foo.apt.vm index ee4727f..d17a3af 100644 --- a/src/it/topbar/src/site/apt/foo.apt.vm +++ b/src/it/topbar/src/site/apt/foo.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. foo.html diff --git a/src/it/topbar/src/site/apt/index.apt.vm b/src/it/topbar/src/site/apt/index.apt.vm index 16f4d03..85df8f4 100644 --- a/src/it/topbar/src/site/apt/index.apt.vm +++ b/src/it/topbar/src/site/apt/index.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. ${skinDescription} topbar width configured with topBarContainerStyle which set style attribute content. diff --git a/src/it/topbar/src/site/apt/wine.apt.vm b/src/it/topbar/src/site/apt/wine.apt.vm index eead457..ec0ebc1 100644 --- a/src/it/topbar/src/site/apt/wine.apt.vm +++ b/src/it/topbar/src/site/apt/wine.apt.vm @@ -28,7 +28,7 @@ ${project.name} - This is a test for ${skinName} with topbar enabled, sidebar disabled and Google Search. + This is a test for ${skinName} with topbar enabled, sidebar disabled and a Google Search configuration, ignored since 2.2.0. wine.html diff --git a/src/main/resources/META-INF/maven/site-macros.vm b/src/main/resources/META-INF/maven/site-macros.vm index e57afc2..4ddeed1 100644 --- a/src/main/resources/META-INF/maven/site-macros.vm +++ b/src/main/resources/META-INF/maven/site-macros.vm @@ -396,27 +396,6 @@ $indent ## #**##end #end ## -#macro( googleAnalytics ) -#set( $accountId = $site.getCustomValue( 'fluidoSkin.googleAnalytics.accountId' ) ) -#**##if( $accountId && $accountId.length() > 0 ) - <!-- Google Analytics --> - <script> - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - ga('create', '$accountId', 'auto'); - ga('send', 'pageview'); -#**##if( $convert.toBoolean( $site.getCustomValue( 'fluidoSkin.googleAnalytics.anonymizeIp', 'true' ) ) ) - ga('set', 'anonymizeIp', true); -#**##end -#**##if( $convert.toBoolean( $site.getCustomValue( 'fluidoSkin.googleAnalytics.forceSSL', 'true' ) ) ) - ga('set', 'forceSSL', true); -#**##end - </script> -#**##end -#end - #macro( matomo ) #**##if( $site.getCustomValue( 'matomo.url' ) && $site.getCustomValue( 'matomo.url' ).length() > 0 && $site.getCustomValue( 'matomo.siteId' ) && $site.getCustomValue( 'matomo.siteId' ).length() > 0 ) @@ -443,19 +422,6 @@ $indent ## #**##end #end -## -#macro( googleSearch $top ) -<form id="search-form" action="https://www.google.com/search" method="get" #if( $top ) class="d-flex ms-auto"#end> -#**##if( $site.getCustomChild( 'fluidoSkin.googleSearch.sitesearch' ) ) -#* *##set( $sitesearchValue = $site.getCustomValue( 'fluidoSkin.googleSearch.sitesearch' ) ) -#**##else -#* *##set( $startIndex = $project.url.indexOf( '://' ) + 3 ) -#* *##set( $sitesearchValue = $project.url.substring( $startIndex, $project.url.length() ) ) -#**##end - <input value="$sitesearchValue" name="sitesearch" type="hidden" /> - <input class="search-query form-control form-control-sm" name="q" id="query" type="search" placeholder="Search with Google..." aria-label="Search with Google" /> -</form> -#end ## #macro( forkMeOnGitHubHead ) #**##if( $site.getCustomChild( 'fluidoSkin.gitHub.projectId' ) ) diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm index 5014bc7..ab304dc 100644 --- a/src/main/resources/META-INF/maven/site.vm +++ b/src/main/resources/META-INF/maven/site.vm @@ -68,7 +68,6 @@ #* *#$render.eval( $site.body.head ) #**##end #**#$pageHead -#**##googleAnalytics() #**##matomo() #**##forkMeOnGitHubHead() </head> @@ -90,8 +89,6 @@ #* *##end #* *##end #**##end -#**##set( $searchEnabled = $site.getCustomChild( 'fluidoSkin.googleSearch' ) - && ( $site.getCustomValue( 'fluidoSkin.googleSearch.sitesearch' ) || $project.url ) ) ## #**##if( $topBarEnabled ) #* *##set( $navBarStyle = $site.getCustomValue( 'fluidoSkin.navBarStyle', '' ) ) @@ -150,10 +147,6 @@ </ul> #* *##end ## -#* *##if( $searchEnabled && !$sideBarEnabled ) -#* *##googleSearch( true ) -#* *##end -## ## ## MSKINS-31 #* *##if( $site.body && $site.body.links @@ -265,11 +258,8 @@ #* *##publishDate( "navigation-bottom" $site.publishDate $site.version ) </nav> ## no empty box when nothing is configured for it -#* *##if( $searchEnabled || ( $site.poweredBy && !$site.poweredBy.isEmpty() ) ) +#* *##if( $site.poweredBy && !$site.poweredBy.isEmpty() ) <div class="sidebar-nav text-center mb-3"> -#* *##if( $searchEnabled ) -#* *##googleSearch( false ) -#* *##end <div id="poweredBy"> #* *##builtByLogo( $site.poweredBy ) </div> diff --git a/src/site/markdown/index.md.vm b/src/site/markdown/index.md.vm index 619d45c..d9d2925 100644 --- a/src/site/markdown/index.md.vm +++ b/src/site/markdown/index.md.vm @@ -192,80 +192,14 @@ Users can optionally enable **Matomo**. How to configure it for Apache Analytics ${esc.h}${esc.h}${esc.h} <a id="Google_Analytics"></a>Google Analytics -Users can optionally enable **Google Analytics** for the generated site: - -```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> - <googleAnalytics> - <accountId>UA-12345...</accountId> - </googleAnalytics> - </fluidoSkin> - </custom> - [...] -</site> -``` - -By default, `forceSSL` and `anonymizeIp` are enabled. You can disable both, but this might be illegal in several countries or regions (e.g., in the EU due to GDPR): - -```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> - <googleAnalytics> - <accountId>UA-12345...</accountId> - <anonymizeIp>true/false</anonymizeIp> - <forceSSL>true/false</forceSSL> - </googleAnalytics> - </fluidoSkin> - </custom> - [...] -</site> -``` +Removed in **2\.2\.0**: the script came from a third-party host on every page view, and the Universal Analytics +service it used no longer collects data. The `googleAnalytics` configuration is ignored. Use [Matomo](#Matomo_.28e.g._Apache_Analytics.29), +or add your own script in the `head` element of the site descriptor's `body` ([head/footer placeholders](#head.2Ffooter_placeholders)). ${esc.h}${esc.h}${esc.h} <a id="Google_Search"></a>Google Search -Users can optionally enable the **Google Search** for the generated site, requirements are: - -- the `project.url` property in `pom.xml`, unless the `custom.fluidoSkin.googleSearch.sitesearch` property is set in the `site.xml`: - - ```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"> - [...] - <url>https://maven.apache.org/skins/${project.artifactId}</url> - [...] - </site> - ``` - -- the `custom.fluidoSkin.googleSearch` element in `site.xml`: - - ```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> - <googleSearch> - <sitesearch/> - </googleSearch> - </fluidoSkin> - </custom> - [...] - </site> - ``` - -By default, the search form: - -- is _not_ enabled; adding `custom.fluidoSkin.googleSearch` is enough to enable the searchbox. -- is rendered in the sidebar, if the topbar only is available it will be rendered there. - -External links are either rendered in the sidebar or the topbar. When both sidebar and topbar are enabled, they are rendered as dropdown in the topbar only. +Removed in **2\.2\.0**: the search box sent the reader's query to a third-party host. The `googleSearch` +configuration is ignored. ${esc.h}${esc.h}${esc.h} <a id="Source_code_line_numbers"></a>Source code line numbers
