diff --git a/doc/issues/0008fn5.rst b/doc/issues/0008fn5.rst
new file mode 100644
index 0000000..0f16172
--- /dev/null
+++ b/doc/issues/0008fn5.rst
@@ -0,0 +1,12 @@
+Automatically create document `org` directives.
+===============================================
+
+The author should not have to create an `org` directive at the top of every file.
+This should be done for him during parsing. Ideally the system would be smart enough
+to notice if he has defined an `org` at the top of a file and use that if he has.
+
+----
+
+======== ===================
+Created: 2012-01-04T17:12:59
+======== ===================
diff --git a/doc/issues/0009fn5.rst b/doc/issues/0009fn5.rst
new file mode 100644
index 0000000..60c3ec0
--- /dev/null
+++ b/doc/issues/0009fn5.rst
@@ -0,0 +1,12 @@
+Add a `title` directive for titling documents.
+==============================================
+
+Return to defaulting a title for each document. Instead of the internal document id use
+something more reasonable, like the filename without the path and without the extension.
+A new attribute `title` could allow the author to override this value.
+
+----
+
+======== ===================
+Created: 2012-01-04T17:14:26
+======== ===================
diff --git a/project.properties b/project.properties
index b415bc3..329670f 100644
--- a/project.properties
+++ b/project.properties
@@ -1,7 +1,7 @@
-#Tue, 03 Jan 2012 14:03:49 -0600
+#Wed, 04 Jan 2012 18:05:01 -0600
name=jlp
-version=1.4a
-build.number=18
+version=1.4
+build.number=11
lib.local=true
release.dir=release
main.class=com.jdblabs.jlp.JLPMain
diff --git a/resources/main/css/jlp.css b/resources/main/css/jlp.css
index 535d265..354451b 100644
--- a/resources/main/css/jlp.css
+++ b/resources/main/css/jlp.css
@@ -45,7 +45,6 @@ td.docs, th.docs {
.docs tt, .docs code {
background: #f8f8ff;
border: 1px solid #dedede;
- font-size: 12px;
padding: 0 0.2em; }
.docs table {
@@ -60,7 +59,6 @@ td.code, th.code {
font-size: 14px; }
pre, tt, code {
- font-size: 12px;
line-height: 18px;
font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
margin: 0; padding: 0; }
diff --git a/resources/main/logback.groovy b/resources/release/logback.groovy
similarity index 100%
rename from resources/main/logback.groovy
rename to resources/release/logback.groovy
diff --git a/src/main/com/jdblabs/jlp/LiterateMarkdownGenerator.groovy b/src/main/com/jdblabs/jlp/LiterateMarkdownGenerator.groovy
index 5affd01..e7ad382 100644
--- a/src/main/com/jdblabs/jlp/LiterateMarkdownGenerator.groovy
+++ b/src/main/com/jdblabs/jlp/LiterateMarkdownGenerator.groovy
@@ -120,10 +120,6 @@ public class LiterateMarkdownGenerator extends JLPBaseGenerator {
-
- ${escape(processor.currentDocId)} |
- |
-
""")
/// Emit all of the blocks in the body of the html file.
@@ -179,17 +175,20 @@ public class LiterateMarkdownGenerator extends JLPBaseGenerator {
/** Add all the directives. We are also assigning priorities here that
* we will use along with the line numbers to sort the elements. Our
* goal is to preserve the order of doc blocks and doc-block-like
- * elements (examples, api documentation, etc.) while pushing orgs,
- * authorship and other directives to the top. */
+ * elements (examples, api documentation, etc.) while pushing orgs
+ * and potentially other directives to the top. We used to re-order
+ * authorship and copyright tags but stopped: in literate-style docs
+ * the author should have control over their placement and in api-style
+ * docs we are chopping the whole block up anyways (and this is not
+ * that code). Given that the only item being re-ordered is *orgs*,
+ * which do not print anyways, it may be better to cut this out and
+ * just emit the blocks in their original order, or sort by line number
+ * only. */
emitQueue = docBlock.directives.collect { directive ->
def queueItem = [lineNumber: directive.lineNumber, value: directive]
switch(directive.type) {
- case DirectiveType.Api: queueItem.priority = 50; break
- case DirectiveType.Author: queueItem.priority = 10; break
- case DirectiveType.Copyright: queueItem.priority = 11; break
- case DirectiveType.Example: queueItem.priority = 50; break
- case DirectiveType.Include: queueItem.priority = 50; break
- case DirectiveType.Org: queueItem.priority = 0; break }
+ case DirectiveType.Org: queueItem.priority = 0; break
+ default: queueItem.priority = 50; break }
return queueItem }
diff --git a/src/main/com/jdblabs/jlp/Processor.groovy b/src/main/com/jdblabs/jlp/Processor.groovy
index a888615..86051d8 100644
--- a/src/main/com/jdblabs/jlp/Processor.groovy
+++ b/src/main/com/jdblabs/jlp/Processor.groovy
@@ -194,7 +194,7 @@ public class Processor {
* : Return the link as-is.
*
* *absolute path (starts with `/`)*
- * : Returns the link resolved directly against the output root.
+ * : Returns the link resolved against the output root.
*
* *relative path (no leading `/`)*
* : Returns the link resolved against the `TargetDoc` passed in.
@@ -233,12 +233,16 @@ public class Processor {
case ~/^\w+:.*/: return link
/// Absolute link, resolve relative to the output root.
- case ~/^\/.*/: return outputRoot.canonicalPath + link
+ case ~/^\/.*/:
+ /// Our link should be the relative path (if needed) plus the
+ /// link without the leading `/`.
+ def relPath = getRelativeFilepath(targetDoc.sourceFile, inputRoot)
+ return (relPath ? "${relPath}/" : "") + link[1..-1]
/// Relative link, resolve using the output root and the source
/// document relative to the input root.
default:
- def relPath = getRelativePath(inputRoot, targetDoc.sourceFile)
+ def relPath = getRelativeFilepath(inputRoot, targetDoc.sourceFile)
return "${relPath}/${link}" }}
/**