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

github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Reddington <791642+chrisreddington@users.noreply.github.com>2021-01-02 03:01:36 +0300
committerGitHub <noreply@github.com>2021-01-02 03:01:36 +0300
commitae4829556267548be35c41bfe60f098d2e05a9f9 (patch)
tree3ed22d39b5666212fb00e4a4503099d0123fe082
parent9b222b3abf1c60279c8fe6433fec450c70d13e69 (diff)
Initial implementation for pronouns (#312)
Signed-off-by: Chris Reddington <791642+chrisreddington@users.noreply.github.com>
-rw-r--r--REFERENCE.md3
-rw-r--r--archetypes/guest.md1
-rw-r--r--archetypes/host.md1
-rw-r--r--exampleSite/content/guest/cadams.md2
-rw-r--r--exampleSite/content/host/mstratton.md2
-rw-r--r--layouts/episode/single.html4
-rw-r--r--layouts/guest/list.html2
-rw-r--r--layouts/guest/single.html4
-rw-r--r--layouts/host/single.html4
-rw-r--r--layouts/partials/hosts.html2
10 files changed, 15 insertions, 10 deletions
diff --git a/REFERENCE.md b/REFERENCE.md
index db660c5..12cd869 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -129,6 +129,7 @@ We use the "authors" from the configuration to list hosts in the jumbotron or si
| Field Name | Required | Description | Example |
|-------------|----------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | Yes | The full name of the author/host. | "Matt Stratton" |
+| `Pronouns` | no | The preferred pronoun of the author/host. | "She/Her", "He/him", "They/Them" |
| `thumbnail` | Yes | The image for the user. This can either be a fully qualifed URL, or relative to the baseURL. | "http://www.arresteddevops.com/matt.png" or "img/hosts/matt.png" |
| `bio` | Yes | The author/host bio. Supports Markdown. | "Matt Stratton is a solutions architect at Chef, where he demonstrates how Chef’s automation platform provides speed and flexibility to clients’ infrastructure. He is devoted to concepts like Continuous Delivery and Infrastructure as Code, and his license plate actually says “DevOps”. He lives in Chicago and has an unhealthy obsession with Doctor Who, Firefly, and Game of Thrones. And whiskey." |
@@ -393,6 +394,7 @@ A guest file takes the following structure:
```
+++
Title = "John Doe"
+Pronouns = "They/Them"
Twitter = "johndoe"
Website = "http://www.google.com"
Type = "guest"
@@ -411,6 +413,7 @@ Spoon fresh pie ingredients groceries oranges luncheon farm. Broth chick peas Ch
| Field Name | Required | Description | Example |
|-------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| `Title` | Yes | The full name of the guest. This is what is displayed on the episode page, etc. | "Jane Smith" |
+| `Pronouns` | no | The preferred pronoun of the author/host. | "She/Her", "He/him", "They/Them" |
| `Thumbnail` | No | The image for the guest. This image must be 500 px x 500 px. You can either enter a value relative to your `BaseURL`, or a fully qualified URL. If you want to use the default, set this to `""`. Optional. If left blank, or not existent, a default image will be provided. You can replace this default image by putting a new 500 px x 500 px PNG image at `/static/img/guest/default-guest.png` in your site (not in the theme!). Please ensure that this path does NOT start with `/` | "img/guest/jane-smith.png" |
| `Website` | No | The guest's website. Be use to includ http(s) at the beginning. | "https://www.mattstratton.com" |
| `GitHub` | No | Guest's GitHub username. | "mattstratton" |
diff --git a/archetypes/guest.md b/archetypes/guest.md
index 2608f36..fad1e6d 100644
--- a/archetypes/guest.md
+++ b/archetypes/guest.md
@@ -1,6 +1,7 @@
+++
Date = {{ .Date }}
title = ""
+Pronouns = ""
Twitter = ""
Website = ""
Type = "guest"
diff --git a/archetypes/host.md b/archetypes/host.md
index 27133a2..70bb3da 100644
--- a/archetypes/host.md
+++ b/archetypes/host.md
@@ -1,6 +1,7 @@
+++
Date = {{ .Date }}
title = ""
+Pronouns = "He/Him"
Twitter = ""
Website = ""
Type = "host"
diff --git a/exampleSite/content/guest/cadams.md b/exampleSite/content/guest/cadams.md
index 7874241..b907abc 100644
--- a/exampleSite/content/guest/cadams.md
+++ b/exampleSite/content/guest/cadams.md
@@ -1,12 +1,12 @@
+++
Title = "Carl Adams"
date = "2017-06-10T09:12:37-05:00"
+Pronouns = "They/Them"
Twitter = "@illum"
Website = "http://Oyoba.org"
Type = "guest"
Facebook = "expedita"
Linkedin = "enim"
-Pronouns = ""
GitHub = "sunt"
Thumbnail = "img/guest/cadams.jpg"
Pinterest = ""
diff --git a/exampleSite/content/host/mstratton.md b/exampleSite/content/host/mstratton.md
index 598c3ad..bf16cf4 100644
--- a/exampleSite/content/host/mstratton.md
+++ b/exampleSite/content/host/mstratton.md
@@ -6,7 +6,7 @@ Website = "http://www.google.com/"
Type = "host"
Facebook = ""
Linkedin = "mattstratton"
-Pronouns = ""
+Pronouns = "He/Him"
GitHub = "mattstratton"
Thumbnail = "img/host/matt.png"
Pinterest = "mattstratton"
diff --git a/layouts/episode/single.html b/layouts/episode/single.html
index 58b894e..c4cb99b 100644
--- a/layouts/episode/single.html
+++ b/layouts/episode/single.html
@@ -132,7 +132,7 @@
{{- end -}}
</div>
<div class="col-md-8">
- <h2><a href = "{{(printf "guest/%s/" .File.BaseFileName) | absURL }}">{{ .Title }}</a></h2>
+ <h2><a href = "{{(printf "guest/%s/" .File.BaseFileName) | absURL }}">{{ .Title }}</a> {{ with .Params.Pronouns }}({{ . }}){{ end }}</h2>
{{ .Content }}
{{- with .Params.Website -}}
<a href="{{ . }}">
@@ -251,7 +251,7 @@
{{- end -}}
</div>
<div class="col-md-8">
- <h2><a href = "{{(printf "host/%s/" .File.BaseFileName) | absURL }}">{{ .Title }}</a></h2>
+ <h2><a href = "{{(printf "host/%s/" .File.BaseFileName) | absURL }}">{{ .Title }}</a> {{ with .Params.Pronouns }}({{ . }}){{ end }}</h2>
{{ .Content }}
{{- with .Params.Website -}}
<a href="{{ . }}">
diff --git a/layouts/guest/list.html b/layouts/guest/list.html
index 49a8660..5f752ff 100644
--- a/layouts/guest/list.html
+++ b/layouts/guest/list.html
@@ -40,7 +40,7 @@
{{- end -}}
</div>
<div class= "col-md-6">
- <h3><a href = "{{(printf "guest/%s/" .File.BaseFileName) | absURL }}">{{ .Title }}</a></h3>
+ <h3><a href = "{{(printf "guest/%s/" .File.BaseFileName) | absURL }}">{{ .Title }}</a> {{ with .Params.Pronouns }}({{ . }}){{ end }}</h3>
<p>{{ .Content }}</p>
{{ with .Params.Website }}
<a href = "{{ . }}"><i class="fas fa-home fa-2x"></i></a>
diff --git a/layouts/guest/single.html b/layouts/guest/single.html
index f058f60..e4d851b 100644
--- a/layouts/guest/single.html
+++ b/layouts/guest/single.html
@@ -2,7 +2,7 @@
<div class = "hero_container">
<div class="row">
<div class="col">
- <h1>{{ title .Title }}</h1>
+ <h1>{{ title .Title }} {{ with .Params.Pronouns }}({{ . }}){{ end }}</h1>
</div>
</div>
{{ .Scratch.Delete "guest-names" }}
@@ -82,7 +82,7 @@
<div class="col-lg-4">
<div class = "row">
<div class="col">
- <h3>Episodes Featuring {{ .Title }}</h3>
+ <h3>Episodes Featuring {{ .Title }} {{ with .Params.Pronouns }}({{ . }}){{ end }}</h3>
{{- with .Params.guest_group -}}
{{- range where $.Site.Pages "Params.guest_group" . -}}
diff --git a/layouts/host/single.html b/layouts/host/single.html
index 92d42a9..0b000c6 100644
--- a/layouts/host/single.html
+++ b/layouts/host/single.html
@@ -2,7 +2,7 @@
<div class = "hero_container">
<div class="row">
<div class="col">
- <h1>{{ title .Title }}</h1>
+ <h1>{{ title .Title }} {{ with .Params.Pronouns }}({{ . }}){{ end }}</h1>
</div>
</div>
@@ -81,7 +81,7 @@
<div class="col-lg-4">
<div class = "row">
<div class="col">
- <h3>Episodes Hosted By {{ .Title }}</h3>
+ <h3>Episodes Hosted By {{ .Title }} {{ with .Params.Pronouns }}({{ . }}){{ end }}</h3>
<div class="list-group guest_episode_list">
{{ $.Scratch.Set "host-name" .File.BaseFileName }}
{{ range $page := (where ( where site.RegularPages "Type" "in" site.Params.mainSections) ".Params.upcoming" "!=" true ) }}
diff --git a/layouts/partials/hosts.html b/layouts/partials/hosts.html
index ac76bb7..79f1e1a 100644
--- a/layouts/partials/hosts.html
+++ b/layouts/partials/hosts.html
@@ -21,7 +21,7 @@
{{- end -}}
</div>
<div class= "col-md-6">
- <h3><a href = "{{(printf "host/%s/" .File.BaseFileName) | absURL }}">{{ .Title }}</a></h3>
+ <h3><a href = "{{(printf "host/%s/" .File.BaseFileName) | absURL }}">{{ .Title }}</a> {{ with .Params.Pronouns }}({{ . }}){{ end }}</h3>
<p>{{ .Content }}</p>
{{ with .Params.Website }}
<a href = "{{ . }}"><i class="fas fa-home fa-2x"></i></a>