[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: website: blog: Set blog posts' lang attribute to English.
From: |
Florian Pelz |
Subject: |
02/02: website: blog: Set blog posts' lang attribute to English. |
Date: |
Sat, 10 Jun 2023 14:32:41 -0400 (EDT) |
pelzflorian pushed a commit to branch master
in repository guix-artwork.
commit c392a144df6c1e11ec5a672f7e2c00fbfc51f5bd
Author: Florian Pelz <pelzflorian@pelzflorian.de>
AuthorDate: Sat Jun 10 18:10:28 2023 +0200
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.
---
website/apps/blog/templates/components.scm | 7 +++++--
website/apps/blog/templates/post.scm | 9 +++++----
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/website/apps/blog/templates/components.scm
b/website/apps/blog/templates/components.scm
index 8be9b22..fb389b2 100644
--- a/website/apps/blog/templates/components.scm
+++ b/website/apps/blog/templates/components.scm
@@ -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" "…"))))
diff --git a/website/apps/blog/templates/post.scm
b/website/apps/blog/templates/post.scm
index 0d6b08e..0e6ad0d 100644
--- a/website/apps/blog/templates/post.scm
+++ b/website/apps/blog/templates/post.scm
@@ -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_