Skip to content

Commit

Permalink
fix(website): Fix start page link and patches
Browse files Browse the repository at this point in the history
  • Loading branch information
hutcheb committed Nov 17, 2024
1 parent 9cec444 commit 571268c
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 67 deletions.
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@
<exclude>ui/frontend/project/node/**</exclude>
<exclude>ui/frontend/project/node_modules/**</exclude>

<exclude>website/node_modules/**</exclude>

<exclude>.mvn/**</exclude>

<!-- Exclude core dumps-->
Expand Down
1 change: 1 addition & 0 deletions website/asciidoc/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ name: plc4x
version: '0.13.0-SNAPSHOT'
prerelease: True
title: PLC4X
start_page: users:index.adoc
nav:
- modules/ROOT/nav.adoc
- modules/users/nav.adoc
Expand Down
2 changes: 1 addition & 1 deletion website/asciidoc/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
// 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.
//
//
74 changes: 74 additions & 0 deletions website/patches/header-content.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 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
#
# https://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.
--- "dependency\\antora\\partials\\header-content.hbs" 2024-10-25 18:22:18.000000000 +0800
+++ "supplemental\\partials\\header-content.hbs" 2024-11-16 07:57:44.368184200 +0800
@@ -1,7 +1,9 @@
<header class="header">
<nav class="navbar">
<div class="navbar-brand">
- <a class="navbar-item" href="{{{or site.url siteRootPath}}}">{{site.title}}</a>
+ <a class="navbar-item" href="{{{or site.url siteRootPath}}}">
+ <img src="{{{or site.url siteRootPath}}}/plc4x/{{page.version}}/_images/apache_plc4x_logo_small.png" alt="Apache PLC4X">
+ </a>
{{#if env.SITE_SEARCH_PROVIDER}}
<div class="navbar-item search hide-for-print">
<div id="search-field" class="field">
@@ -16,29 +37,29 @@
</button>
</div>
<div id="topbar-nav" class="navbar-menu">
- <div class="navbar-end">
- <a class="navbar-item" href="#">Home</a>
+ <div class="navbar-end justify-content-center">
+ <a class="navbar-item" href="{{{or site.url siteRootPath}}}/">Home</a>
+ <a class="navbar-item" href="{{{or site.url siteRootPath}}}/plc4x/{{page.version}}/users">Users</a>
+ <a class="navbar-item" href="{{{or site.url siteRootPath}}}/plc4x/{{page.version}}/developers">Developers</a>
<div class="navbar-item has-dropdown is-hoverable">
- <a class="navbar-link" href="#">Products</a>
+ <a class="navbar-link" href="https://www.apache.org">Apache</a>
<div class="navbar-dropdown">
- <a class="navbar-item" href="#">Product A</a>
- <a class="navbar-item" href="#">Product B</a>
- <a class="navbar-item" href="#">Product C</a>
- </div>
- </div>
- <div class="navbar-item has-dropdown is-hoverable">
- <a class="navbar-link" href="#">Services</a>
- <div class="navbar-dropdown">
- <a class="navbar-item" href="#">Service A</a>
- <a class="navbar-item" href="#">Service B</a>
- <a class="navbar-item" href="#">Service C</a>
+ <a class="navbar-item" href="https://www.apache.org">Apache Homepage</a>
+ <a class="navbar-item" href="https://www.apache.org/licenses/">License</a>
+ <a class="navbar-item" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
+ <a class="navbar-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
+ <a class="navbar-item" href="https://www.apache.org/security/">Security</a>
+ <a class="navbar-item" href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy</a>
+ <a class="navbar-item" href="https://www.apache.org/foundation/policies/conduct">Code of Conduct</a>
+ <a class="navbar-item" href="https://events.apache.org/">Upcoming Events</a>
</div>
</div>
<div class="navbar-item">
<span class="control">
- <a class="button is-primary" href="#">Download</a>
+ <a class="button is-primary" href="{{{or site.url siteRootPath}}}/plc4x/{{page.version}}/users/download">Download</a>
</span>
</div>
+ <a class="acevent" data-format="wide"></a>
</div>
</div>
</nav>
61 changes: 61 additions & 0 deletions website/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,38 @@
<outputDirectory>${project.build.directory}/dependency/fontawesome</outputDirectory>
</configuration>
</execution>
<execution>
<id>get-source-hbs</id>
<phase>pre-site</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}/dependency/antora</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete failonerror="false">
<fileset dir="${project.build.directory}/supplemental/partials" includes="header-content.hbs" />
</delete>
</target>
</configuration>
</execution>
</executions>
</plugin>

Expand Down Expand Up @@ -169,6 +201,12 @@
</directory>
<targetPath>js</targetPath>
</resource>
<resource>
<directory>
${project.build.directory}/dependency/antora/partials
</directory>
<targetPath>partials</targetPath>
</resource>
</resources>
</configuration>
</execution>
Expand Down Expand Up @@ -252,6 +290,29 @@
<useDefaultDelimiters>false</useDefaultDelimiters>
</configuration-->
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>git-apply-patch-header</id>
<phase>pre-site</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>git</executable>
<arguments>
<argument>apply</argument>
<argument>-p0</argument>
<argument>patches/header-content.patch</argument>
<argument>--directory=target</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>


<!--
The bootstrap uses "fonts" as directory for locating fonts and fontawesome uses "webfonts".
Expand Down
66 changes: 0 additions & 66 deletions website/supplemental/partials/header-content.hbs

This file was deleted.

0 comments on commit 571268c

Please sign in to comment.