restore "getting started" link

This change adjusts the meaning of the 'getting-started document
category, which was formerly omitted from the start page. Now,
it means a document that is listed at the beginning and at the same
level as other documents.

(Didn't just revert to the old approach to the "getting started"
entry, because it doesn't work right when "racket-index" is installed
without "racket-doc".)

Closes PR 14348
(cherry picked from commit b9ed6f465e)
This commit is contained in:
Matthew Flatt 2014-02-10 11:15:51 -07:00 committed by Ryan Culpepper
parent c0048c2f0d
commit 8fae923b4f
5 changed files with 28 additions and 19 deletions

View File

@ -1,7 +1,7 @@
#lang scribble/doc
@(require scribble/manual)
@title{Getting Started with Racket}
@title{Getting Started}
To get started with Racket,
@link["http://racket-lang.org/download/"]{download it} from the web page and

View File

@ -1,4 +1,4 @@
#lang info
(define scribblings
'(("getting-started.scrbl" () (omit))))
'(("getting-started.scrbl" () (getting-started))))

View File

@ -389,7 +389,8 @@ Optional @filepath{info.rkt} fields trigger additional actions by
@itemize[
@item{@racket['getting-started] : High-level, introductory
documentation.}
documentation, typeset at the same level as other
category titles.}
@item{@racket['language] : Documentation for a prominent
programming language.}

View File

@ -24,8 +24,7 @@
;; Section definitions for manuals that appear on the start page.
(define manual-sections
'((getting-started (link "Getting Started"
(lib "scribblings/main/getting-started.scrbl")))
'((getting-started #f)
(tutorial "Tutorials")
(racket-core "Racket Language and Core Libraries")
(teaching "Teaching")

View File

@ -93,8 +93,8 @@
(lambda content
(list (make-flow (list (make-paragraph content)))))]
[line
(lambda (spec)
(plain-line (hspace 2)
(lambda (spec indent?)
(plain-line (if indent? (hspace 2) null)
(if (element? spec)
spec
(other-manual spec #:underline? #f))))])
@ -110,8 +110,12 @@
;; Drop section if it contains no manuals.
null]
[else
(list*
(plain-line (hspace 1))
(append
;; Spacer
(list (plain-line (hspace 1)))
;; Section title, if any:
(if (sec-label sec)
(list
(plain-line (let loop ([s (sec-label sec)])
(match s
[(list 'elem parts ...)
@ -120,7 +124,9 @@
(seclink "top" #:doc doc-mod-path #:underline? #f text)]
[(list 'link text doc-mod-path tag)
(seclink tag #:doc doc-mod-path #:underline? #f text)]
[_ s])))
[_ s]))))
null)
;; Documents in section:
(add-sections
(sec-cat sec)
(lambda (str)
@ -128,7 +134,10 @@
(make-element (if (string=? str "") "sepspace" "septitle")
(list 'nbsp str))))
(sort (map (lambda (doc)
(list (cadr doc) (line (cadddr (cdr doc))) (caddr doc)))
(list (cadr doc)
(line (cadddr (cdr doc))
(and (sec-label sec) #t))
(caddr doc)))
docs)
(lambda (ad bd)
(if (= (car ad) (car bd))