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
This commit is contained in:
parent
33c006bd4f
commit
b9ed6f465e
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#lang info
|
||||
|
||||
(define scribblings
|
||||
'(("getting-started.scrbl" () (omit))))
|
||||
'(("getting-started.scrbl" () (getting-started))))
|
||||
|
|
|
@ -395,7 +395,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.}
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -95,8 +95,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))))])
|
||||
|
@ -112,17 +112,23 @@
|
|||
;; Drop section if it contains no manuals.
|
||||
null]
|
||||
[else
|
||||
(list*
|
||||
(plain-line (hspace 1))
|
||||
(plain-line (let loop ([s (sec-label sec)])
|
||||
(match s
|
||||
[(list 'elem parts ...)
|
||||
(apply elem (map loop parts))]
|
||||
[(list 'link text doc-mod-path)
|
||||
(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])))
|
||||
(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 ...)
|
||||
(apply elem (map loop parts))]
|
||||
[(list 'link text doc-mod-path)
|
||||
(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]))))
|
||||
null)
|
||||
;; Documents in section:
|
||||
(add-sections
|
||||
(sec-cat sec)
|
||||
(lambda (str)
|
||||
|
@ -130,7 +136,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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user