Some web page tweaks.
* The main page's title appears in search results, so use "The Racket Language" instead of "Racket". Additional minor tweaks to a few more titles to make them presentable as search results. * Add a `#:description' keyword to make it easy to add it to pages. Add such texts to the main page, downloads, community, learning, people, and mailing list pages. * Add a <meta name="robots" content="NOODP" /> to the front page, to avoid getting the ODP (dmoz) blurb, hopefully the new and improved description(s) will be used instead. (If not, this should be reverted.)
This commit is contained in:
parent
81e0bd2382
commit
b1c666c212
|
@ -67,7 +67,8 @@
|
||||||
;; can be #f (default), 'full: full page (and no div),
|
;; can be #f (default), 'full: full page (and no div),
|
||||||
;; otherwise, a css width
|
;; otherwise, a css width
|
||||||
#:width [width #f]
|
#:width [width #f]
|
||||||
#:extra-headers [headers #f]
|
#:description [description #f] ; for a meta tag
|
||||||
|
#:extra-headers [extra-headers #f]
|
||||||
#:extra-body-attrs [body-attrs #f]
|
#:extra-body-attrs [body-attrs #f]
|
||||||
#:resources resources ; see below
|
#:resources resources ; see below
|
||||||
#:referrer [referrer
|
#:referrer [referrer
|
||||||
|
@ -75,24 +76,29 @@
|
||||||
(a href: url (if (null? more) linktitle more)))]
|
(a href: url (if (null? more) linktitle more)))]
|
||||||
;; will be used instead of `this' to determine navbar highlights
|
;; will be used instead of `this' to determine navbar highlights
|
||||||
#:part-of [part-of #f]
|
#:part-of [part-of #f]
|
||||||
content)
|
content0)
|
||||||
(define (page)
|
(define (page)
|
||||||
(let* ([head (resources 'head wintitle headers)]
|
(define desc
|
||||||
[navbar (resources 'navbar (or part-of this))]
|
(and description (meta name: 'description content: description)))
|
||||||
[content (case width
|
(define headers
|
||||||
[(full) content]
|
(if (and extra-headers desc)
|
||||||
[(#f) (div class: 'bodycontent content)]
|
(list desc "\n" extra-headers)
|
||||||
[else (div class: 'bodycontent
|
(or desc extra-headers)))
|
||||||
style: @list{width: @|width|@";"}
|
(define head (resources 'head wintitle headers))
|
||||||
content)])]
|
(define navbar (resources 'navbar (or part-of this)))
|
||||||
[content @list{@navbar
|
(define content
|
||||||
@content}])
|
(list navbar "\n"
|
||||||
|
(case width
|
||||||
|
[(full) content0]
|
||||||
|
[(#f) (div class: 'bodycontent content0)]
|
||||||
|
[else (div class: 'bodycontent style: @list{width: @|width|@";"}
|
||||||
|
content0)])))
|
||||||
@xhtml{@||
|
@xhtml{@||
|
||||||
@head
|
@head
|
||||||
@(if body-attrs
|
@(if body-attrs
|
||||||
(apply body `(,@body-attrs ,content))
|
(apply body `(,@body-attrs ,content))
|
||||||
(body content))
|
(body content))
|
||||||
@||}))
|
@||})
|
||||||
(define this (and (not html-only?)
|
(define this (and (not html-only?)
|
||||||
(resource/referrer (get-path 'plain id file "html" dir)
|
(resource/referrer (get-path 'plain id file "html" dir)
|
||||||
(file-writer output-xml page)
|
(file-writer output-xml page)
|
||||||
|
|
|
@ -12,7 +12,11 @@
|
||||||
|
|
||||||
(provide index)
|
(provide index)
|
||||||
(define index
|
(define index
|
||||||
@page[#:link-title "Downloads" #:part-of 'download]{
|
@page[#:link-title "Downloads" #:part-of 'download
|
||||||
|
#:description
|
||||||
|
@'{Download Racket, a modern dialect of Lisp/Scheme. @;
|
||||||
|
Available for Windows, Mac, Linux, and other Unix platforms. @;
|
||||||
|
Includes the DrRacket IDE.}]{
|
||||||
@div[style: "float: right;"]{@download-button}
|
@div[style: "float: right;"]{@download-button}
|
||||||
Use these links to browse the download directories directly:
|
Use these links to browse the download directories directly:
|
||||||
@ul{@li{Current @a[href: `(,installers "/recent")]{installers}
|
@ul{@li{Current @a[href: `(,installers "/recent")]{installers}
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
|
|
||||||
(define lists
|
(define lists
|
||||||
@page[#:title "Mailing Lists" #:file "" #:part-of 'community
|
@page[#:title "Mailing Lists" #:file "" #:part-of 'community
|
||||||
|
#:description
|
||||||
|
@'{Racket mailing lists for users, developers, announcements, and more.}
|
||||||
(define (list-cells what) (map (λ (r) (r what)) list-renderers))
|
(define (list-cells what) (map (λ (r) (r what)) list-renderers))
|
||||||
]{
|
]{
|
||||||
@p{This is the Racket mailing list server. We have several public mailing
|
@p{This is the Racket mailing list server. We have several public mailing
|
||||||
|
|
|
@ -7,7 +7,10 @@
|
||||||
|
|
||||||
(provide community)
|
(provide community)
|
||||||
(define community
|
(define community
|
||||||
@page[#:part-of 'community]{
|
@page[#:window-title "Racket Community Resources" #:part-of 'community
|
||||||
|
#:description
|
||||||
|
@'{Racket-related community resources: mailing lists, IRC channel, @;
|
||||||
|
resources for developers, RacketCon, blog, and more.}]{
|
||||||
@mailing-lists-quick
|
@mailing-lists-quick
|
||||||
@irc-quick
|
@irc-quick
|
||||||
@parlist[@strong{PLT Scheme Inc.}
|
@parlist[@strong{PLT Scheme Inc.}
|
||||||
|
|
|
@ -260,8 +260,14 @@
|
||||||
|
|
||||||
(provide index)
|
(provide index)
|
||||||
(define index
|
(define index
|
||||||
(page #:link-title "About" #:window-title "Racket"
|
(page #:link-title "About" #:window-title "The Racket Language"
|
||||||
#:extra-headers @list{@meta[name: 'description content: blurb]
|
#:description
|
||||||
|
@'{Racket is a modern programming language in the Lisp/Scheme family, @;
|
||||||
|
suitable for a wide range of applications. @;
|
||||||
|
Racket provides a rich language extension API, the DrRacket @;
|
||||||
|
integrated development environment, and many batteries-included @;
|
||||||
|
libraries.}
|
||||||
|
#:extra-headers @list{@meta[name: "robots" content: "NOODP"]
|
||||||
@(lazy more.css)}
|
@(lazy more.css)}
|
||||||
@div[class: 'leftpane]{
|
@div[class: 'leftpane]{
|
||||||
@span[style: "font-size: large; font-weight: bold;"]{Racket}
|
@span[style: "font-size: large; font-weight: bold;"]{Racket}
|
||||||
|
|
|
@ -4,7 +4,11 @@
|
||||||
|
|
||||||
(provide learning)
|
(provide learning)
|
||||||
(define learning
|
(define learning
|
||||||
@page[#:part-of 'learning]{
|
@page[#:window-title "Racket Learning" #:part-of 'learning
|
||||||
|
#:description
|
||||||
|
'@{Racket-related learning resources. Introductions to Racket, @;
|
||||||
|
the Racket Guide, Computer Science textbooks that use Racket, @;
|
||||||
|
outreach programs, and graduate studies.}]{
|
||||||
@parlist[@strong{Resources for Learning}
|
@parlist[@strong{Resources for Learning}
|
||||||
(apply parlist @text{Documentation for getting started:} intros)
|
(apply parlist @text{Documentation for getting started:} intros)
|
||||||
@text{@-htdp — a textbook for introductory programming, but also
|
@text{@-htdp — a textbook for introductory programming, but also
|
||||||
|
|
|
@ -95,7 +95,8 @@
|
||||||
|
|
||||||
(provide people)
|
(provide people)
|
||||||
(define people
|
(define people
|
||||||
@page[#:part-of 'community]{
|
@page[#:window-title "Racket People: The PLT Group" #:part-of 'community
|
||||||
|
#:description "PLT: the group that is the Racket development team."]{
|
||||||
@p{“PLT” refers to the group that is the core of the Racket development
|
@p{“PLT” refers to the group that is the core of the Racket development
|
||||||
team. PLT consists of numerous people distributed across several
|
team. PLT consists of numerous people distributed across several
|
||||||
different universities in the USA:
|
different universities in the USA:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user