website: theme: Allow adding the noindex meta element to pages.
This change allows to tell Internet robots not to index some pages. * website/apps/base/templates/theme.scm (theme): New parameter INDEX? Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
9dd2b291c9
commit
76b4088c70
|
@ -1,4 +1,5 @@
|
||||||
;;; GNU Guix web site
|
;;; GNU Guix web site
|
||||||
|
;;; Public domain 2020 Luis Felipe López Acevedo
|
||||||
;;; Initially written by sirgazil who waives all
|
;;; Initially written by sirgazil who waives all
|
||||||
;;; copyright interest on this file.
|
;;; copyright interest on this file.
|
||||||
|
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
(title '())
|
(title '())
|
||||||
(description "")
|
(description "")
|
||||||
(keywords '())
|
(keywords '())
|
||||||
|
(index? #true)
|
||||||
(active-menu-item (C_ "website menu" "About"))
|
(active-menu-item (C_ "website menu" "About"))
|
||||||
(css '())
|
(css '())
|
||||||
(scripts '())
|
(scripts '())
|
||||||
|
@ -42,6 +44,11 @@
|
||||||
A list of keyword strings that will be used as the value for
|
A list of keyword strings that will be used as the value for
|
||||||
the keywords meta element of the document.
|
the keywords meta element of the document.
|
||||||
|
|
||||||
|
INDEX? (boolean)
|
||||||
|
Indicate whether the page should be indexed by Internet robots,
|
||||||
|
such as search engine robots. If not provided, it defaults to
|
||||||
|
true.
|
||||||
|
|
||||||
ACTIVE-MENU-ITEM (string)
|
ACTIVE-MENU-ITEM (string)
|
||||||
The label of the menu item in the navigation bar that should be
|
The label of the menu item in the navigation bar that should be
|
||||||
highlighted to indicate the current section of the website that
|
highlighted to indicate the current section of the website that
|
||||||
|
@ -79,6 +86,10 @@
|
||||||
(meta (@ (name "keywords") (content ,(string-join keywords ", "))))
|
(meta (@ (name "keywords") (content ,(string-join keywords ", "))))
|
||||||
(meta (@ (name "description") (content ,description)))
|
(meta (@ (name "description") (content ,description)))
|
||||||
(meta (@ (name "viewport") (content "width=device-width, initial-scale=1.0")))
|
(meta (@ (name "viewport") (content "width=device-width, initial-scale=1.0")))
|
||||||
|
;; Info for Internet robots.
|
||||||
|
,(if index?
|
||||||
|
""
|
||||||
|
'(meta (@ (name "robots") (content "noindex"))))
|
||||||
;; Menu prefetch.
|
;; Menu prefetch.
|
||||||
(link (@ (rel "prefetch") (href ,(guix-url "menu/index.html"))))
|
(link (@ (rel "prefetch") (href ,(guix-url "menu/index.html"))))
|
||||||
;; Base CSS.
|
;; Base CSS.
|
||||||
|
|
Loading…
Reference in New Issue