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

View File

@ -1,14 +1,6 @@
#lang meta/web #lang meta/web
(require "resources.rkt" "data.rkt" "../www/download.rkt") (require "resources.rkt" "symlinks.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"))
(provide index) (provide index)
(define 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 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 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 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 scheduler (for example, a cron job on Unix) to make tree that is always
updated.} updated.}
@ -111,7 +111,12 @@
@a[href: "../"]{nightly build page} has everything you @a[href: "../"]{nightly build page} has everything you
could want.}}) 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"]{ @page[#:file "docs/" #:title "Prebuilt documentation"]{
@p{This directory contains documentation files in all forms, compiled from @p{This directory contains documentation files in all forms, compiled from
the current sources.} the current sources.}
@ -120,7 +125,7 @@
@hr @hr
@version-hole}) @version-hole})
(define pre-binaries (define binaries
@page[#:file "binaries/" #:title "Prebuilt binaries"]{ @page[#:file "binaries/" #:title "Prebuilt binaries"]{
@p{This directory contains a subdirectory for each supported platform.} @p{This directory contains a subdirectory for each supported platform.}
@hr @hr
@ -128,7 +133,7 @@
@hr @hr
@version-hole}) @version-hole})
(define pre-scripts (define script
@page[#:file "script.html" #:title "Using the nightly Racket builds"]{ @page[#:file "script.html" #:title "Using the nightly Racket builds"]{
@(define (url . s) @list{http://pre.racket-lang.org/@s}) @(define (url . s) @list{http://pre.racket-lang.org/@s})
@(define (pre* . text) (apply pre style: "margin-left: 2em;" text)) @(define (pre* . text) (apply pre style: "margin-left: 2em;" text))