Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= jbang-gradle-plugin
= JBang Gradle Plugin
:linkattrs:
:project-owner: jbangdev
:project-name: jbang-gradle-plugin
Expand Down
13 changes: 13 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: jbang-gradle-plugin
title: JBang Gradle Plugin
version: latest
nav:
- modules/ROOT/nav.adoc
ext:
collector:
- run: jbang docs/readme2index.java
- scan:
dir: build/content/pages
files: index.adoc
into: modules/ROOT/pages

1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include::partial$nav.adoc[]
1 change: 1 addition & 0 deletions docs/modules/ROOT/partials/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* xref:jbang-gradle-plugin:ROOT:index.adoc[]
18 changes: 18 additions & 0 deletions docs/readme2index.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
///usr/bin/env jbang "$0" "$@" ; exit $?

import static java.nio.file.Files.copy;
import static java.nio.file.Files.createDirectories;
import java.nio.file.StandardCopyOption;
import java.nio.file.Paths;

import static java.lang.System.*;

public class readme2index {

public static void main(String... args) throws Exception {
var target = Paths.get("build/content/pages/index.adoc");
createDirectories(target.getParent());
copy(Paths.get("README.adoc"),target,StandardCopyOption.REPLACE_EXISTING);
out.println("README.adoc copied to " + target);
}
}