From 627d529c4937b8e36d3f25cf28812b0ed6eeaaeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Launay?= Date: Fri, 4 Feb 2011 16:02:20 +0100 Subject: [PATCH] GRAILS-7231 Internal documentation engine produces broken links in index.html and grails doc -pdf does not work anymore - fix broken links in generated index.html - fix path for PDF generation --- scripts/_GrailsDocs.groovy | 6 +++--- src/java/grails/doc/PdfBuilder.groovy | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/_GrailsDocs.groovy b/scripts/_GrailsDocs.groovy index 14767671c28..a725c7e5fb7 100644 --- a/scripts/_GrailsDocs.groovy +++ b/scripts/_GrailsDocs.groovy @@ -271,12 +271,12 @@ target(createIndex: "Produces an index.html page in the root directory") { """ if (createdManual) { - writer.write '\t\tManual (Frames)
\n' - writer.write '\t\tManual (Single)
\n' + writer.write '\t\tManual (Frames)
\n' + writer.write '\t\tManual (Single)
\n' } if (createdPdf) { - writer.write '\t\tManual (PDF)
\n' + writer.write '\t\tManual (PDF)
\n' } writer.write """\ diff --git a/src/java/grails/doc/PdfBuilder.groovy b/src/java/grails/doc/PdfBuilder.groovy index ce78dfba167..db028b9a6a3 100644 --- a/src/java/grails/doc/PdfBuilder.groovy +++ b/src/java/grails/doc/PdfBuilder.groovy @@ -32,9 +32,9 @@ class PdfBuilder { /** * Builds a PDF file from the manual's single.html file.

* The following directories are assumed to exist:

* @@ -49,12 +49,12 @@ class PdfBuilder { String home = options.home String tool = options.tool ?: 'grails' - File htmlFile = new File("${baseDir}/manual/guide/single.html") - File outputFile = new File("${baseDir}/manual/guide/single.pdf") + File htmlFile = new File("${baseDir}/guide/single.html") + File outputFile = new File("${baseDir}/guide/single.pdf") File homeFile = new File(home).canonicalFile String urlBase = "file://${homeFile.absolutePath}/src/${tool}/docs/style" - String xml = createXml(htmlFile, "${baseDir}/manual") + String xml = createXml(htmlFile, "${baseDir}") createPdf xml, outputFile, urlBase }