Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,36 @@
</plugins>
</build>
</profile>
<profile>
<id>doc-dev</id>
<!--
Fast local build of the documentation: only the current checkout is rendered (no released tags, no network
needed to fetch them), using src/main/antora/site-dev.yml instead of site.yml.
mvn install -pl documentation -Pdoc-dev
The default build (no profile) renders the current checkout AND the released versions (tags).
-->
<properties>
<antora.dev.site.mode>dev</antora.dev.site.mode>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>npm-build</id>
<phase>none</phase>
</execution>
<execution>
<id>npm-dev</id>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@ There are two ways to suggest modifications or new content. Both of the options

* Fork the https://github.com/talend/component-runtime[Runtime] repository of the *Talend Component Kit* project and edit .adoc files located under `documentation\src\main\antora\modules\ROOT\pages`. Make sure to follow the guidelines outlined in the current document, especially for large modifications or new content, to make sure it can properly be rendered. When done, create a pull request that will be assessed by the team in charge of the project.

== Building the documentation locally

The documentation is built by the `documentation` Maven module. Both modes below render the current state of the branch you have checked out, including uncommitted changes and the pages generated from the source code.

* Full site, with the released versions of the version dropdown (the released versions are fetched from GitHub, so the network is required):
+
[source,bash]
----
mvn clean install -pl documentation
----
* Fast build of the current version only, without the released versions:
+
[source,bash]
----
mvn clean install -pl documentation -Pdoc-dev
----

If the other modules of the repository are not installed in your local Maven repository yet, add `-am` to the command. The site is generated in `documentation/target/documentation-<version>`.

== General organization guidelines

The documentation is made of:
Expand Down
4 changes: 2 additions & 2 deletions documentation/src/main/antora/site-dev-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ urls:
redirect_facility: static
content:
sources:
# current checkout, read from the worktree (uncommitted changes and freshly generated partials included)
- url: ../../../..
branches:
- master
branches: HEAD
start_path: documentation/src/main/antora
ui:
bundle:
Expand Down
12 changes: 12 additions & 0 deletions documentation/src/main/antora/site-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@ urls:
redirect_facility: static
content:
sources:
# Current state of this checkout (the version being built). The url is a local path and the branch is the one
# currently checked out, so Antora reads the worktree: uncommitted changes and the partials freshly written by
# the Generator are rendered. In CI this is the exact commit that is being built.
- url: ../../../..
branches: HEAD
start_path: documentation/src/main/antora
# Already released versions: frozen snapshots read from the tags of the remote repository.
# branches: ~ disables Antora's default branches (HEAD, v*), otherwise the remote default branch would be rendered a
# second time as the current version. worktrees: false so that this source never contributes a worktree either,
# even if the url is changed to a local clone.
- url: https://github.com/Talend/component-runtime.git
branches: ~
worktrees: false
tags:
# we will keep only latest revision, past revisions will still be present. May speed a bit antora process...
- component-runtime-*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{{#if page.component}}
<div class="btn-group navbar-versions">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{#if page.component}}{{page.version}}{{~#if (eq page.origin.branch 'master')}} (dev){{/if}}{{else}}Versions{{/if}}
{{#if page.component}}{{page.version}}{{~#if (eq page.componentVersion page.component.latest)}} (dev){{/if}}{{else}}Versions{{/if}}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
Expand Down
Loading