Whitespace cleanup in layouts and title (#581)

- Remove newline from blog post title
- Layouts: whitespace cleanup
- No content changes in generated site (modulo whitespace)
This commit is contained in:
Patrice Chalin 2020-12-19 15:05:11 -05:00 committed by GitHub
parent 4c8fbe2b23
commit ce46d18cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 72 additions and 71 deletions

View File

@ -9,6 +9,7 @@
"CNCF",
"deallocate",
"deserialization",
"Disqus",
"Dockerfiles",
"Docsy",
"favicons",
@ -40,6 +41,7 @@
"threadsafe",
"unencrypted",
"unmarshalling",
"URL's",
"Xcode"
],
"flagWords": [],

View File

@ -1,9 +1,9 @@
---
title: |
gRPC Meets .NET SDK And Visual Studio: Automatic Codegen On Build
title: "gRPC Meets .NET SDK And Visual Studio: Automatic Codegen On Build"
spelling: cSpell:ignore autogenerated drwxrwxr classlib globbing Katsnelson Kirill protodep netstandard Nuget walkthrough
date: 2018-06-26
author:
name: "Kirill 'kkm' Katsnelson"
name: Kirill 'kkm' Katsnelson
link: https://github.com/kkm000
---

View File

@ -1,9 +1,8 @@
{{/* This file is in place as an override to Docsy */}}
{{/* cSpell:ignore URL's */}}
{{ define "title" -}}
404 Page not found – {{ site.Title -}}
{{ end -}}
{{ end }}
{{ define "main" -}}
{{ $newIssuePath := "issues/new?title=Unexpected%20page-not-found%20error&body=URL%3A%20%0AExpected%20page%3A%20" -}}
@ -43,4 +42,4 @@
</div>
</div>
</section>
{{ end -}}
{{ end }}

View File

@ -1,4 +1,4 @@
{{/* This file is in place as an override to Docsy */}}
{{/* This file is in place as an override to Docsy */ -}}
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="no-js">

View File

@ -1,48 +1,48 @@
{{/* This file is in place as an override to Docsy */}}
{{/* This file is in place as an override to Docsy */ -}}
{{ $auth := .Params.author }}
{{ $auths := .Params.authors }}
{{ $auth := .Params.author -}}
{{ $authors := .Params.authors -}}
<div class="td-content">
<h1>{{ .Title }}</h1>
{{ with .Params.attribution }}
{{ with .Params.attribution -}}
<p>{{ . }}</p>
{{ end }}
{{ end -}}
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
<div class="td-byline mb-4">
{{ with $auth }}
{{ T "post_byline_by" }}
{{ if .link }}
{{ with $auth -}}
{{ T "post_byline_by" }}
{{ if .link -}}
<a href="{{ .link }}"><b>{{ .name | markdownify }}</b></a>
{{ else }}
{{ else -}}
<b>{{ .name | markdownify }}</b>
{{ end }}
{{ end -}}
{{ with .position }} ({{ . | markdownify }}){{ end }} |
{{ with .blurb }}
{{ with .blurb -}}
<span> {{ . }}</span>
<br/>
{{ end }}
{{- with .guest -}}
{{ end -}}
{{ with .guest -}}
<span class="badge badge-secondary font-weight-bold">
<span class="icon"><i class="fas fa-sm fa-pen"></i></span>
<span>Guest post</span>
</span>
<br/>
{{ end -}}
{{ end }}
{{ end -}}
{{ with $auths }}
{{ T "post_byline_by" }}
{{ range $idx, $auth := $auths }}
{{ if .link }}
{{ with $authors -}}
{{ T "post_byline_by" }}
{{ range $idx, $auth := $authors }}
{{ if .link -}}
<a href="{{ .link }}"><b>{{ .name | markdownify }}</b></a>
{{ else }}
{{ else -}}
<b>{{ .name | markdownify }}</b>
{{ end }}
{{ with .position }} ({{ . | markdownify }}){{ end }}{{ if not (eq (len $auths) (add $idx 1)) }}, {{ end }}
{{ end -}}
{{ with .position }} ({{ . | markdownify }}){{ end }}{{ if not (eq (len $authors) (add $idx 1)) }}, {{ end -}}
{{ end }}
|
{{ end }}
{{ end -}}
<time datetime="{{ $.Date.Format "2006-01-02" }}" class="text-muted">{{ $.Date.Format $.Site.Params.time_format_blog }}</time>
</div>
@ -60,4 +60,4 @@
<div class="c-global-meta-links">
{{ partial "page-meta-links" .}}
</div>
</div>
</div>

View File

@ -1,7 +1,7 @@
{{/* This file is in place as an override to Docsy */}}
{{ define "main" }}
{{ with .Content }}
{{ . }}
{{ define "main" -}}
{{ with .Content -}}
{{ . -}}
{{ end -}}
{{ end }}
{{ end }}

View File

@ -1,6 +1,6 @@
{{/* This file is in place as an override to Docsy */}}
{{ define "main" }}
{{ define "main" -}}
<div class="td-content list-page">
<h1>{{ .Title }}</h1>
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}

View File

@ -1,6 +1,6 @@
{{/* This file is in place as an override to Docsy */}}
{{ define "main" }}
{{ define "main" -}}
<h1 class="mb-4 font-weight-bold">{{ .Title }}</h1>
<p class="lead pb-2">{{ .Description }}</p>
<div class="d-xl-none td-toc td-toc--inline d-print-none">
@ -10,4 +10,4 @@
<div class="c-global-meta-links">
{{ partial "page-meta-links" .}}
</div>
{{ end }}
{{ end }}

View File

@ -1,14 +1,14 @@
{{/* This file is in place as an override to Docsy */}}
{{/* This file is in place as an override to Docsy */ -}}
{{ if not .Parent.IsHome }}
{{ if not .Parent.IsHome -}}
<nav aria-label="breadcrumb" class="d-print-none">
<ol class="breadcrumb spb-1">
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</ol>
</nav >
{{ else }}
{{ else -}}
<div class="l-no-breadcrumb"></div>
{{ end }}
{{ end -}}
{{ define "breadcrumbnav" }}
{{ if .p1.Parent }}
@ -28,4 +28,4 @@
{{ end }}
</a>
</li>
{{ end }}
{{ end -}}

View File

@ -1,4 +1,4 @@
{{/* This file is in place as an override to Docsy */}}
{{/* This file is in place as an override to Docsy */ -}}
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/favicons/apple-touch-icon.png">

View File

@ -1,18 +1,18 @@
{{/* This file is in place as an override to Docsy */}}
{{/* This file is in place as an override to Docsy */ -}}
{{ $inServerMode := site.IsServer }}
{{ $includePaths := (slice "node_modules") }}
{{ $scssMain := "scss/main.scss"}}
{{ $cssOutput := "css/style.css" }}
{{ $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) }}
{{ $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") }}
{{ $cssOpts := cond $inServerMode $devOpts $prodOpts }}
{{ $css := resources.Get $scssMain | toCSS $cssOpts }}
{{ $inServerMode := site.IsServer -}}
{{ $includePaths := (slice "node_modules") -}}
{{ $scssMain := "scss/main.scss" -}}
{{ $cssOutput := "css/style.css" -}}
{{ $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) -}}
{{ $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") -}}
{{ $cssOpts := cond $inServerMode $devOpts $prodOpts -}}
{{ $css := resources.Get $scssMain | toCSS $cssOpts -}}
{{ if $inServerMode }}
{{ if $inServerMode -}}
<link href="{{ $css.RelPermalink }}" rel="stylesheet">
{{ else }}
{{ $prodCss := $css | postCSS | minify | fingerprint }}
{{ else -}}
{{ $prodCss := $css | postCSS | minify | fingerprint -}}
<link rel="preload" href="{{ $prodCss.RelPermalink }}" as="style">
<link href="{{ $prodCss.RelPermalink }}" rel="stylesheet" integrity="{{ $prodCss.Data.integrity }}">
{{ end }}
{{ end -}}

View File

@ -1,4 +1,4 @@
{{/* This file is in place as an override to Docsy */}}
{{/* This file is in place as an override to Docsy */ -}}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@ -21,22 +21,22 @@
{{ end -}}
{{ .Site.Title -}}
</title>
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ template "_internal/opengraph.html" . -}}
{{ template "_internal/google_news.html" . -}}
{{ template "_internal/schema.html" . -}}
{{ template "_internal/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" -}}
{{ template "_internal/google_analytics_async.html" . -}}
{{ end -}}
{{ partialCached "head-css.html" . "asdf" }}
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
{{ if .Site.Params.offlineSearch }}
{{ if .Site.Params.offlineSearch -}}
<script
src="https://unpkg.com/lunr@2.3.8/lunr.min.js"
integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY"
crossorigin="anonymous"></script>
{{end}}
{{ partial "hooks/head-end.html" . }}
{{ end -}}
{{ partial "hooks/head-end.html" . -}}

View File

@ -1,6 +1,6 @@
{{ $lang := lower ($.Page.Params.language | default $.Page.Params.title) }}
{{ $src_repo_url := $.Page.Params.src_repo | default (printf "https://github.com/grpc/grpc-%s" $lang) }}
{{ $src_repo_link := printf "[grpc-%s repo](%s)" $lang $src_repo_url }}
{{ $lang := lower ($.Page.Params.language | default $.Page.Params.title) -}}
{{ $src_repo_url := $.Page.Params.src_repo | default (printf "https://github.com/grpc/grpc-%s" $lang) -}}
{{ $src_repo_link := printf "[grpc-%s repo](%s)" $lang $src_repo_url -}}
{{ with .Page.Params.content -}}
<div class="row flex-col flex-md-row o-lang-home__list">
@ -22,4 +22,4 @@
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end -}}