Skip to content

Commit 2ea431c

Browse files
committed
Add bio for create speaker
Also added bio to speaker model. Fixes #65
1 parent 22593fc commit 2ea431c

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

create/speaker.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ type = "speaker"
2727
{{ with .Gitlab }}gitlab = "{{ . }}"{{ end }}
2828
{{ with .ImagePath }}image = "{{ . }}"{{ end }}
2929
+++
30-
Food-truck SpaceTeam pivot earned media agile big data entrepreneur actionable insight iterate unicorn convergence driven moleskine. User centered design piverate physical computing disrupt moleskine co-working fund pivot. Waterfall is so 2000 and late integrate responsive big data agile piverate affordances. Agile earned media pivot viral engaging thought leader prototype workflow.
31-
30+
{{ with .Bio }}{{.}}{{ end }}
3231
`
3332

3433
// CreateSpeaker takes input from the user to create a new speaker
@@ -72,6 +71,14 @@ func CreateSpeaker(speakerName, city, year string) (err error) {
7271
if err != nil {
7372
log.Fatal(err)
7473
}
74+
fmt.Println("You can enter a speaker bio. However, you might find it more useful edit the speaker's markdown file later for greater control.")
75+
bio, err := ui.Ask("Speaker Bio (optional)", &input.Options{
76+
Required: false,
77+
HideOrder: true,
78+
})
79+
if err != nil {
80+
log.Fatal(err)
81+
}
7582

7683
website, err := ui.Ask("Website (optional)", &input.Options{
7784
HideOrder: true,
@@ -200,6 +207,7 @@ func CreateSpeaker(speakerName, city, year string) (err error) {
200207
Github: github,
201208
Gitlab: gitlab,
202209
ImagePath: imagePath,
210+
Bio: bio,
203211
}
204212

205213
NewSpeaker(mySpeaker, city, year)

model/speaker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ type Speaker struct {
1111
Github string `toml:"github,omitempty"`
1212
Gitlab string `toml:"gitlab,omitempty"`
1313
ImagePath string `toml:"image,omitempty"`
14+
Bio string
1415
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
+++
2+
Title = "George Michael"
3+
type = "speaker"
4+
5+
6+
7+
8+
9+
10+
11+
+++
12+
Hello and "blah blah blah"

sampleData/content/events/2017-ponyville/speakers/matt-stratton.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ github = "mattstratton"
99
gitlab = "mattstratton"
1010
image = "matt-stratton.jpg"
1111
+++
12-
Food-truck SpaceTeam pivot earned media agile big data entrepreneur actionable insight iterate unicorn convergence driven moleskine. User centered design piverate physical computing disrupt moleskine co-working fund pivot. Waterfall is so 2000 and late integrate responsive big data agile piverate affordances. Agile earned media pivot viral engaging thought leader prototype workflow.
1312

0 commit comments

Comments
 (0)