You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2019/10/04 09:25:28 UTC

[lucene-solr] 07/07: jekyll-based site generation. Link verification doesn't pass.

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch jira/SOLR-13452_gradle_7_refguide
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 96006721c9fadd895eba264ce154eec41dae4ea8
Author: Dawid Weiss <dw...@apache.org>
AuthorDate: Fri Oct 4 11:21:42 2019 +0200

    jekyll-based site generation. Link verification doesn't pass.
---
 solr/solr-ref-guide/build.gradle | 42 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/solr/solr-ref-guide/build.gradle b/solr/solr-ref-guide/build.gradle
index 27e9a87..4981fa0 100644
--- a/solr/solr-ref-guide/build.gradle
+++ b/solr/solr-ref-guide/build.gradle
@@ -36,8 +36,8 @@
 
 import java.time.*
 import java.time.format.*
-import org.asciidoctor.*
 import java.nio.file.*
+import org.asciidoctor.*
 
 buildscript {
     repositories {
@@ -52,6 +52,7 @@ buildscript {
 
 plugins {
     id 'java'
+    id 'com.github.jruby-gradle.base' version '1.6.0'
 }
 
 configurations {
@@ -84,6 +85,17 @@ dependencies {
     depVer('org.apache.tika:tika-core')
     depVer('org.apache.velocity.tools:velocity-tools-generic')
     depVer('org.apache.zookeeper:zookeeper')
+
+    // jekyll dependencies
+    jrubyExec 'rubygems:jekyll:3.5.2'
+    jrubyExec 'rubygems:jekyll-asciidoc:2.1.1'
+    jrubyExec 'rubygems:pygments.rb:1.1.2'
+
+    // don't know why we have to explicitly add these deps but it doesn't resolve them
+    // automatically.
+    jrubyExec 'rubygems:tilt:2.0.10'
+    jrubyExec 'rubygems:slim:4.0.1'
+    jrubyExec 'rubygems:concurrent-ruby:1.0.5'
 }
 
 sourceSets {
@@ -367,3 +379,31 @@ task buildPdf(type: JavaExec) {
             pdfFilename
     ])
 }
+
+task buildSiteJekyll(type: com.github.jrubygradle.JRubyExec) {
+    dependsOn buildNavDataFiles
+
+    inputs.dir buildContentDir
+    outputs.dir file("${buildDir}/html-site")
+
+    script 'jekyll'
+    scriptArgs 'build', '--verbose'
+    workingDir buildContentDir
+}
+
+task buildSite(type: JavaExec) {
+    dependsOn buildSiteJekyll
+    description "Builds an HTML Site w/Jekyll and verifies the anchors+links are valid"
+
+    classpath = sourceSets.tools.runtimeClasspath
+    main = 'CheckLinksAndAnchors'
+    workingDir = buildContentDir
+
+    args([
+            file("${buildDir}/html-site"),
+    ])
+
+    if (project.hasProperty("local.javadocs")) {
+        args += "-check-all-relative-links"
+    }
+}