This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-site.git
The following commit(s) were added to refs/heads/main by this push:
new 923bd7e NIFI-10600 Added links to Stateless Kafka Connector Binary in
Downloads
923bd7e is described below
commit 923bd7ee7d84ed5a2aad251a8de9822189a966a9
Author: exceptionfactory <[email protected]>
AuthorDate: Thu Oct 6 14:08:31 2022 -0500
NIFI-10600 Added links to Stateless Kafka Connector Binary in Downloads
This closes #68
Signed-off-by: David Handermann <[email protected]>
---
config.toml | 1 +
layouts/shortcodes/maven-download-links.html | 29 ++++++++++++++++++++++++++++
source/download.md | 2 ++
3 files changed, 32 insertions(+)
diff --git a/config.toml b/config.toml
index 0601ca0..4c43b8d 100644
--- a/config.toml
+++ b/config.toml
@@ -45,6 +45,7 @@ productionHost = "nifi.apache.org"
dynamicDownloadPathUrl = "https://www.apache.org/dyn/closer.lua?path=/nifi"
downloadPathUrl = "https://downloads.apache.org/nifi"
archiveDownloadPathUrl = "https://archive.apache.org/dist/nifi"
+mavenCentralDownloadPathUrl = "https://repo1.maven.org/maven2/org/apache/nifi"
currentProjectVersion = "1.17.0"
currentProjectVersionReleased = "2022-08-01"
diff --git a/layouts/shortcodes/maven-download-links.html
b/layouts/shortcodes/maven-download-links.html
new file mode 100644
index 0000000..99dd920
--- /dev/null
+++ b/layouts/shortcodes/maven-download-links.html
@@ -0,0 +1,29 @@
+{{- $downloadVersion := (.Site.Params.currentProjectVersion) -}}
+{{- $primaryDownloadUrl := (.Site.Params.mavenCentralDownloadPathUrl) -}}
+
+{{- if eq (.Get "version") "previous" -}}
+ {{- $downloadVersion = (.Site.Params.previousProjectVersion) -}}
+{{- end -}}
+
+{{- $project := "nifi" -}}
+{{- with .Get "project" -}}
+ {{- $project = . -}}
+{{- end -}}
+
+{{- $qualifier := "" -}}
+{{- with .Get "qualifier" -}}
+ {{- $qualifier = . -}}
+{{- end -}}
+
+{{- $extension := "" -}}
+{{- with .Get "extension" -}}
+ {{- $extension = . -}}
+{{- end -}}
+
+{{- $module := (print $project "-" $qualifier) -}}
+
+{{- $downloadFilePath := (print $module "/" $downloadVersion "/" $module "-"
$downloadVersion "." $extension) -}}
+
+<a href="{{ $primaryDownloadUrl }}/{{ $downloadFilePath }}">{{ .Get "label" }}
{{ $downloadVersion }}</a>
+[<a href="{{ $primaryDownloadUrl }}/{{ $downloadFilePath }}.asc">OpenPGP</a>]
+[<a href="{{ $primaryDownloadUrl }}/{{ $downloadFilePath }}.sha1">SHA-1</a>]
diff --git a/source/download.md b/source/download.md
index 5f7bb12..06ab1df 100644
--- a/source/download.md
+++ b/source/download.md
@@ -25,6 +25,7 @@ Please avoid repeated downloads from archives to avoid
infrastructure rate limit
- Binaries
- {{< download-links label="Apache NiFi Binary" extension=bin.zip >}}
- {{< download-links label="Apache NiFi Stateless Binary"
qualifier="stateless" extension=bin.zip >}}
+ - {{< maven-download-links label="Apache NiFi Stateless Kafka Connector
Binary" qualifier="kafka-connector-assembly" extension=zip >}}
- {{< download-links label="Apache NiFi Toolkit Binary" qualifier="toolkit"
extension=bin.zip >}}
### {{< param previousProjectVersion >}}
@@ -37,6 +38,7 @@ Please avoid repeated downloads from archives to avoid
infrastructure rate limit
- Binaries
- {{< download-links label="Apache NiFi Binary" extension=bin.zip
version=previous >}}
- {{< download-links label="Apache NiFi Stateless Binary"
qualifier="stateless" extension=bin.tar.gz version=previous >}}
+ - {{< maven-download-links label="Apache NiFi Stateless Kafka Connector
Binary" qualifier="kafka-connector-assembly" extension=tar.gz version=previous
>}}
- {{< download-links label="Apache NiFi Toolkit Binary" qualifier="toolkit"
extension=bin.zip version=previous >}}
## Images