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),
|
||||
;; otherwise, a css width
|
||||
#: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]
|
||||
#:resources resources ; see below
|
||||
#:referrer [referrer
|
||||
|
@ -75,24 +76,29 @@
|
|||
(a href: url (if (null? more) linktitle more)))]
|
||||
;; will be used instead of `this' to determine navbar highlights
|
||||
#:part-of [part-of #f]
|
||||
content)
|
||||
content0)
|
||||
(define (page)
|
||||
(let* ([head (resources 'head wintitle headers)]
|
||||
[navbar (resources 'navbar (or part-of this))]
|
||||
[content (case width
|
||||
[(full) content]
|
||||
[(#f) (div class: 'bodycontent content)]
|
||||
[else (div class: 'bodycontent
|
||||
style: @list{width: @|width|@";"}
|
||||
content)])]
|
||||
[content @list{@navbar
|
||||
@content}])
|
||||
@xhtml{@||
|
||||
@head
|
||||
@(if body-attrs
|
||||
(apply body `(,@body-attrs ,content))
|
||||
(body content))
|
||||
@||}))
|
||||
(define desc
|
||||
(and description (meta name: 'description content: description)))
|
||||
(define headers
|
||||
(if (and extra-headers desc)
|
||||
(list desc "\n" extra-headers)
|
||||
(or desc extra-headers)))
|
||||
(define head (resources 'head wintitle headers))
|
||||
(define navbar (resources 'navbar (or part-of this)))
|
||||
(define content
|
||||
(list navbar "\n"
|
||||
(case width
|
||||
[(full) content0]
|
||||
[(#f) (div class: 'bodycontent content0)]
|
||||
[else (div class: 'bodycontent style: @list{width: @|width|@";"}
|
||||
content0)])))
|
||||
@xhtml{@||
|
||||
@head
|
||||
@(if body-attrs
|
||||
(apply body `(,@body-attrs ,content))
|
||||
(body content))
|
||||
@||})
|
||||
(define this (and (not html-only?)
|
||||
(resource/referrer (get-path 'plain id file "html" dir)
|
||||
(file-writer output-xml page)
|
||||
|
|
|
@ -12,7 +12,11 @@
|
|||
|
||||
(provide 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}
|
||||
Use these links to browse the download directories directly:
|
||||
@ul{@li{Current @a[href: `(,installers "/recent")]{installers}
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
(define lists
|
||||
@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))
|
||||
]{
|
||||
@p{This is the Racket mailing list server. We have several public mailing
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
|
||||
(provide 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
|
||||
@irc-quick
|
||||
@parlist[@strong{PLT Scheme Inc.}
|
||||
|
|
|
@ -260,8 +260,14 @@
|
|||
|
||||
(provide index)
|
||||
(define index
|
||||
(page #:link-title "About" #:window-title "Racket"
|
||||
#:extra-headers @list{@meta[name: 'description content: blurb]
|
||||
(page #:link-title "About" #:window-title "The Racket Language"
|
||||
#: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)}
|
||||
@div[class: 'leftpane]{
|
||||
@span[style: "font-size: large; font-weight: bold;"]{Racket}
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
|
||||
(provide 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}
|
||||
(apply parlist @text{Documentation for getting started:} intros)
|
||||
@text{@-htdp — a textbook for introductory programming, but also
|
||||
|
|
|
@ -95,7 +95,8 @@
|
|||
|
||||
(provide 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
|
||||
team. PLT consists of numerous people distributed across several
|
||||
different universities in the USA:
|
||||
|
|
Loading…
Reference in New Issue
Block a user