Permalink
Browse files

Fix API links in reference section of the guide.

  • Loading branch information...
1 parent f6a7971 commit f430713dc3732ed5a1cad2e9182b2957494be097 @pledbrook pledbrook committed Feb 2, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 grails-docs/src/main/groovy/grails/doc/DocPublisher.groovy
@@ -301,6 +301,7 @@ class DocPublisher {
vars.path = pathToRoot
vars.resourcesPath = calculatePathToResources(pathToRoot)
+ // Generate the reference section of the guide.
for (f in files) {
if (f.directory && !f.name.startsWith(".")) {
def section = f.name
@@ -313,6 +314,7 @@ class DocPublisher {
def data = usageFile.text
context.set(DocEngine.SOURCE_FILE, usageFile)
context.set(DocEngine.CONTEXT_PATH, pathToRoot)
+ context.set(DocEngine.API_CONTEXT_PATH, vars.resourcesPath)
vars.content = engine.render(data, context)
new File("${refDocsDir}/ref/${section}/Usage.html").withWriter(encoding) {out ->
@@ -324,6 +326,7 @@ class DocPublisher {
def data = txt.text
context.set(DocEngine.SOURCE_FILE, txt.name)
context.set(DocEngine.CONTEXT_PATH, pathToRoot)
+ context.set(DocEngine.API_CONTEXT_PATH, vars.resourcesPath)
vars.content = engine.render(data, context)
new File("${refDocsDir}/ref/${section}/${name}.html").withWriter(encoding) {out ->

0 comments on commit f430713

Please sign in to comment.