Skip to content
Permalink
Browse files
[JAMES-3226] Cloned antora-ui-default - we can change CSS sources
* Using gradle to drive the website build
  • Loading branch information
ieugen committed Jul 20, 2020
1 parent eda53ec commit c506251895476cab0814397579e6bbefc4d782f6
Showing 7 changed files with 2,687 additions and 122 deletions.
@@ -41,4 +41,31 @@ Even Gradle is downloaded and installed using the Gradle wrapper script.
./gradlew clean build
# The website is located here
cd doc-sites/build/site
----
----


== How to customize the theme for the documentaion

The documentation website is based on https://antora.org[Antora].
We have added https://gitlab.com/antora/antora-ui-default/[antora-ui-default] project as a git subtree under `antora-ui`.

`./gradlew :antora-ui:build` will assemble the `antora-ui/build/ui-bundle.zip` archive required for the website.
All the steps are automated as Gradle tasks in that project.
All you have to do is change the css and html files and then rebuild the project.

The antora-ui project has a preview mode: `/.gradlew gulpPreviewTheme`


[source,shell]
----
# antora-ui-default was added like this. You should be able to pull some changes from upstream
git subtree add --prefix antora-ui https://gitlab.com/antora/antora-ui-default.git master --squash
----


=== Related links

* https://medium.com/@v/git-subtrees-a-tutorial-6ff568381844[A git subtree tutorial].
* https://docs.antora.org/antora/2.3/playbook/configure-ui/[Antora UI keys]


@@ -0,0 +1,35 @@
plugins {
id 'base'
id 'maven-publish'
id 'com.github.node-gradle.node' version '2.2.4'
}

// gulp is using build directory so we use another
project.buildDir = 'build-gradle'

node {
// Version of node to use.
version = '12.18.2'
download = true
}

task gulpPreviewTheme(type: NpxTask) {
dependsOn npm_install
// https://gitlab.com/antora/antora-ui-default#user-content-preview-the-ui
command = 'gulp-cli@2.3.0'
args = [ 'preview']
}

task gulpBuildBundle(type: NpxTask) {
// https://gitlab.com/antora/antora-ui-default#user-content-package-for-use-with-antora
dependsOn npm_install
command = 'gulp-cli@2.3.0'
args = ["bundle"]

inputs.files('package.json', 'package-lock.json', '.gulp.json', 'gulpfile.js', 'index.js')
inputs.dir('src')
inputs.dir(fileTree("node_modules").exclude(".cache"))
outputs.files('build/ui-bundle.zip')
}

build.dependsOn 'gulpBuildBundle'
@@ -12,7 +12,7 @@ content:
# start_path: docs
ui:
bundle:
url: ./../ui-bundle/build/distributions/ui-bundle.zip
start_path: ui-bundle
url: ./../antora-ui/build/ui-bundle.zip
# start_path: ui-bundle
runtime:
fetch: true
@@ -7,10 +7,6 @@ configurations {
antora
}

dependencies {
antora(project(path: ':ui-bundle', configuration: 'uiBundle'))
}

node {
// Version of node to use.
version = '12.18.2'
@@ -21,14 +17,14 @@ def siteOutputDir = "${buildDir}/site";

task generateDocs(type: NpxTask) {
dependsOn npmInstall
dependsOn ':ui-bundle:build'
dependsOn ':antora-ui:build'

inputs.files('package.json', 'package-lock.json', 'antora-playbook.yml')
inputs.dir(fileTree('node_modules').exclude('.cache'))
outputs.dir(siteOutputDir)

command = 'antora'
args = ['antora-playbook.yml' ]
args = ['antora-playbook.yml', '--stacktrace']
}

task copySomeFiles(type: Copy) {

0 comments on commit c506251

Please sign in to comment.