This is an automated email from the ASF dual-hosted git repository. paulk pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/groovy-website.git
The following commit(s) were added to refs/heads/asf-site by this push: new 912a100 glitches in asciidoc tweaks 912a100 is described below commit 912a1004e52d1011e1a39df5f018dbe68c7575fa Author: Paul King <pa...@asert.com.au> AuthorDate: Tue May 27 17:33:08 2025 +1000 glitches in asciidoc tweaks --- .../src/main/groovy/generator/SiteGenerator.groovy | 2 +- site/src/site/pages/wiki.groovy | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/generator/src/main/groovy/generator/SiteGenerator.groovy b/generator/src/main/groovy/generator/SiteGenerator.groovy index d27b038..49b992a 100644 --- a/generator/src/main/groovy/generator/SiteGenerator.groovy +++ b/generator/src/main/groovy/generator/SiteGenerator.groovy @@ -228,7 +228,7 @@ class SiteGenerator { p = p.parentFile } String baseDir = relativePath ? "wiki${File.separator}${relativePath.join(File.separator)}" : 'wiki' - render 'wiki', bn, [notes: f.getText('utf-8'), header: doc], baseDir + render 'wiki', bn, [notes: f.getText('utf-8'), doc: doc], baseDir if (f.name.startsWith('GEP-')) { gepList[bn] = doc.structuredDoctitle.subtitle } diff --git a/site/src/site/pages/wiki.groovy b/site/src/site/pages/wiki.groovy index 8a0e6e1..ad62e6e 100644 --- a/site/src/site/pages/wiki.groovy +++ b/site/src/site/pages/wiki.groovy @@ -1,13 +1,7 @@ import generator.DocUtils import org.asciidoctor.ast.DocumentHeader -modelTypes = { - DocumentHeader header - String title - String notes -} - -title = header.documentTitle.main +title = doc.structuredDoctitle.main layout 'layouts/main.groovy', true, pageTitle: "The Apache Groovy programming language - Developer docs - $title", @@ -44,20 +38,20 @@ layout 'layouts/main.groovy', true, div(class: 'col-lg-8 col-lg-pull-0') { a(name:"doc"){} h1(title) - if (header.author) { + def authors = doc.authors*.fullName + if (authors.size() == 1) { p { yield 'Author: ' - i(header.author.fullName) + i(authors[0]) } - } else if (header.authors) { + } else if (authors) { p { yield 'Authors: ' - i(header.authors*.fullName.join(', ')) + i(authors.join(', ')) } - } - if (header.revisionInfo?.date) { - p("Last update: ${header.revisionInfo.date} (${header.revisionInfo.remark?:'no comment'})") + if (doc.attributes.revisionInfo?.date) { + p("Last update: ${doc.attributes.revisionInfo.date} (${doc.attributes.revisionInfo.remark?:'no comment'})") } hr() yieldUnescaped notesAsHTML