Skip to content

Commit

Permalink
website updates; Source links now work
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Dec 30, 2014
1 parent d01eb14 commit 1b56334
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
20 changes: 11 additions & 9 deletions tools/nimweb.nim
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ proc initConfigData(c: var TConfigData) =
c.logo = ""
c.ticker = ""
c.vars = newStringTable(modeStyleInsensitive)
c.gitRepo = "https://github.com/Araq/Nimrod/tree"
c.gitRepo = "https://github.com/Araq/Nim/tree"
c.gitCommit = "master"
c.numProcessors = countProcessors()
# Attempts to obtain the git current commit.
Expand Down Expand Up @@ -262,24 +262,26 @@ proc buildDocSamples(c: var TConfigData, destPath: string) =
exec("nim doc2 $# -o:$# $#" %
[c.nimArgs, destPath / "docgen_sample2.html", src])

proc pathPart(d: string): string = splitFile(d).dir.replace('\\', '/')

proc buildDoc(c: var TConfigData, destPath: string) =
# call nim for the documentation:
var
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,
commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" %
[c.nimArgs, c.gitRepo, c.gitCommit, d.pathPart,
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,
commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" %
[c.nimArgs, c.gitRepo, c.gitCommit, d.pathPart,
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,
commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" %
[c.nimArgs, c.gitRepo, c.gitCommit, d.pathPart,
destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc

Expand Down Expand Up @@ -311,8 +313,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,
commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# $#" %
[c.nimArgs, c.gitRepo, c.gitCommit, doc.pathPart,
destPath / changeFileExt(splitFile(doc).name, "html"), doc]
mexec(commands, c.numProcessors)

Expand Down
9 changes: 3 additions & 6 deletions web/download.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ and clang on Mac OS X.
Binaries
========

Unfortunately for now we provide no binary builds.

..
Unfortunately for now we only provide builds for Windows.
* 32 bit: `nim_0.10.2.exe <download/nim-0.10.2.exe>`_
* 64 bit: `nim_0.10.2_x64.exe <download/nim-0.10.2_x64.exe>`_
Unfortunately for now we only provide builds for Windows.
* 32 bit: `nim-0.10.2_x32.exe <download/nim-0.10.2_x32.exe>`_
* 64 bit: `nim-0.10.2_x64.exe <download/nim-0.10.2_x64.exe>`_


Installation based on generated C code
Expand Down
7 changes: 5 additions & 2 deletions web/news.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ for lightweight threading through the use of ``spawn``.
The unpopular "T" and "P" prefixes on types have been deprecated. Nim also
became more expressive by weakening the distinction between statements and
expressions. We also added a new and searchable forum, a new website, and our
documentation generator ``docgen`` has seen major improvements.
documentation generator ``docgen`` has seen major improvements. Many thanks to
Nick Greenfield for the much more beautiful documentation!



What's left to be done
~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -120,7 +123,7 @@ Language Additions
- The builtin ``procCall`` can be used to get ``super``-like functionality
for multi methods.
- There is a new pragma ``{.experimental.}`` that enables experimental
language features per module, or you can enable this features on a global
language features per module, or you can enable these features on a global
level with the ``--experimental`` command line option.


Expand Down

0 comments on commit 1b56334

Please sign in to comment.