Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Generate kamelets pages using Antora (main) #630

Merged
merged 7 commits into from
Dec 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ go run . ../../kamelets/ ../../docs/modules/ROOT/
and validate:
```bash
$ cd script/validator
$ go run go run . ../../kamelets/
$ go run . ../../kamelets/
```
be sure that there aren't reported ERRORS.

Expand Down
14 changes: 0 additions & 14 deletions docs/README.md

This file was deleted.

31 changes: 31 additions & 0 deletions docs/README_local_build.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
= Local/partial build of docs

This should be explained soon at https://camel.apache.org/manual/improving-the-documentation.html.

* (once, or occasionally)
. In `../..` (next to this project's clone) run
[source,sh]
----
git clone https://github.com/apache/camel-website.git
----
. In `../../camel-website/antora-ui-camel` run
[source,sh]
----
yarn build
----
. In this directory run
[source,sh]
----
./local-build.sh full
----
This will build the full Antora site on your machine in the camel-website project under /documentation, with any local changes you have made in this project.
It will also do a full xref check for the entire site.
* Thereafter
. In this directory run
[source,sh]
----
./local-build.sh
----

This will build just this project, with local changes, into the full build from the previous step.
It will start a local webserver for the build site, rebuild when changes are detected, and sync your browser to the changes.
16 changes: 0 additions & 16 deletions docs/antora-playbook.yml

This file was deleted.

5 changes: 4 additions & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ display-version: Next (Pre-release)
nav:
- modules/ROOT/nav.adoc

# Update to appropriate released camel-k version on release
asciidoc:
attributes:
requires: "'util=camel-website-util,kamelets=xref:js/kamelets.js'"
# Update to appropriate released camel-k version on release
camel-k-version: next
jsonpath-trace: true
jsonpath-debug: true
33 changes: 33 additions & 0 deletions docs/indexPages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
indexPages:
- query:
module: ROOT
family: example
relative: yaml/*
requires: 'kamelets=xref:js/kamelets.js'
content-as: json
template-id:
family: example
relative: template/kamelet-options.adoc
extract:
- path: 'src.relative'
match: 'yaml/(?<basename>*).kamelet.yaml'
target:
match: 'yaml/(?<basename>*).kamelet.yaml'
format: '`${basename}.adoc`'

- query:
module: ROOT
family: example
relative: yaml/*
requires: 'kamelets=xref:js/kamelets.js'
content-as: json
template-id:
family: example
relative: template/kamelet-icon.svg
extract:
- path: 'src.relative'
match: 'yaml/(?<basename>*).kamelet.yaml'
target:
family: image
match: 'yaml/(?<basename>*).kamelet.yaml'
format: '`kamelets/${basename}.svg`'
37 changes: 37 additions & 0 deletions docs/local-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/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-kamelets

cd $CW || (echo 'camel-website not in expected location $CW' && exit)
cp antora-playbook.yml local-antora-playbook-full.yml
cat $LOCAL/docs/source-map.yml >> local-antora-playbook-full.yml
cat playbook-patch-full.yml >> local-antora-playbook-full.yml

cp antora-playbook.yml local-antora-playbook-partial.yml
cat $LOCAL/docs/source-map.yml >> local-antora-playbook-partial.yml
cat $LOCAL/docs/source-watch.yml >> local-antora-playbook-partial.yml

if [ "$1" = "full" ] || [ "$1" = "1" ]
then
yarn build:antora-local-full
else
yarn build:antora-local-partial
fi

This file was deleted.

59 changes: 0 additions & 59 deletions docs/modules/ROOT/assets/images/kamelets/avro-serialize-action.svg

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion docs/modules/ROOT/assets/images/kamelets/aws-ec2-sink.svg

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.