This is an automated email from the ASF dual-hosted git repository.

klease pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new f0037faf93e CAMEL-20135: regenerate nav.adoc for the eips (#12122)
f0037faf93e is described below

commit f0037faf93ed921e2c376dddcab0c2eab2b5db46
Author: klease <38634989+kle...@users.noreply.github.com>
AuthorDate: Tue Nov 21 17:57:25 2023 +0100

    CAMEL-20135: regenerate nav.adoc for the eips (#12122)
---
 docs/eips-nav.adoc.template |  2 +-
 docs/gulpfile.js            | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/docs/eips-nav.adoc.template b/docs/eips-nav.adoc.template
index d77da125cc6..0ba5b6dd6a0 100644
--- a/docs/eips-nav.adoc.template
+++ b/docs/eips-nav.adoc.template
@@ -1,5 +1,5 @@
 <!-- generated:txt -->
 <!-- endinject -->
 * xref:eips:enterprise-integration-patterns.adoc[Enterprise Integration 
Patterns]
-<!-- eips:adoc -->
+<!-- inject:adoc -->
 <!-- endinject -->
diff --git a/docs/gulpfile.js b/docs/gulpfile.js
index d02838aa0ca..ab52192b005 100644
--- a/docs/gulpfile.js
+++ b/docs/gulpfile.js
@@ -188,6 +188,12 @@ const sources = {
     },
   },
   eips: {
+  asciidoc: {
+      source: '../components/{*,*/*}/src/main/docs/*-eip.adoc',
+      destination: 
'../core/camel-core-engine/src/main/docs/modules/eips/pages',
+      keep: ['*.adoc'],
+      isEip: true,
+    },
     json: {
       source: [
         
'../core/camel-core-model/src/generated/resources/org/apache/camel/model/**/*.json',
@@ -304,7 +310,7 @@ const tasks = Array.from(sourcesMap).flatMap(([type, 
definition]) => {
 
   // generates sorted & grouped nav.adoc file from a set of .adoc
   // files at the destination
-  const createNav = (destination) => {
+  const createNav = (destination, isEip) => {
     return gulp.src(`${type}-nav.adoc.template`)
       .pipe(insertGeneratedNotice())
       .pipe(
@@ -320,6 +326,8 @@ const tasks = Array.from(sourcesMap).flatMap(([type, 
definition]) => {
               const title = titleFrom(file)
               if (groupFrom(file) !== null) {
                 return `*** xref:${filepath}[${title}]`
+              } else if (isEip) {
+                return `** xref:eips:${filepath}[${title}]`
               }
               return `** xref:${filepath}[${title}]`
             },
@@ -405,7 +413,7 @@ const tasks = Array.from(sourcesMap).flatMap(([type, 
definition]) => {
       gulp.series(
         named(`clean:asciidoc:${type}`, clean, asciidoc.destination, 
asciidoc.keep),
         named(`symlink:asciidoc:${type}`, createSymlinks, asciidoc.source, 
asciidoc.destination),
-        named(`nav:asciidoc:${type}`, createNav, asciidoc.destination)
+        named(`nav:asciidoc:${type}`, createNav, asciidoc.destination, 
asciidoc.isEip)
       )
     )
   }

Reply via email to