Add links to old documentations.

* The all-versions page has a docs column with html/pdf links, and also
  two links in the nightly builds footer.

* Specific version download pages have a link to the docs for that
  version.  (Only html, to save space.)
This commit is contained in:
Eli Barzilay 2013-02-24 17:12:03 -05:00
parent 9b1247b00d
commit 250880d2a4
4 changed files with 42 additions and 25 deletions

View File

@ -1,6 +1,6 @@
#lang meta/web
(require "resources.rkt" "data.rkt" "installer-pages.rkt"
(require "resources.rkt" "data.rkt" "installer-pages.rkt" "symlinks.rkt"
(prefix-in pre: "../stubs/pre.rkt"))
(provide render-download-page)
@ -27,6 +27,7 @@
@|br hr|
@div[align: "center"]{
@(let ([links (list ((release-page release) "Release Notes")
@a[href: @list{@|docs|/@|version|/html}]{Docs}
@license{License}
all-version-pages
@pre:installers{Nightly Installers})])
@ -88,7 +89,8 @@
@thead{
@tr{@td{@nbsp @strong{Version & Release Notes}}
@(map (λ (p) @th[align: 'center]{@(package->name p)})
all-packages)}}
all-packages)
@td{@strong{Documentation}}}}
@(let ([sep (tr style: "height: 4px; margin: 0; padding: 0;"
(td) (map (λ (_) (td)) all-packages))])
(define (cell rel pkg)
@ -96,17 +98,22 @@
@nbsp @(make-page rel pkg){[download]} @nbsp})
@tbody{
@sep
@(map (λ (r)
@(for/list ([r (in-list all-releases)])
(define ver (release-version r))
@list{
@tr[class: 'version-row]{
@td{@|nbsp nbsp| @strong{Version @release-version[r]},
@td{@|nbsp nbsp| @strong{Version @ver},
@(release-page r){@release-date-string[r]} @nbsp}
@(map (λ (p) (cell r p)) all-packages)}
@sep})
all-releases)})
@(map (λ (p) (cell r p)) all-packages)
@td{@nbsp @a[href: @list{@|docs|/@|ver|/html}]{[HTML]} @;
@nbsp @a[href: @list{@|docs|/@|ver|/pdf}]{[PDF]} @;
@nbsp}}
@sep})})
@tfoot{
@tr[class: 'version-row]{@td[align: 'center colspan: 3]{
@pre:installers}}}}}))
@tr[class: 'version-row]{
@td[align: 'center colspan: 3]{@pre:installers}
@td{@nbsp @pre:docs[#:sub 'html]{[HTML]} @;
@nbsp @pre:docs[#:sub 'pdf]{[PDF]} @nbsp}}}}}))
(define license
@page[#:title "Software License" #:part-of 'download]{

View File

@ -1,14 +1,6 @@
#lang meta/web
(require "resources.rkt" "data.rkt" "../www/download.rkt")
(define (in-ftp . paths)
(string-join (cons "/var/ftp/pub/racket" paths) "/"))
(define docs (symlink (in-ftp "docs")))
(define installers (symlink (in-ftp "installers")))
(define libs (symlink (in-ftp "libs/tags") "libs"))
(define stubs (symlink "/www/stubs"))
(require "resources.rkt" "symlinks.rkt" "../www/download.rkt")
(provide index)
(define index

View File

@ -0,0 +1,13 @@
#lang meta/web
(require "resources.rkt")
(provide (all-defined-out))
(define (in-ftp . paths)
(string-join (cons "/var/ftp/pub/racket" paths) "/"))
(define docs (symlink (in-ftp "docs")))
(define installers (symlink (in-ftp "installers")))
(define libs (symlink (in-ftp "libs/tags") "libs"))
(define stubs (symlink "/www/stubs"))

View File

@ -55,7 +55,7 @@
@~
It is also easy to setup a script that will automate the process of
retrieving the @tt{tgz} file, unpacking and installing it. This is
explained in more details in @pre-scripts{scripts}. In addition to being
explained in more details in @script{scripts}. In addition to being
convenient for updating your tree, it can be used by an automatic job
scheduler (for example, a cron job on Unix) to make tree that is always
updated.}
@ -111,7 +111,12 @@
@a[href: "../"]{nightly build page} has everything you
could want.}})
(define pre-docs
(provide (rename-out [docs* docs]))
(define (docs* #:sub [sub #f] . text)
(if sub
(apply a href: (list (url-of docs) sub "/") (if (null? text) sub text))
(apply docs text)))
(define docs
@page[#:file "docs/" #:title "Prebuilt documentation"]{
@p{This directory contains documentation files in all forms, compiled from
the current sources.}
@ -120,7 +125,7 @@
@hr
@version-hole})
(define pre-binaries
(define binaries
@page[#:file "binaries/" #:title "Prebuilt binaries"]{
@p{This directory contains a subdirectory for each supported platform.}
@hr
@ -128,7 +133,7 @@
@hr
@version-hole})
(define pre-scripts
(define script
@page[#:file "script.html" #:title "Using the nightly Racket builds"]{
@(define (url . s) @list{http://pre.racket-lang.org/@s})
@(define (pre* . text) (apply pre style: "margin-left: 2em;" text))