From patchwork Sun Oct 4 21:07:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 24465 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DC68C27BBE9; Sun, 4 Oct 2020 22:15:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5784427BBE8 for ; Sun, 4 Oct 2020 22:15:51 +0100 (BST) Received: from localhost ([::1]:47206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPBMD-00043D-2i for patchwork@mira.cbaines.net; Sun, 04 Oct 2020 17:15:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPBEh-0000GP-Uj for guix-patches@gnu.org; Sun, 04 Oct 2020 17:08:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35318) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPBEg-0002fE-QD for guix-patches@gnu.org; Sun, 04 Oct 2020 17:08:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kPBEg-0006MQ-Jb for guix-patches@gnu.org; Sun, 04 Oct 2020 17:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43803] website: theme: Allow adding noindex meta element to pages. Resent-From: Luis Felipe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Oct 2020 21:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 43803@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.160184565324410 (code B ref -1); Sun, 04 Oct 2020 21:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Oct 2020 21:07:33 +0000 Received: from localhost ([127.0.0.1]:46864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPBEC-0006Le-Qq for submit@debbugs.gnu.org; Sun, 04 Oct 2020 17:07:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:55404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPBEA-0006LW-QX for submit@debbugs.gnu.org; Sun, 04 Oct 2020 17:07:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPBEA-00005G-Kg for guix-patches@gnu.org; Sun, 04 Oct 2020 17:07:30 -0400 Received: from mail-40141.protonmail.ch ([185.70.40.141]:50480) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPBE7-0002d0-Pc for guix-patches@gnu.org; Sun, 04 Oct 2020 17:07:30 -0400 Date: Sun, 04 Oct 2020 21:07:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1601845644; bh=II2vYvaCZOEfkiIxQcJB44KfIQBSWxu/qShZ13E5blA=; h=Date:To:From:Reply-To:Subject:From; b=d9Vg/xGKfMEgMYSdblrIs9PHBFO+xVua4weFbjIv2bBlPkQ2V0Oiy+qKDMKB0+lcD pgIC5KMdUFaychAkzLxDfWZTudNOSBYYRYI11XaQsx395KRdlyKWwkT80UUlf5Ml04 A/EBcEwYasgXBWL7swhBf2FfEnsxsbuRFVi/Wj2M= Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.141; envelope-from=luis.felipe.la@protonmail.com; helo=mail-40141.protonmail.ch X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/04 17:07:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 04 Oct 2020 17:15:15 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Luis Felipe , Luis Felipe via Guix-patches X-Patchwork-Original-From: Luis Felipe via Guix-patches via From: "ashish.is--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches Hi, this is to allow some pages to tell search engines not to list them in search results. For example, the paginated pages of the package list and blog posts. --- Luis Felipe López Acevedo https://luis-felipe.gitlab.io/ From d93d31c6faf4b7ec24f875933893cf46315bd9fd Mon Sep 17 00:00:00 2001 From: Luis Felipe Date: Sun, 4 Oct 2020 15:43:53 -0500 Subject: [PATCH] website: theme: Allow adding 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 NOINDEX? --- website/apps/base/templates/theme.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/apps/base/templates/theme.scm b/website/apps/base/templates/theme.scm index 4734ee5..8263bf5 100644 --- a/website/apps/base/templates/theme.scm +++ b/website/apps/base/templates/theme.scm @@ -1,4 +1,5 @@ ;;; GNU Guix web site +;;; Public domain 2020 Luis Felipe López Acevedo ;;; Initially written by sirgazil who waives all ;;; copyright interest on this file. @@ -14,6 +15,7 @@ (title '()) (description "") (keywords '()) + (noindex? #false) (active-menu-item (C_ "website menu" "About")) (css '()) (scripts '()) @@ -42,6 +44,12 @@ A list of keyword strings that will be used as the value for the keywords meta element of the document. + NOINDEX? (boolean) + Indicate whether the page should tell Internet robots not to + index it. This is useful, for example, to avoid search engine + robots listing some pages in search results. If not provided, + it defaults to false. + ACTIVE-MENU-ITEM (string) The label of the menu item in the navigation bar that should be highlighted to indicate the current section of the website that @@ -79,6 +87,10 @@ (meta (@ (name "keywords") (content ,(string-join keywords ", ")))) (meta (@ (name "description") (content ,description))) (meta (@ (name "viewport") (content "width=device-width, initial-scale=1.0"))) + ;; Info for Internet robots. + ,(if noindex? + '(meta (@ (name "robots") (content "noindex"))) + "") ;; Menu prefetch. (link (@ (rel "prefetch") (href ,(guix-url "menu/index.html")))) ;; Base CSS. -- 2.28.0