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:
parent
c0048c2f0d
commit
8fae923b4f
|
@ -1,7 +1,7 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual)
|
@(require scribble/manual)
|
||||||
|
|
||||||
@title{Getting Started with Racket}
|
@title{Getting Started}
|
||||||
|
|
||||||
To get started with Racket,
|
To get started with Racket,
|
||||||
@link["http://racket-lang.org/download/"]{download it} from the web page and
|
@link["http://racket-lang.org/download/"]{download it} from the web page and
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang info
|
#lang info
|
||||||
|
|
||||||
(define scribblings
|
(define scribblings
|
||||||
'(("getting-started.scrbl" () (omit))))
|
'(("getting-started.scrbl" () (getting-started))))
|
||||||
|
|
|
@ -389,7 +389,8 @@ Optional @filepath{info.rkt} fields trigger additional actions by
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['getting-started] : High-level, introductory
|
@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
|
@item{@racket['language] : Documentation for a prominent
|
||||||
programming language.}
|
programming language.}
|
||||||
|
|
|
@ -24,8 +24,7 @@
|
||||||
|
|
||||||
;; Section definitions for manuals that appear on the start page.
|
;; Section definitions for manuals that appear on the start page.
|
||||||
(define manual-sections
|
(define manual-sections
|
||||||
'((getting-started (link "Getting Started"
|
'((getting-started #f)
|
||||||
(lib "scribblings/main/getting-started.scrbl")))
|
|
||||||
(tutorial "Tutorials")
|
(tutorial "Tutorials")
|
||||||
(racket-core "Racket Language and Core Libraries")
|
(racket-core "Racket Language and Core Libraries")
|
||||||
(teaching "Teaching")
|
(teaching "Teaching")
|
||||||
|
|
|
@ -93,8 +93,8 @@
|
||||||
(lambda content
|
(lambda content
|
||||||
(list (make-flow (list (make-paragraph content)))))]
|
(list (make-flow (list (make-paragraph content)))))]
|
||||||
[line
|
[line
|
||||||
(lambda (spec)
|
(lambda (spec indent?)
|
||||||
(plain-line (hspace 2)
|
(plain-line (if indent? (hspace 2) null)
|
||||||
(if (element? spec)
|
(if (element? spec)
|
||||||
spec
|
spec
|
||||||
(other-manual spec #:underline? #f))))])
|
(other-manual spec #:underline? #f))))])
|
||||||
|
@ -110,8 +110,12 @@
|
||||||
;; Drop section if it contains no manuals.
|
;; Drop section if it contains no manuals.
|
||||||
null]
|
null]
|
||||||
[else
|
[else
|
||||||
(list*
|
(append
|
||||||
(plain-line (hspace 1))
|
;; Spacer
|
||||||
|
(list (plain-line (hspace 1)))
|
||||||
|
;; Section title, if any:
|
||||||
|
(if (sec-label sec)
|
||||||
|
(list
|
||||||
(plain-line (let loop ([s (sec-label sec)])
|
(plain-line (let loop ([s (sec-label sec)])
|
||||||
(match s
|
(match s
|
||||||
[(list 'elem parts ...)
|
[(list 'elem parts ...)
|
||||||
|
@ -120,7 +124,9 @@
|
||||||
(seclink "top" #:doc doc-mod-path #:underline? #f text)]
|
(seclink "top" #:doc doc-mod-path #:underline? #f text)]
|
||||||
[(list 'link text doc-mod-path tag)
|
[(list 'link text doc-mod-path tag)
|
||||||
(seclink tag #:doc doc-mod-path #:underline? #f text)]
|
(seclink tag #:doc doc-mod-path #:underline? #f text)]
|
||||||
[_ s])))
|
[_ s]))))
|
||||||
|
null)
|
||||||
|
;; Documents in section:
|
||||||
(add-sections
|
(add-sections
|
||||||
(sec-cat sec)
|
(sec-cat sec)
|
||||||
(lambda (str)
|
(lambda (str)
|
||||||
|
@ -128,7 +134,10 @@
|
||||||
(make-element (if (string=? str "") "sepspace" "septitle")
|
(make-element (if (string=? str "") "sepspace" "septitle")
|
||||||
(list 'nbsp str))))
|
(list 'nbsp str))))
|
||||||
(sort (map (lambda (doc)
|
(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)
|
docs)
|
||||||
(lambda (ad bd)
|
(lambda (ad bd)
|
||||||
(if (= (car ad) (car bd))
|
(if (= (car ad) (car bd))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user