From 75d792cab0c56d2a2567389517764a2b4b0111f3 Mon Sep 17 00:00:00 2001 From: Thomas Diesler Date: Tue, 14 May 2024 10:01:56 +0200 Subject: [PATCH] (#5489) Docs index - how it works --- docs/local-build.sh | 3 ++- docs/modules/ROOT/pages/index.adoc | 27 +++++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/docs/local-build.sh b/docs/local-build.sh index 6e0b63f892..471f366c1a 100755 --- a/docs/local-build.sh +++ b/docs/local-build.sh @@ -17,7 +17,8 @@ # limitations under the License. # -CW=./../../camel-website +SCRIPT_DIR=$(dirname $0) +CW=${SCRIPT_DIR}/../../camel-website LOCAL=./../camel-k cd $CW || (echo 'camel-website not in expected location $CW' && exit) diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index 4b13a02455..5608941b7b 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -24,19 +24,26 @@ Users of Camel K can instantly run integration code written in Camel DSL on thei [[how-it-works]] == How It Works -Just write a _helloworld.groovy_ integration file with the following content: - -```groovy -from('timer:tick?period=3000') - .setBody().constant('Hello world from Camel K') - .to('log:info') -``` +Just write a _helloworld.yaml_ integration file with the following content: + +[source,yaml] +---- +- from: + uri: "timer:tick" + parameters: + period: "3000" + steps: + - setBody: + simple: "Hello world from Camel K" + - to: "log:info" +---- You can then execute the following command: -``` -kamel run helloworld.groovy -``` +[source] +---- +kamel run helloworld.yaml +---- The integration code immediately runs in the cloud. **Nothing else** is needed.