From owner-dev-commits-doc-all@freebsd.org Mon Feb 1 01:09:51 2021 Return-Path: Delivered-To: dev-commits-doc-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A23984EE0CB for ; Mon, 1 Feb 2021 01:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DTVGl4FyPz4vG6; Mon, 1 Feb 2021 01:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85357122DB; Mon, 1 Feb 2021 01:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 11119pXC087267; Mon, 1 Feb 2021 01:09:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11119pOY087266; Mon, 1 Feb 2021 01:09:51 GMT (envelope-from git) Date: Mon, 1 Feb 2021 01:09:51 GMT Message-Id: <202102010109.11119pOY087266@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Allan Jude Subject: git: bc185da8de - main - Improve the documentation front page with full book/article names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc185da8de5102c574e6dccbe3559591027a2d46 Auto-Submitted: auto-generated X-BeenThere: dev-commits-doc-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the doc repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2021 01:09:51 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/doc/commit/?id=bc185da8de5102c574e6dccbe3559591027a2d46 commit bc185da8de5102c574e6dccbe3559591027a2d46 Author: Allan Jude AuthorDate: 2021-01-31 19:39:20 +0000 Commit: Allan Jude CommitDate: 2021-02-01 01:09:37 +0000 Improve the documentation front page with full book/article names Use the title of the book or article rather than the directory name Also use the full name of the language, not just the short code Sponsored by: Klara Inc. Reviewed by: carlavilla Differential Revision: https://reviews.freebsd.org/D28440 --- documentation/themes/beastie/layouts/index.html | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/documentation/themes/beastie/layouts/index.html b/documentation/themes/beastie/layouts/index.html index e7c72d5ee3..1ba57c710a 100644 --- a/documentation/themes/beastie/layouts/index.html +++ b/documentation/themes/beastie/layouts/index.html @@ -19,15 +19,13 @@ -

{{ i18n "books" }} - {{ $home.Language }}

+

{{ i18n "books" }} - {{ $home.Language.LanguageName }}

{{ $books := slice}} {{ range where .Site.Pages "Section" "books" }} - {{ with .File }} - {{ $subDirsNumer := .File.Path | strings.Count "/" }} - {{ if eq $subDirsNumer 2 }} - {{ $books = $books | append (dict "page" . "path" .File.Path) }} - {{ end }} + {{ $subDirsNumer := .File.Path | strings.Count "/" }} + {{ if eq $subDirsNumer 2 }} + {{ $books = $books | append (dict "page" . "path" .File.Path) }} {{ end }} {{ end }} @@ -36,20 +34,18 @@ {{ if in .path "_index.adoc" }} {{ $bookPath := replaceRE "/_index.adoc" "" .path }} {{ $bookName := replaceRE "books/" "" $bookPath }} -
  • {{ $bookName }}
  • +
  • {{ .page.Title }}
  • {{ end }} {{ end }} -

    {{ i18n "articles" }} - {{ $home.Language }}

    +

    {{ i18n "articles" }} - {{ $home.Language.LanguageName }}

    {{ $articles := slice}} {{ range where .Site.Pages "Section" "articles" }} - {{ with .File }} - {{ $subDirsNumer := .File.Path | strings.Count "/" }} - {{ if eq $subDirsNumer 2 }} - {{ $articles = $articles | append (dict "page" . "path" .File.Path) }} - {{ end }} + {{ $subDirsNumer := .File.Path | strings.Count "/" }} + {{ if eq $subDirsNumer 2 }} + {{ $articles = $articles | append (dict "page" . "path" .File.Path) }} {{ end }} {{ end }} @@ -58,7 +54,7 @@ {{ if in .path "_index.adoc" }} {{ $articlePath := replaceRE "/_index.adoc" "" .path }} {{ $articleName := replaceRE "articles/" "" $articlePath }} -
  • {{ $articleName }}
  • +
  • {{ .page.Title }}
  • {{ end }} {{ end }}