Skip to content

Commit

Permalink
Fix for #831 (#1091)
Browse files Browse the repository at this point in the history
* Fix for #831: generateSite script checks now for trailing slashes
* Fixed behavior if contextPath not set
  • Loading branch information
bit-jkraushaar committed Mar 27, 2023
1 parent cc21314 commit ba69c25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project tries to adhere to https://semver.org/spec/v2.0.0.html[Semantic
=== fixes

* fix decision tree for `dtcw.ps1`
* #831 : fix for generateSite: images-hrefs not correct

=== added

Expand Down
4 changes: 3 additions & 1 deletion scripts/generateSite.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ jbake {
//println 'site.'+key-'config.microsite.' +" = "+ value
}

def micrositeContextPath = config.microsite.contextPath?:'/'

configuration['asciidoctor.attributes'] = [
"sourceDir=${targetDir}",
'source-highlighter=prettify@',
//'imagesDir=../images@',
"imagesoutDir=${targetDir}/microsite/output/images@",
"imagesDir=${config.microsite.contextPath}/images@",
"imagesDir=${micrositeContextPath.endsWith('/') ? micrositeContextPath : micrositeContextPath.concat('/')}images@",
"targetDir=${targetDir}",
"docDir=${docDir}",
"projectRootDir=${new File(docDir).canonicalPath}@",
Expand Down

0 comments on commit ba69c25

Please sign in to comment.