Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugoDocs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2022-11-12 08:38:50 +0300
committerGitHub <noreply@github.com>2022-11-12 08:38:50 +0300
commitb04a4b32e2dc10c674baaeadd98e16b455fea0e6 (patch)
tree8ab49d81f994b65f4dbe4dbf979ae6fb968709a6
parentdbf00a81f74543bdd86fef744262df830d58a855 (diff)
Make CLI command summaries meaningful (#1886)
Closes #109
-rw-r--r--layouts/partials/boxes-section-summaries.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/layouts/partials/boxes-section-summaries.html b/layouts/partials/boxes-section-summaries.html
new file mode 100644
index 000000000..7568539e4
--- /dev/null
+++ b/layouts/partials/boxes-section-summaries.html
@@ -0,0 +1,39 @@
+<div class="relative {{ .classes }} weight-{{ .context.Weight }}">
+
+ <div class="bg-white mb2 pa3 pa4-l gray">
+ {{ if eq .context.Section "news" }}
+ <date class="f6 db" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
+ {{ .context.Date.Format "January 2, 2006" }}
+ </date>
+ {{ end }}
+
+ <h1 class="near-black f3">
+ <a href="{{ .context.RelPermalink }}" class="link primary-color dim">
+ {{- if eq .context.Section "functions" -}}
+ {{ .context.LinkTitle }}
+ {{- else -}}
+ {{ .context.Title }}
+ {{- end -}}
+ </a>
+ </h1>
+
+ <div class="lh-copy links">
+ {{ if eq .context.Section "commands" }}
+ {{ replaceRE `(?s).*?##\s.*?\n\n(.*?)\n.*` "$1" .context.RawContent }}
+ {{ else }}
+ {{ if .context.Params.description }}
+ {{ .context.Params.description | markdownify }}
+ {{ else }}
+ {{ .context.Summary }}
+ {{ end }}
+ {{ end }}
+
+ <a href="{{ .context.RelPermalink }}" class="f6 mt2 db link primary-color dim">
+ Read More &raquo;
+ </a>
+
+ </div>
+
+
+ </div>
+</div>