Skip to content

Commit

Permalink
Merge branch 'main' of github.com:webtide/jetty.website into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcc0nn3ll committed Apr 15, 2024
2 parents 434e3e4 + 3983277 commit 0335deb
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 20 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ jobs:
env:
# must set ANTORA_CACHE_DIR so Maven will put jetty home where Antora Collector won't delete it
ANTORA_CACHE_DIR: ${{ github.workspace }}/.cache/antora
run: |
npm --audit false --fund false --omit optional --package-lock false i
npx --offline antora --stacktrace --extension @antora/collector-extension --extension @antora/lunr-extension --extension jetty-downloads-extension --html-url-extension-style indexify --log-failure-level error antora-playbook.yml
npm_config_audit: false
#run: |
# npm --audit false --fund false --omit optional --package-lock false i
# npx --offline antora --stacktrace --extension @antora/collector-extension --extension @antora/lunr-extension --extension jetty-downloads --extension register-asciidoctor-kroki --html-url-extension-style indexify --log-failure-level error antora-playbook.yml
run: mvn -ntp antora:antora@full
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: target/site
- name: Deploy Artifact to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/.cache/
/_site/
/node_modules/
/target/
/package-lock.json

/target/
29 changes: 20 additions & 9 deletions antora-playbook.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
# to build site quickly, run:
#
# npx antora antora-playbook.yml
# mvn antora:antora
#
# which is equivalent to:
#
# npx antora --clean --fetch antora-playbook.yml
#
# to activate the diagram generator (Kroki), run:
#
# npx --package antora --package asciidoctor-kroki antora antora-playbook.yml
# mvn antora:antora@kroki
#
# to run the full production build, start by installing all the required dependencies:
# which is equivalent to:
#
# npm i --package-lock false
# npx --package antora --package asciidoctor-kroki antora --extension register-asciidoctor-kroki antora-playbook.yml
#
# to run the full production build, run:
#
# then run:
# mvn antora:antora@full
#
# ANTORA_CACHE_DIR=$PWD/.cache/antora npx --offline antora --extension @antora/collector-extension --extension @antora/lunr-extension --extension jetty-downloads-extension antora-playbook.yml
# which is equivalent to:
#
# npm i --package-lock false
# ANTORA_CACHE_DIR=$PWD/.cache/antora npx --offline antora --clean --fetch --extension @antora/collector-extension --extension @antora/lunr-extension --extension jetty-downloads --extension register-asciidoctor-kroki --log-failure-level error --stacktrace antora-playbook.yml
antora:
extensions:
- ./lib/register-asciidoctor-kroki-extension.js
- ./lib/component-url-prefix-extension.js
- id: jetty-downloads-extension
- id: jetty-downloads
require: ./lib/jetty-downloads-extension.js
enabled: false
last_eol_version: 11
- id: register-asciidoctor-kroki
require: ./lib/register-asciidoctor-kroki-extension.js
enabled: false
site:
title: Eclipse Jetty
url: https://jetty.org
Expand Down Expand Up @@ -50,4 +61,4 @@ ui:
url: https://github.com/webtide/jetty.website/releases/download/ui-prod-latest/ui-bundle.zip
snapshot: true
output:
dir: ./_site
dir: target/site
50 changes: 43 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<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>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-website</artifactId>
Expand All @@ -9,12 +9,10 @@
<description>Website for jetty.org</description>
<url>https://jetty.org</url>
<inceptionYear>1995</inceptionYear>

<organization>
<name>Webtide</name>
<url>https://webtide.com</url>
</organization>

<licenses>
<license>
<name>Eclipse Public License - Version 2.0</name>
Expand All @@ -25,18 +23,56 @@
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>

<properties>
<antora.plugin.version>1.0.0-SNAPSHOT</antora.plugin.version>
<antora.plugin.version>1.0.0-alpha.2</antora.plugin.version>
<node.version>18.20.1</node.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.antora</groupId>
<artifactId>antora-maven-plugin</artifactId>
<version>${antora.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<options>
<option>clean</option>
<option>fetch</option>
</options>
</configuration>
<executions>
<execution>
<id>cached</id>
<configuration>
<additionalOptions>
<option>fetch!</option>
</additionalOptions>
</configuration>
</execution>
<execution>
<id>kroki</id>
<configuration>
<additionalOptions>
<option>extension[] register-asciidoctor-kroki</option>
</additionalOptions>
</configuration>
</execution>
<execution>
<id>full</id>
<configuration>
<environmentVariables>
<ANTORA_CACHE_DIR>${basedir}/.cache/antora</ANTORA_CACHE_DIR>
</environmentVariables>
<additionalOptions>
<option>extension[] @antora/collector-extension</option>
<option>extension[] @antora/lunr-extension</option>
<option>extension[] jetty-downloads</option>
<option>extension[] register-asciidoctor-kroki</option>
<option>log-failure-level error</option>
<option>stacktrace</option>
</additionalOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
1 change: 1 addition & 0 deletions ui/.npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
fund=false
lockfile-version=3
22 changes: 22 additions & 0 deletions ui/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ The UI bundle produced from this project is designed to be used with Antora.
The bundle includes the HTML templates (layouts, partials, and helpers), CSS, JavaScript, fonts, and site-wide images.
The rest of the material for the site is provided by various content repositories.

== Usage

To bundle the UI with Maven, use:

$ mvn process-resources

On the first run, this command will also install Node.js and the project dependencies (npm packages).

If you want to run a specific Gulp task, use:

$ mvn process-resources -Dtask=preview

If no task is specified, the default task (bundle) is run.

To bypass the initialize step (after the first run) and run the Gulp task directly, use:

$ mvn frontend:npx@gulp -Dtask=preview

To print a list of available Gulp tasks, run:

$ mvn frontend:npx@gulp -Dtask=--tasks

== Copyright and License

=== Software
Expand Down
69 changes: 69 additions & 0 deletions ui/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-website-ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Jetty :: Project :: Website UI</name>
<description>UI for the Jetty website at jetty.org</description>
<url>https://jetty.org</url>
<inceptionYear>1995</inceptionYear>
<organization>
<name>Webtide</name>
<url>https://webtide.com</url>
</organization>
<licenses>
<license>
<name>Eclipse Public License - Version 2.0</name>
<url>https://www.eclipse.org/legal/epl-2.0/</url>
</license>
</licenses>
<properties>
<frontend.plugin.version>1.15.0</frontend.plugin.version>
<node.version>18.20.1</node.version>
<task/>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend.plugin.version}</version>
<configuration>
<installDirectory>${basedir}/../target</installDirectory>
<nodeVersion>v${node.version}</nodeVersion>
</configuration>
<executions>
<execution>
<id>install-node</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>initialize</phase>
</execution>
<execution>
<id>install-packages</id>
<goals>
<goal>npm</goal>
</goals>
<phase>initialize</phase>
<configuration>
<arguments>ci</arguments>
</configuration>
</execution>
<execution>
<id>gulp</id>
<goals>
<goal>npx</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<arguments>gulp --color ${task}</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 0335deb

Please sign in to comment.