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

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


The following commit(s) were added to refs/heads/main by this push:
     new 984413bc Add docs skeleton ready to be populated with more details
984413bc is described below

commit 984413bc81a45f11bd14f5bf252e7f3df4441878
Author: JB Onofré <[email protected]>
AuthorDate: Fri May 3 18:57:05 2024 +0200

    Add docs skeleton ready to be populated with more details
---
 docs/README_local_build.adoc                  | 22 ++++++++
 docs/antora.yml                               | 28 ++++++++++
 docs/local-build.sh                           | 24 ++++++++
 docs/modules/ROOT/examples/js/karaf.js        | 79 +++++++++++++++++++++++++++
 docs/modules/ROOT/nav.adoc                    |  1 +
 docs/modules/ROOT/pages/components.adoc       |  7 +++
 docs/modules/ROOT/pages/index.adoc            | 65 ++++++++++++++++++++++
 docs/modules/ROOT/partials/summary-table.adoc |  7 +++
 docs/source-map.yml                           | 25 +++++++++
 docs/source-watch.yml                         | 21 +++++++
 10 files changed, 279 insertions(+)

diff --git a/docs/README_local_build.adoc b/docs/README_local_build.adoc
new file mode 100644
index 00000000..1d2b8dae
--- /dev/null
+++ b/docs/README_local_build.adoc
@@ -0,0 +1,22 @@
+= Local/partial build of docs
+
+See https://camel.apache.org/manual/improving-the-documentation.html for 
initial setup instructions and more details.
+
+After initial setup, there are three local build options:
+
+== Quick: `./local-build.sh quick`
+
+This will build this project only.
+Links out of this component will go to the published Camel website, and there 
will be no links back.
+This is primarily intended to check for errors.
+
+== Full: `./local-build.sh full`
+
+This will build the full site locally, with your changes in this project.
+Running this (at least) once is a prerequisite for the partial build.
+This should show the site exactly as it would be should your changes be merged.
+
+== Partial: `./local-build.sh`
+
+This will build this project only, replacing this component in the locally 
built "full" build, and start a local server to view with, rebuild the project 
when file changes are detected, and sync your browser with the rebuilt site.
+This is intended for documentation development.
diff --git a/docs/antora.yml b/docs/antora.yml
new file mode 100644
index 00000000..5d2926ff
--- /dev/null
+++ b/docs/antora.yml
@@ -0,0 +1,28 @@
+#
+# 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.
+#
+
+name: camel-karaf
+title: Camel Karaf
+version: 4.5.x
+display_version: 4.5.x
+nav:
+- modules/ROOT/nav.adoc
+
+asciidoc:
+  attributes:
+    requires: "'util=camel-website-util,karaf=xref:js/karaf.js'"
+
diff --git a/docs/local-build.sh b/docs/local-build.sh
new file mode 100755
index 00000000..0db0fcc1
--- /dev/null
+++ b/docs/local-build.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+#
+# 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.
+#
+
+CW=./../../camel-website
+LOCAL=./../camel-karaf
+
+cd $CW || (echo 'camel-website not in expected location $CW' && exit)
+./antora-local-build.sh $LOCAL $*
diff --git a/docs/modules/ROOT/examples/js/karaf.js 
b/docs/modules/ROOT/examples/js/karaf.js
new file mode 100644
index 00000000..91d3be4d
--- /dev/null
+++ b/docs/modules/ROOT/examples/js/karaf.js
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+const KARAF_GROUPID = 'org.apache.camel.karaf'
+
+module.exports = {
+  v: function (name, kind, $) {
+    return $[kind][name]
+  },
+
+  extensionRef: function (version, module, kind, $) {
+    const thing = $[kind]
+    const name = thing.name.startsWith('bindy') ? 'bindy' : thing.name
+    const pageName = kind === 'other' ? name : `${name}-${kind}`
+    if (thing.groupId === KARAF_GROUPID) {
+      return `xref:${pageName}.adoc[${thing.title}]`
+    }
+    return 
`xref:${version}@components:${module}:${pageName}.adoc[${thing.title}]`
+  },
+
+  deprecatedFilterComponent: function (items) {
+    return deprecatedFilter(items, 'component')
+  },
+
+  sortComponent: function (items) {
+    return sort(items, 'component')
+  },
+
+  deprecatedFilterDataformat: function (items) {
+    return deprecatedFilter(items, 'dataformat')
+  },
+
+  sortDataformat: function (items) {
+    return sort(items, 'dataformat')
+  },
+
+  deprecatedFilterLanguage: function (items) {
+    return deprecatedFilter(items, 'language')
+  },
+
+  sortLanguage: function (items) {
+    return sort(items, 'language')
+  },
+
+  deprecatedFilterMiscellaneous: function (items) {
+    return deprecatedFilter(items, 'other')
+  },
+
+  sortMiscellaneous: function (items) {
+    return sort(items, 'other')
+  },
+}
+
+function deprecatedFilter (items, kind) {
+  return items.filter((item) => item.$[kind].deprecated === true)
+}
+
+function sort (items, kind) {
+  return items.sort((f1, f2) => {
+      const t1 = f1.$[kind].title.toLowerCase()
+      const t2 = f2.$[kind].title.toLowerCase()
+      return t1 < t2 ? -1 : t1 > t2 ? 1 : 0
+    }
+  )
+}
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
new file mode 100644
index 00000000..07e97620
--- /dev/null
+++ b/docs/modules/ROOT/nav.adoc
@@ -0,0 +1 @@
+* xref:components.adoc[Supported components]
diff --git a/docs/modules/ROOT/pages/components.adoc 
b/docs/modules/ROOT/pages/components.adoc
new file mode 100644
index 00000000..c6df7ecf
--- /dev/null
+++ b/docs/modules/ROOT/pages/components.adoc
@@ -0,0 +1,7 @@
+= Apache Camel Karaf features
+
+Apache Camel Karaf supports the following Camel artifacts as Karaf features
+
+You can find the list of features directly in the repository: 
https://github.com/apache/camel-karaf/blob/main/features/src/main/feature/camel-features.xml
+
+include::partial$summary-table.adoc[]
diff --git a/docs/modules/ROOT/pages/index.adoc 
b/docs/modules/ROOT/pages/index.adoc
new file mode 100644
index 00000000..9453275b
--- /dev/null
+++ b/docs/modules/ROOT/pages/index.adoc
@@ -0,0 +1,65 @@
+= Support for Apache Karaf
+
+Apache Camel Karaf is for running Camel in the
+http://karaf.apache.org[Apache Karaf] OSGi container.
+
+It includes:
+
+* Camel features repository allowing to install Camel in Karaf.
+* Camel Karaf commands allowing you to view, start, stop, get info, about the
+Camel contexts and routes running in the Karaf instance.
+
+NB: Camel Karaf 4.x needs at least Apache Karaf 4.4.6 to run.
+
+== Install Camel in Karaf
+
+Assuming that you have a running Karaf instance, you can register the
+Camel features repository:
+
+[source,sh]
+----
+karaf@root> feature:repo-add camel 4.5.0
+----
+
+where 4.5.0 is the Camel version
+
+Now, we have all Camel features available:
+
+To install Camel, just install the `camel` feature:
+
+[source,sh]
+----
+karaf@root> feature:install camel
+----
+
+You have to install the Camel features depending of your requirements.
+
+If, in your route, you use an endpoint like `stream:out`, you have to
+install the `camel-stream` feature:
+
+[source,sh]
+----
+karaf@root> feature:install camel-stream
+----
+
+And so on, for example if you use the sql, and http components:
+
+[source,sh]
+----
+karaf@root> feature:install camel-sql camel-http
+----
+
+== Camel Karaf commands
+
+When you install the camel feature, new Camel Karaf commands become available
+automatically.
+
+For example to list all running Camel contexts:
+[source,sh]
+----
+karaf@root> camel:context-list
+----
+
+You can see all the Camel commands by typing `camel:` and then pressing TAB 
key.
+
+TIP: use kbd:[TAB] key for completion on the Camel context name.
diff --git a/docs/modules/ROOT/partials/summary-table.adoc 
b/docs/modules/ROOT/partials/summary-table.adoc
new file mode 100644
index 00000000..22b49e14
--- /dev/null
+++ b/docs/modules/ROOT/partials/summary-table.adoc
@@ -0,0 +1,7 @@
+There are indexCount:[relative="{indexer-rel-filter}",family="example"] 
{indexer-human-readable-kind-plural} in 
indexUniqueCount:[relative="{indexer-rel-filter}",family="example",format="$.{indexer-kind}.artifactId",contentAs=json]
 features 
(indexCount:[relative="{indexer-rel-filter}",family="example",transform=karaf.deprecatedFilter{indexer-human-readable-kind},contentAs=json,requires={requires}]
 deprecated)
+
+[width="100%",cols="3,3,1,5",options="header"]
+|===
+| {indexer-human-readable-kind} | Feature | Since | Description
+|===
+indexTable::[relative="{indexer-rel-filter}",family="example",cellformats="karaf.extensionRef('{page-component-version}','{indexer-module}','{indexer-kind}',$)|karaf.v('artifactId','{indexer-kind}',
 $)|karaf.v('firstVersion','{indexer-kind}', 
$)|util.description($.{indexer-kind})",contentAs=json,transform=karaf.sort{indexer-human-readable-kind},requires={requires}]
diff --git a/docs/source-map.yml b/docs/source-map.yml
new file mode 100644
index 00000000..6b799b6e
--- /dev/null
+++ b/docs/source-map.yml
@@ -0,0 +1,25 @@
+#
+# 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.
+#
+
+    - require: '@djencks/antora-source-map'
+#      log_level: trace
+      source-map:
+        - url: 'https://github.com/apache/camel-karaf.git'
+          mapped-url: './../camel-karaf'
+          branches:
+            - branch: main
+              mapped-branch: HEAD
diff --git a/docs/source-watch.yml b/docs/source-watch.yml
new file mode 100644
index 00000000..9927da3c
--- /dev/null
+++ b/docs/source-watch.yml
@@ -0,0 +1,21 @@
+#
+# 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.
+#
+
+    - require: '@djencks/antora-source-watch'
+#      log_level: trace
+      sources:
+        - url: ./../camel-karaf

Reply via email to