You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2021/02/15 15:56:24 UTC
[camel-kamelets] 03/08: Add readme and fix links
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit c8fa1d1da20da40e3af1e6220eaa875b7bf76bcc
Author: nicolaferraro <ni...@gmail.com>
AuthorDate: Thu Feb 11 11:07:57 2021 +0100
Add readme and fix links
---
docs/README.md | 26 ++++++++++++++++++++++++++
docs/generator/generator.go | 3 ++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..797db6e
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,26 @@
+# Camelet Catalog Website
+
+This section contains the Kamelet catalog website, auto-generated from the source Kamelets.
+
+## Building
+
+To generate the adoc and svg files for the website (you need `go`):
+
+```
+# From the /docs directory
+go run ./generator/ ../ ./modules/ROOT/
+```
+
+To generate the website bundle UI (you need `yarn`):
+
+```
+# From the /docs directory
+yarn build-ui
+```
+
+To preview the website:
+
+```
+# From the /docs directory
+yarn preview
+```
diff --git a/docs/generator/generator.go b/docs/generator/generator.go
index 2d9367c..d963a66 100644
--- a/docs/generator/generator.go
+++ b/docs/generator/generator.go
@@ -279,7 +279,8 @@ func listKamelets(dir string) []camel.Kamelet {
handleGeneralError(fmt.Sprintf("cannot list dir %q", dir), err)
for _, fd := range files {
if !fd.IsDir() && strings.HasSuffix(fd.Name(), ".kamelet.yaml") {
- filesSorted = append(filesSorted, fd.Name())
+ fullName := filepath.Join(dir, fd.Name())
+ filesSorted = append(filesSorted, fullName)
}
}
sort.Strings(filesSorted)