(https://github.com/apache/camel-website/issues/666)

Preview at https://pr-667--camel.netlify.app 
<https://pr-667--camel.netlify.app/>

Using an observation and some initial code from Rob Winch I’ve developed an 
Antora extension that can scan for files not in the expected Antora structure 
and map them to Antora-appropriate locations.  This can replace copying and 
symlinking files.  Right now it can’t replace all the symlinking in main camel 
since that has a step of scanning .adocs for included example java code and 
then symlinking the used files.  I think it’s practical to have the Antora 
extension do that too, but not yet.

The PR for this issue applies this to camel-spring-boot and 
camel-kafka-connector.

I’ve also enhanced the indexer used extensively for generating tables of 
components to act as an Antora extension and add a template instance page for 
each query result found.  This lets us directly generate .adoc pages from .json 
files without needing a pre-existing .adoc page for each .json file.  I think 
there are quite a few subprojects that have per-component documentation that is 
completely generated: to start with I’ve used camel-kafka-connector as an 
example.

Further work in this PR set:

Whatever is generating the json files for camel-kafka-connector is duplicating 
information.  Properties with enumerated values have the values both as json 
elements and text in the description.  For consistency across the site, I’m 
displaying the descriptions using uniform code that shows the json element 
values as a list, resulting in duplication, for instance 
https://pr-667--camel.netlify.app/camel-kafka-connector/next/reference/connectors/camel-activemq-kafka-sink-connector.html#_connector_option_camel_sink_path_destinationType.
  I’d like to remove the hardcoded text rendering from the description.

I discovered a bug in how one of the asciidoctor extensions is adding header 
attributes and put in a quick workaround: this can be fixed properly with a new 
release of the extensions: the html is the same either way.

If this approach seems like a good idea, after merging these I can work on 
other subprojects.  There are some such as kamelets where this approach can be 
used simply and directly, and some, such as camel-quarkus, where I think it 
will work but may be more complicated.

Take a look!

David Jencks

Reply via email to