From 905be30b974ec3f264f31d3fb68cc6fd70f90fff Mon Sep 17 00:00:00 2001 From: Nick Greenfield Date: Sun, 21 Dec 2014 18:00:51 -0500 Subject: [PATCH 1/4] Fix source code links --- tools/nimweb.nim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/nimweb.nim b/tools/nimweb.nim index d56b6aecf..74f561b52 100644 --- a/tools/nimweb.nim +++ b/tools/nimweb.nim @@ -268,18 +268,18 @@ proc buildDoc(c: var TConfigData, destPath: string) = commands = newSeq[string](len(c.doc) + len(c.srcdoc) + len(c.srcdoc2)) i = 0 for d in items(c.doc): - commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, splitFile(d).dir, + commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc for d in items(c.srcdoc): - commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, splitFile(d).dir, + commands[i] = "nim doc $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc for d in items(c.srcdoc2): - commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, splitFile(d).dir, + commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc @@ -311,8 +311,8 @@ proc buildAddDoc(c: var TConfigData, destPath: string) = # build additional documentation (without the index): var commands = newSeq[string](c.webdoc.len) for i, doc in pairs(c.webdoc): - commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, splitFile(doc).dir, + commands[i] = "nim doc $# --docSeeSrcUrl:$#/$# -o:$# $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(doc).name, "html"), doc] mexec(commands, c.numProcessors) From e6abd673b801682a7ccac9ed4f545e1fc8feb26e Mon Sep 17 00:00:00 2001 From: Nick Greenfield Date: Sun, 21 Dec 2014 18:22:20 -0500 Subject: [PATCH 2/4] Fix blockquotes in documentation; stylize only in docinfo or immediately after an h1 --- config/nimdoc.cfg | 10 +++++++--- doc/gc.txt | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg index 464c506c4..1fa07509b 100644 --- a/config/nimdoc.cfg +++ b/config/nimdoc.cfg @@ -130,7 +130,7 @@ html { -ms-text-size-adjust: 100%; } /* Where we want fancier font if available */ -h1, h2, h3, h4, h5, h6, p.module-desc, blockquote p { +h1, h2, h3, h4, h5, h6, p.module-desc, table.docinfo + blockquote p, table.docinfo blockquote p, h1 + blockquote p { font-family: "Raleway", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif !important; } h1.title { @@ -523,9 +523,13 @@ abbr.initialism { blockquote { padding: 0 0 0 15px; margin: 0 0 20px; - border-left: 5px solid #c9c9c9; } + border-left: 5px solid #EFEBE0; } -blockquote p { +table.docinfo + blockquote, table.docinfo blockquote, h1 + blockquote { + border-left: 5px solid #c9c9c9; +} + +table.docinfo + blockquote p, table.docinfo blockquote p, h1 + blockquote p { margin-bottom: 0; font-size: 15px; font-weight: 200; diff --git a/doc/gc.txt b/doc/gc.txt index d6e228558..29b078631 100644 --- a/doc/gc.txt +++ b/doc/gc.txt @@ -2,11 +2,15 @@ Nim's Garbage Collector ========================== -:Author: Andreas Rumpf -:Version: |nimversion| +:Author: Andreas Rumpf +:Version: |nimversion| + +.. contents:: + "The road to hell is paved with good intentions." + Introduction ============ From eba4b4008d3c09cd7c20db360e4bfc1bfefe7630 Mon Sep 17 00:00:00 2001 From: Nick Greenfield Date: Sun, 21 Dec 2014 18:49:39 -0500 Subject: [PATCH 3/4] Fix paragraph break issue in nimc.txt. Add spacing to command line options table. --- config/nimdoc.cfg | 4 ++++ doc/basicopt.txt | 5 +++-- doc/nimc.txt | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg index 1fa07509b..3abae7388 100644 --- a/config/nimdoc.cfg +++ b/config/nimdoc.cfg @@ -609,6 +609,10 @@ table { border-collapse: collapse; border-spacing: 0; } +table th, table td { + padding: 0px 8px 0px; +} + .table { width: 100%; margin-bottom: 20px; } diff --git a/doc/basicopt.txt b/doc/basicopt.txt index e8aaa2e4c..ffb374f18 100644 --- a/doc/basicopt.txt +++ b/doc/basicopt.txt @@ -1,5 +1,6 @@ -Usage:: - nim command [options] [projectfile] [arguments] +:: + + nim command [options] [projectfile] [arguments] Command: //compile, c compile project with default code generator (C) diff --git a/doc/nimc.txt b/doc/nimc.txt index 1f2675df8..92acd3979 100644 --- a/doc/nimc.txt +++ b/doc/nimc.txt @@ -28,10 +28,14 @@ Compiler Usage Command line switches --------------------- -Basic command line switches are: +Basic command line switches are: + +Usage: .. include:: basicopt.txt +---- + Advanced command line switches are: .. include:: advopt.txt From 7757a3708ea95795da583a87a687a4e4e32e561d Mon Sep 17 00:00:00 2001 From: Nick Greenfield Date: Sun, 21 Dec 2014 20:01:51 -0500 Subject: [PATCH 4/4] Remove TOC from gc.txt, but get quote at top properly formatted --- doc/gc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/gc.txt b/doc/gc.txt index 29b078631..ac8d46cfa 100644 --- a/doc/gc.txt +++ b/doc/gc.txt @@ -5,7 +5,7 @@ Nim's Garbage Collector :Author: Andreas Rumpf :Version: |nimversion| -.. contents:: +.. "The road to hell is paved with good intentions."