website: blog: Set blog posts' lang attribute to English.

Fixes <https://issues.guix.gnu.org/63977>.
Suggested by Maxime Devos <maximedevos@telenet.be>.

* website/apps/blog/templates/post.scm (post-t): Mark the post text as
English.
* website/apps/blog/templates/components.scm (post-preview): Likewise.
This commit is contained in:
Florian Pelz 2023-06-10 18:10:28 +02:00
parent bf07f52a57
commit c392a144df
No known key found for this signature in database
GPG Key ID: 300888CB39C63817
2 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,5 @@
;;; GNU Guix web site
;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Initially written by sirgazil who waives all
;;; copyright interest on this file.
@ -27,13 +28,15 @@
`(a
(@ (class "item-preview")
(href ,(guix-url (url-path-join (post-url-path post) ""))))
(h3 ,(post-ref post 'title))
(h3
(@ (lang "en"))
,(post-ref post 'title))
(p
(@ (class "item-date"))
,(date->string (post-date post) (C_ "SRFI-19 date->string format"
"~B ~e, ~Y")))
(p
(@ (class "item-summary"))
(@ (class "item-summary") (lang "en"))
,(string-summarize (sxml->string* (post-sxml post)) 30)
,(C_ "blog post summary ellipsis" "…"))))

View File

@ -1,4 +1,5 @@
;;; GNU Guix web site
;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Initially written by sirgazil who waives all
;;; copyright interest on this file.
@ -38,10 +39,10 @@
#:content
`(main
(article
(@ (class "page centered-block limit-width"))
(@ (class "page centered-block limit-width") (lang "en"))
(h2 ,(post-ref post 'title))
(p
(@ (class "post-metadata centered-text"))
(@ (class "post-metadata centered-text") (lang ,%current-ietf-tag))
,(post-ref post 'author) " — "
,(date->string (post-date post) (C_ "SRFI-19 date->string format"
"~B ~e, ~Y")))
@ -50,7 +51,7 @@
(syntax-highlight (post-sxml post)))
(div
(@ (class "tag-list"))
(@ (class "tag-list") (lang ,%current-ietf-tag))
,(G_ `(p "Related topics:"))
,@(map
@ -63,7 +64,7 @@
(sort tags tag-first?)))
(div
(@ (class "license"))
(@ (class "license") (lang ,%current-ietf-tag))
,(G_ `(p "Unless otherwise stated, blog posts on this site are
copyrighted by their respective authors and published under the terms of
the " ,(G_