From 2e6578a8f2ecf69e636aef96b8a107bcfeef730c Mon Sep 17 00:00:00 2001
From: Russ Cox "+key+" As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every application processing in the cloud, and requires programming languages “explicitly geared to develop highly reliable concurrent applications.”
- “{{.Inner | markdownify}}”
-
- {{- if .Get "search" -}}
- {{with .Get "text"}}{{.}}{{else}}View More >{{end}}
- {{- else -}}
- {{with .Get "text"}}{{.}}{{else}}View More >{{end}}
- {{- end -}}
-
- {{.Inner | markdownify -}}
- {{.Get "title"}} {{.Inner | markdownify -}} {{.Inner | markdownify -}} {{.Get "title"}} {{.Inner | markdownify -}}
- {{.Inner | markdownify}}
-
- {{.Inner | markdownify}}
-
- {{.Inner | markdownify -}}
-
- {{ . }}
-
+ “{{.quote | markdownify}}”
+
+ {{.quote | markdownify}}
+
+ {{.quote | markdownify}}
+
+ {{.}}
+ When developing CLIs in Go, two tools are widely used: Cobra & Viper.
-Cobra is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers most of the popular Go applications including CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and many more. With integrated command help, autocomplete and documentation “[it] makes documenting each command really simple,” says Alex Ellis, founder of OpenFaaS. Cobra is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers most of the popular Go applications including CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and many more. With integrated command help, autocomplete and documentation “[it] makes documenting each command really simple,” says Alex Ellis, founder of OpenFaaS.
-Viper is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper are designed to work together. Viper is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper are designed to work together. Viper supports nested structures in the configuration, allowing CLI developers to manage the configuration for multiple parts of a large application. Viper also provides all of the tooling need to easily build twelve factor apps.
-
", c.Name, c.Args, c.Keys, c.Inner)
-}
-
-func (c *ShortCode) Get(x interface{}) string {
- switch x := x.(type) {
- case int:
- if 0 <= x && x < len(c.Args) {
- return c.Args[x]
- }
- return ""
- case string:
- return c.Keys[x]
- }
- panic(fmt.Sprintf("bad Get %v", x))
-}
-
-func (c *ShortCode) IsNamedParams() bool {
- return len(c.Keys) != 0
-}
-
-// parseCodes parses the shortcode invocations in the Hugo markdown file.
-// It returns a slice containing only two types of elements: string and *ShortCode.
-// The even indexes are strings and the odd indexes are *ShortCode.
-// There are an odd number of elements (the slice begins and ends with a string).
-func (p *Page) parseCodes(markdown string) []interface{} {
- t1, c1, t2, kind1 := findCode(markdown)
- t2, c2, t3, kind2 := findCode(t2)
- var ret []interface{}
- for c1 != nil {
- c1.Kind = kind1
- c1.Page = p
- if c2 != nil && c2.Name == "/"+c1.Name {
- c1.Inner = template.HTML(t2)
- t2, c2, t3, kind2 = findCode(t3)
- continue
- }
- ret = append(ret, t1)
- ret = append(ret, c1)
- t1, c1, kind1 = t2, c2, kind2
- t2, c2, t3, kind2 = findCode(t3)
- }
- ret = append(ret, t1)
- return ret
-}
-
-func findCode(text string) (before string, code *ShortCode, after string, kind string) {
- end := "%}}"
- kind = "%"
- i := strings.Index(text, "{{%")
- j := strings.Index(text, "{{<")
- if i < 0 || j >= 0 && j < i {
- i = j
- kind = "<"
- end = ">}}"
- }
- if i < 0 {
- return text, nil, "", ""
- }
- j = strings.Index(text[i+3:], end)
- if j < 0 {
- return text, nil, "", ""
- }
- before, codeText, after := text[:i], text[i+3:i+3+j], text[i+3+j+3:]
- codeText = strings.TrimSpace(codeText)
- name, args, _ := cutAny(codeText, " \t\r\n")
- if name == "" {
- log.Fatalf("empty code")
- }
- args = strings.TrimSpace(args)
- code = &ShortCode{Name: name, Keys: make(map[string]string)}
- for args != "" {
- k, v := "", args
- if strings.HasPrefix(args, `"`) {
- goto Value
- }
- {
- i := strings.Index(args, "=")
- if i < 0 {
- goto Value
- }
- for j := 0; j < i; j++ {
- if args[j] == ' ' || args[j] == '\t' {
- goto Value
- }
- }
- k, v = args[:i], args[i+1:]
- }
- Value:
- v = strings.TrimSpace(v)
- if strings.HasPrefix(v, `"`) {
- j := 1
- for ; ; j++ {
- if j >= len(v) {
- log.Fatalf("unterminated quoted string: %s", args)
- }
- if v[j] == '"' {
- v, args = v[:j+1], v[j+1:]
- break
- }
- if v[j] == '\\' {
- j++
- }
- }
- u, err := strconv.Unquote(v)
- if err != nil {
- log.Fatalf("malformed k=v: %s=%s", k, v)
- }
- v = u
- } else {
- v, args, _ = cutAny(v, " \t\r\n")
- }
- if k == "" {
- code.Args = append(code.Args, v)
- } else {
- code.Keys[k] = v
- }
- args = strings.TrimSpace(args)
- }
- return
-}
-
-func cutAny(s, any string) (before, after string, ok bool) {
- if i := strings.IndexAny(s, any); i >= 0 {
- _, size := utf8.DecodeRuneInString(s[i:])
- return s[:i], s[i+size:], true
- }
- return s, "", false
-}
diff --git a/go.dev/content/about.md b/go.dev/content/about.md
index f52eaab5..90300125 100644
--- a/go.dev/content/about.md
+++ b/go.dev/content/about.md
@@ -6,7 +6,10 @@ draft: false
[Go.dev](https://go.dev) is a companion website to [golang.org](https://golang.org). [Golang.org](https://golang.org) is the home of the open source project and distribution, while [go.dev](https://go.dev) is the hub for Go users providing centralized and curated resources from across the Go ecosystem.
-{{% gopher gopher=pink align=right %}}
+{{gopher `
+ color: pink
+ align: right
+`}}
Go.dev provides:
1. Centralized information for Go packages and modules published on index.golang.org.
diff --git a/go.dev/content/post.md b/go.dev/content/post.md
deleted file mode 100644
index 57ce3b38..00000000
--- a/go.dev/content/post.md
+++ /dev/null
@@ -1,139 +0,0 @@
----
-title: 'Lorem Postum'
-date: 2019-06-25T17:51:23-04:00
-authors: ['Andrew Bonventre', 'Steve Francia']
-draft: true
----
-
-## Inminet facies saevit montis
-
-Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae
-[senex](http://sub.com/). Cecidisse inpediunt Romam, voluisse curru **saepe pro
-sola** poposcerat bracchia. Sanguine _discutiunt manu_, mihi armos? Dilata levia
-ab mira auxiliaria pennas Eumenidum lentoque inertem tantum stipite pompa.
-
-{{%pullquote author="Google dev manager"%}}
-Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae
-[senex](http://sub.com/). Cecidisse inpediunt Romam, voluisse curru **saepe pro
-sola** poposcerat bracchia. Sanguine _discutiunt manu_, mihi armos? Dilata levia
-ab mira auxiliaria pennas Eumenidum lentoque inertem tantum stipite pompa.
-{{%/pullquote%}}
-
-## Rex feritatis tamen seminaque aquas liceret nepos
-
-Pervenit ramos; quaterque panda, terra pedum blandita parte. Et vidisse illis
-loci crimen moratur **nomine**! Pelasgos discurrunt conata. Manu Hippomenes
-pecudis dixisse, hac, iunctam dixerat vita penetralia tempus praedivite Libycas.
-Feroci sacris Pitanen guttura despexitque candida fervebant curasque dies
-inhibere rapta.
-
-- Fulmina doctam deduxisse illo
-- Corpora o Pallade magno regia ignarus optime
-- Venenis et esse perimet
-- Mihi nocte
-- Gelidoque sit crevit
-
-## Quamquam nympha esse senex prior nec
-
-Longos et o reliquit [alterius](http://caelaratin.net/dixitexspes) canis
-praecordia nimiis, fiducia _non corpore_. Correptaque et venata illi! Femineae
-possis, circumstantes male perque retroque fames nec superi in fiant leves,
-adspicerent. Hasta spectabat est **vultum in** inficere subsidit hunc. Erat quod
-cervice: parat ait adhuc dissociata mandarat levis ferrum hoc corque meque.
-
-## Imaginis lora
-
-Et arte, versabat ne pater sibila; natus visa graves perque rustica! Caeli
-forma, Tres, clarum? Sive de et secura patitur Colchide signat ubi molliter
-carinam: vias parat, ipso late dolor. Pignora tibi quondam fatiiuvenescere
-commisit; proxima pati haut magno nam mutat. Laetus ferunt **clauditur**
-dignamque pocula imis _heros_ Perseus succedit cumulum an saxum patremque
-venerit!
-
- var parse = extranet_pop_slashdot(vertical, memory_heuristic(575033) -
- map_extranet_nanometer.ssid_cd_commerce(prebinding_icq, png_virtual,
- tag_mount));
- var leopard_shortcut = 3 + onlineAlphaBiometrics;
- kilobitLogicSsid = ad;
- if (storage - 1 > 3 + 3) {
- scroll(half_file * row, installerRefreshFriendly);
- } else {
- compile_big += exbibyte * white_bus_webmail;
- }
-
-_Avem linguam fecundus_ voce, mea haud paratior et telorum trahitur, causas iura
-dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias!
-
-{{%largeMedia
- title="_Avem linguam fecundus_ voce, mea haud"
- img-src="/images/google-logo.png"
- img-alt="Google."%}}
- Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae
- [senex](http://sub.com/).
-{{%/largeMedia%}}
-{{%largeMedia
- title="_Avem linguam fecundus_ voce, mea haud"
- img-src="/images/gophers/biplane.svg"
- img-alt="Gopher piloting a biplane."%}}
- Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae
- [senex](http://sub.com/).
-{{%/largeMedia%}}
-
-{{%mediaList%}}
- {{%mediaListItem title="Lorem ipsum dolor"
- img-src="/images/google-logo.png"
- img-alt="Google."%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
- {{%/mediaListItem%}}
- {{%mediaListItem title="Lorem ipsum dolor"
- img-src="/images/gophers/biplane.svg"
- img-alt="Gopher piloting a biplane."%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
- {{%/mediaListItem%}}
- {{%mediaListItem title="Lorem ipsum dolor"
- img-src="/images/google-logo.png"
- img-alt="Google."%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
- {{%/mediaListItem%}}
- {{%mediaListItem title="Lorem ipsum dolor"
- img-src="/images/gophers/biplane.svg"
- img-alt="Gopher piloting a biplane."%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
- {{%/mediaListItem%}}
-{{%/mediaList%}}
-
-{{%mediaList%}}
- {{%mediaListBox title="Lorem ipsum"
- img-src="/images/google-logo.png"
- img-alt="Google."%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- {{%/mediaListBox%}}
- {{%mediaListBox title="Lorem ipsum"
- img-src="/images/gophers/biplane.svg"
- img-alt="Gopher piloting a biplane."%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- {{%/mediaListBox%}}
- {{%mediaListBox title="Lorem ipsum"
- img-src="/images/learn/codecademy.png"
- img-alt="Google."%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- {{%/mediaListBox%}}
- {{%mediaListBox title="Lorem ipsum"
- img-src="/images/gophers/biplane.svg"
- img-alt="Gopher piloting a biplane."%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- {{%/mediaListBox%}}
-{{%/mediaList%}}
-
-{{%starItem title="Lorem ipsum dolor sit amet, consectetur"%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
- aliqua. Ut enim ad minim veniam,
-{{%/starItem%}}
-{{%starItem title="Lorem ipsum dolor sit amet, consectetur"%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
- aliqua. Ut enim ad minim veniam,
-{{%/starItem%}}
-{{%starItem title="Lorem ipsum dolor sit amet, consectetur"%}}
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
- aliqua. Ut enim ad minim veniam,
-{{%/starItem%}}
diff --git a/go.dev/content/solutions/americanexpress/index.md b/go.dev/content/solutions/americanexpress/index.md
index 3f3d106a..b2e44c22 100644
--- a/go.dev/content/solutions/americanexpress/index.md
+++ b/go.dev/content/solutions/americanexpress/index.md
@@ -9,11 +9,15 @@ series: Case Studies
quote: Go provides American Express with the speed and scalability it needs for both its payment and rewards networks.
---
-{{% pullquote author="Glen Balliet" title="Engineering Director of loyalty platforms" company="American Express" %}}
-What makes Go different from other programming languages is cognitive load. You can do more with less code, which makes it easier to reason about and understand the code that you do end up writing.
+{{pullquote `
+ author: Glen Balliet
+ title: Engineering Director of loyalty platforms
+ company: American Express
+ quote: |
+ What makes Go different from other programming languages is cognitive load. You can do more with less code, which makes it easier to reason about and understand the code that you do end up writing.
-The majority of Go code ends up looking quite similar, so, even if you’re working with a completely new codebase, you can get up and running pretty quickly.
-{{% /pullquote %}}
+ The majority of Go code ends up looking quite similar, so, even if you’re working with a completely new codebase, you can get up and running pretty quickly.
+`}}
## Go Improves Microservices and Speeds Productivity
@@ -55,9 +59,13 @@ Today, scores of developers are programming with Go at American Express, with mo
"Tooling has always been a critical area of need for our legacy code base," says Cane. "We have found that Go has excellent tooling, plus built-in testing, benchmarking, and profiling frameworks. It is easy to write efficient and resilient applications."
-{{% backgroundQuote author="Benjamin Cane" title="Vice President and Principal Engineer" company="American Express" %}}
-After working on Go, most of our developers don't want to go back to other languages.
-{{% /backgroundQuote %}}
+{{backgroundquote `
+ author: Benjamin Cane
+ title: Vice President and Principal Engineer
+ company: American Express
+ quote: |
+ After working on Go, most of our developers don't want to go back to other languages.
+`}}
American Express is just beginning to see the benefits of Go. For example, Go was designed from the ground up with concurrency in mind – using lightweight “goroutines” rather than heavier-weight operating system threads – making it practical to create hundreds of thousands of goroutines in the same address space. Using goroutines, American Express has seen improved performance numbers in its real-time transaction processing.
diff --git a/go.dev/content/solutions/clis/index.md b/go.dev/content/solutions/clis/index.md
index 041540cb..e91c9476 100644
--- a/go.dev/content/solutions/clis/index.md
+++ b/go.dev/content/solutions/clis/index.md
@@ -136,35 +136,38 @@ Specifically, **programs written in Go run on any system without requiring any e
### Use Go for building elegant CLIs
-{{< backgroundQuote author="Steve Domino" title="senior engineer and architect at Strala" link="https://medium.com/@skdomino/writing-better-clis-one-snake-at-a-time-d22e50e60056" >}}
-I was tasked with building our CLI tool and found two really great projects, Cobra and Viper, which make building CLI’s easy. Individually they are very powerful, very flexible and very good at what they do. But together they will help you show your next CLI who is boss!
-{{< /backgroundQuote >}}
-
-{{< backgroundQuote author="Francesc Campoy" title="VP of product at DGraph Labs and producer of Just For Func videos" link="https://www.youtube.com/watch?v=WvWPGVKLvR4" >}}
-Cobra is a great product to write small tools or even large ones. It’s more of a framework than a library, because when you call the binary that would create a skeleton, then you would be adding code in between.”
-{{< /backgroundQuote >}}
+{{backgroundquote `
+ author: Steve Domino
+ title: senior engineer and architect at Strala
+ link: https://medium.com/@skdomino/writing-better-clis-one-snake-at-a-time-d22e50e60056
+ quote: |
+ I was tasked with building our CLI tool and found two really great projects, Cobra and Viper, which make building CLI’s easy. Individually they are very powerful, very flexible and very good at what they do. But together they will help you show your next CLI who is boss!
+`}}
+
+{{backgroundquote `
+ author: Francesc Campoy
+ title: VP of product at DGraph Labs and producer of Just For Func videos
+ link: https://www.youtube.com/watch?v=WvWPGVKLvR4
+ quote: |
+ Cobra is a great product to write small tools or even large ones. It’s more of a framework than a library, because when you call the binary that would create a skeleton, then you would be adding code in between.”
+`}}
When developing CLIs in Go, two tools are widely used: Cobra & Viper.
- {{< pkg "github.com/spf13/cobra" Cobra >}} is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers most of the popular Go applications including CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and [many more](https://pkg.go.dev/github.com/spf13/cobra?tab=importedby). With integrated command help, autocomplete and documentation “[it] makes documenting each command really simple,” says [Alex Ellis](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/), founder of OpenFaaS.
+{{pkg "github.com/spf13/cobra" "Cobra"}} is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers most of the popular Go applications including CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and [many more](https://pkg.go.dev/github.com/spf13/cobra?tab=importedby). With integrated command help, autocomplete and documentation “[it] makes documenting each command really simple,” says [Alex Ellis](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/), founder of OpenFaaS.
- {{< pkg "github.com/spf13/viper" Viper >}} is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper are designed to work together.
+{{pkg "github.com/spf13/viper" "Viper"}} is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper are designed to work together.
Viper [supports nested structures](https://scene-si.org/2017/04/20/managing-configuration-with-viper/) in the configuration, allowing CLI developers to manage the configuration for multiple parts of a large application. Viper also provides all of the tooling need to easily build twelve factor apps.
"If you don’t want to pollute your command line, or if you’re working with sensitive data which you don’t want to show up in the history, it’s a good idea to work with environment variables. To do this, you can use Viper," [suggests Geudens](https://ordina-jworks.github.io/development/2018/10/20/make-your-own-cli-with-golang-and-cobra.html).
-{{< rawhtml >}}Go helps enterprises build and scale cloud computing systems
-
-{{< /rawhtml >}}
## Modernizing PayPal systems with Go
@@ -50,9 +52,12 @@ Security and supportability are key matters at PayPal, and the company’s opera
As PayPal continues to modernize their software-defined networking (SDN) infrastructure with Go, they are seeing performance benefits in addition to more maintainable code. For example, Go now powers routers, load balances, and an increasing number of production systems.
-{{% backgroundQuote author="Bala Natarajan" title="Sr. Director of Engineering" %}}
-In our tightly managed environments where we run Go code, we have seen a CPU reduction of approximately ten percent with cleaner and maintainable code.
-{{% /backgroundQuote %}}
+{{backgroundquote `
+ author: Bala Natarajan
+ title: Sr. Director of Engineering
+ quote: |
+ In our tightly managed environments where we run Go code, we have seen a CPU reduction of approximately ten percent with cleaner and maintainable code.
+`}}
## Go increases developer productivity
diff --git a/go.dev/content/solutions/webdev/index.md b/go.dev/content/solutions/webdev/index.md
index 8787dc95..eaf0b54d 100644
--- a/go.dev/content/solutions/webdev/index.md
+++ b/go.dev/content/solutions/webdev/index.md
@@ -191,24 +191,20 @@ Tigran Bayburtsyan, Co-Founder and CTO at Hexact Inc., summarizes five key reaso
- **Great IDE support and debugging** — “After rewriting all projects to Go, we got 64 percent less code than we had earlier.”
-{{< rawhtml >}}
- {{range $books}}
-
\ No newline at end of file
diff --git a/go.dev/layouts/shortcodes/featuredProjects.html b/go.dev/layouts/shortcodes/featuredProjects.html
deleted file mode 100644
index 9d0be58c..00000000
--- a/go.dev/layouts/shortcodes/featuredProjects.html
+++ /dev/null
@@ -1,43 +0,0 @@
-{{$featuredProjects := .Page.Param "featuredProjects"}}
-
-
- {{end}}
-
- {{.title}}
-
-
-
-
-
-
-
diff --git a/go.dev/layouts/shortcodes/goLibraries.html b/go.dev/layouts/shortcodes/goLibraries.html
deleted file mode 100644
index a0062a3d..00000000
--- a/go.dev/layouts/shortcodes/goLibraries.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{{$goLibraries := .Page.Param "goLibraries"}}
-
-{{range $goLibraries}}
-
-{{end}}
\ No newline at end of file
diff --git a/go.dev/layouts/shortcodes/gopher.html b/go.dev/layouts/shortcodes/gopher.html
deleted file mode 100644
index f0cd021e..00000000
--- a/go.dev/layouts/shortcodes/gopher.html
+++ /dev/null
@@ -1,114 +0,0 @@
-{{ $src := "/images/gophers/wrench.svg"}}
-{{ $alt := "Go gophers with wrench"}}
-{{ $size := "Large"}}
-{{ $align := "Left"}}
-{{ $gopher := .Get "gopher"}}
-{{ $sizeIn := .Get "size"}}
-
-{{if eq (.Get "align") "right" "Right"}}
- {{$align = "Right"}}
-{{end}}
-
-{{if eq $sizeIn "XLarge" "xl" "xlarge"}}
- {{$size = "XLarge"}}
-{{end}}
-
-{{if eq $gopher "plane"}}
- {{$src = "/images/gophers/biplane.svg"}}
- {{$alt = "Go gopher in a plane"}}
-{{end}}
-{{if eq $gopher "blue"}}
- {{$src = "/images/gophers/blue.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "front" "sticker1"}}
- {{$src = "/images/gophers/front.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "graduate"}}
- {{$src = "/images/gophers/graduate.svg"}}
- {{$alt = "Go gopher graduating"}}
-{{end}}
-{{if eq $gopher "graduate-colorized"}}
- {{$src = "/images/gophers/graduate-colorized.svg"}}
- {{$alt = "Go gopher graduating"}}
-{{end}}
-{{if eq $gopher "green"}}
- {{$src = "/images/gophers/green.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "grey" "gray"}}
- {{$src = "/images/gophers/grey.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "happy" "sticker2"}}
- {{$src = "/images/gophers/happy.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "headlamp"}}
- {{$src = "/images/gophers/headlamp.svg"}}
- {{$alt = "Go gopher with headlamp"}}
-{{end}}
-{{if eq $gopher "headlamp-colorized"}}
- {{$src = "/images/gophers/headlamp-colorized.svg"}}
- {{$alt = "Go gopher with headlamp"}}
-{{end}}
-{{if eq $gopher "ladder"}}
- {{$src = "/images/gophers/ladder.svg"}}
- {{$alt = "Go gopher with ladder"}}
-{{end}}
-{{if eq $gopher "machine"}}
- {{$src = "/images/gophers/machine.svg"}}
- {{$alt = "Go gophers with a machine"}}
-{{end}}
-{{if eq $gopher "machine-colorized"}}
- {{$src = "/images/gophers/machine-colorized.svg"}}
- {{$alt = "Go gopher with a machine"}}
-{{end}}
-{{if eq $gopher "megaphone"}}
- {{$src = "/images/gophers/megaphone.svg"}}
- {{$alt = "Go gopher with a megaphone"}}
-{{end}}
-{{if eq $gopher "peach"}}
- {{$src = "/images/gophers/peach.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "pilot-bust"}}
- {{$src = "/images/gophers/pilot-bust.svg"}}
- {{$alt = "Go gopher pilot"}}
-{{end}}
-{{if eq $gopher "pink"}}
- {{$src = "/images/gophers/pink.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "running"}}
- {{$src = "/images/gophers/running.svg"}}
- {{$alt = "Go gopher running"}}
-{{end}}
-{{if eq $gopher "slate"}}
- {{$src = "/images/gophers/slate.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "wrench"}}
- {{$src = "/images/gophers/wrench.svg"}}
- {{$alt = "gopher with a wrench"}}
-{{end}}
-{{if eq $gopher "yellow"}}
- {{$src = "/images/gophers/yellow.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "violet"}}
- {{$src = "/images/gophers/violet.svg"}}
- {{$alt = "Go gopher"}}
-{{end}}
-{{if eq $gopher "factory"}}
- {{$src = "/images/gophers/factory.png"}}
- {{$alt = "Go gopher factory"}}
-{{end}}
-
-
-
-
-
-
-
- {{range $index, $project := $featuredProjects}}
- Customer
- Brief introduction
- Projects using go
-
-
- {{end}}
-
-
-
-
-
-
-
- {{.desc}}
-
-
-
- {{range .ctas}}
-
-
\ No newline at end of file
diff --git a/go.dev/layouts/shortcodes/headerWithLink.html b/go.dev/layouts/shortcodes/headerWithLink.html
deleted file mode 100644
index 8fe3550a..00000000
--- a/go.dev/layouts/shortcodes/headerWithLink.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- {{- . | markdownify -}}
-
- {{end}}
-
- {{.Inner}}
-
\ No newline at end of file
diff --git a/go.dev/layouts/shortcodes/mediaList.html b/go.dev/layouts/shortcodes/mediaList.html
deleted file mode 100644
index 1d11acb9..00000000
--- a/go.dev/layouts/shortcodes/mediaList.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
- {{.Inner}}
-
diff --git a/go.dev/layouts/shortcodes/mediaListBox.html b/go.dev/layouts/shortcodes/mediaListBox.html
deleted file mode 100644
index e2979a01..00000000
--- a/go.dev/layouts/shortcodes/mediaListBox.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
- {{- with .Get "img-link"}}{{end}}
-
-
{{.Get "title"}}
-
-
-
\ No newline at end of file
diff --git a/go.dev/layouts/shortcodes/mediaTableItem.html b/go.dev/layouts/shortcodes/mediaTableItem.html
deleted file mode 100644
index 3b9ca828..00000000
--- a/go.dev/layouts/shortcodes/mediaTableItem.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- {{.Inner}}
-
-Customer
- Breif introduction
- Projects using go
-
-
\ No newline at end of file
diff --git a/go.dev/layouts/shortcodes/pkg.html b/go.dev/layouts/shortcodes/pkg.html
deleted file mode 100644
index 333b6d02..00000000
--- a/go.dev/layouts/shortcodes/pkg.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{{- $link := .Get 0 -}}
-{{- $link = replace $link "https://" ""}}
-{{- $link = replace $link "http://" ""}}
-{{- $label := or (.Get 1) (.Get 0) -}}
-{{- if not (.Get 1) -}}
- {{- $name := path.Base $label -}}
- {{- $owner := path.Base (path.Dir $label) -}}
- {{- $label = path.Join $owner $name -}}
-{{end}}
-{{$label}}
\ No newline at end of file
diff --git a/go.dev/layouts/shortcodes/pullquote.html b/go.dev/layouts/shortcodes/pullquote.html
deleted file mode 100644
index 81ccab54..00000000
--- a/go.dev/layouts/shortcodes/pullquote.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
- {{with .Get "img-link"}}
-
- {{end -}}
-
-
- {{- with .Get "img-link"}}{{end}}
-
-
-
-
- {{- .Get "title" | markdownify -}}
-
-
- {{.title}}
-
- {{range .paragraphs}}
-
+ {{range $books}}
+
+{{end}}
diff --git a/go.dev/templates/gopher.tmpl b/go.dev/templates/gopher.tmpl
new file mode 100644
index 00000000..5fcd14a5
--- /dev/null
+++ b/go.dev/templates/gopher.tmpl
@@ -0,0 +1,116 @@
+{{define "gopher info" -}}
+{{- with (yaml .info)}}
+{{- $src := "/images/gophers/wrench.svg"}}
+{{- $alt := "Go gophers with wrench"}}
+{{- $size := "Large"}}
+{{- $align := "Left"}}
+{{- $gopher := .color}}
+{{- $sizeIn := (or .size "")}}
+
+{{- if eq (.align) "right" "Right"}}
+ {{- $align = "Right"}}
+{{- end}}
+
+{{- if eq $sizeIn "XLarge" "xl" "xlarge"}}
+ {{- $size = "XLarge"}}
+{{- end}}
+
+{{- if eq $gopher "plane"}}
+ {{- $src = "/images/gophers/biplane.svg"}}
+ {{- $alt = "Go gopher in a plane"}}
+{{- end}}
+{{- if eq $gopher "blue"}}
+ {{- $src = "/images/gophers/blue.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "front" "sticker1"}}
+ {{- $src = "/images/gophers/front.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "graduate"}}
+ {{- $src = "/images/gophers/graduate.svg"}}
+ {{- $alt = "Go gopher graduating"}}
+{{- end}}
+{{- if eq $gopher "graduate-colorized"}}
+ {{- $src = "/images/gophers/graduate-colorized.svg"}}
+ {{- $alt = "Go gopher graduating"}}
+{{- end}}
+{{- if eq $gopher "green"}}
+ {{- $src = "/images/gophers/green.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "grey" "gray"}}
+ {{- $src = "/images/gophers/grey.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "happy" "sticker2"}}
+ {{- $src = "/images/gophers/happy.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "headlamp"}}
+ {{- $src = "/images/gophers/headlamp.svg"}}
+ {{- $alt = "Go gopher with headlamp"}}
+{{- end}}
+{{- if eq $gopher "headlamp-colorized"}}
+ {{- $src = "/images/gophers/headlamp-colorized.svg"}}
+ {{- $alt = "Go gopher with headlamp"}}
+{{- end}}
+{{- if eq $gopher "ladder"}}
+ {{- $src = "/images/gophers/ladder.svg"}}
+ {{- $alt = "Go gopher with ladder"}}
+{{- end}}
+{{- if eq $gopher "machine"}}
+ {{- $src = "/images/gophers/machine.svg"}}
+ {{- $alt = "Go gophers with a machine"}}
+{{- end}}
+{{- if eq $gopher "machine-colorized"}}
+ {{- $src = "/images/gophers/machine-colorized.svg"}}
+ {{- $alt = "Go gopher with a machine"}}
+{{- end}}
+{{- if eq $gopher "megaphone"}}
+ {{- $src = "/images/gophers/megaphone.svg"}}
+ {{- $alt = "Go gopher with a megaphone"}}
+{{- end}}
+{{- if eq $gopher "peach"}}
+ {{- $src = "/images/gophers/peach.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "pilot-bust"}}
+ {{- $src = "/images/gophers/pilot-bust.svg"}}
+ {{- $alt = "Go gopher pilot"}}
+{{- end}}
+{{- if eq $gopher "pink"}}
+ {{- $src = "/images/gophers/pink.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "running"}}
+ {{- $src = "/images/gophers/running.svg"}}
+ {{- $alt = "Go gopher running"}}
+{{- end}}
+{{- if eq $gopher "slate"}}
+ {{- $src = "/images/gophers/slate.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "wrench"}}
+ {{- $src = "/images/gophers/wrench.svg"}}
+ {{- $alt = "gopher with a wrench"}}
+{{- end}}
+{{- if eq $gopher "yellow"}}
+ {{- $src = "/images/gophers/yellow.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "violet"}}
+ {{- $src = "/images/gophers/violet.svg"}}
+ {{- $alt = "Go gopher"}}
+{{- end}}
+{{- if eq $gopher "factory"}}
+ {{- $src = "/images/gophers/factory.png"}}
+ {{- $alt = "Go gopher factory"}}
+{{- end}}
+
+ {{end}}
+
+ {{.title}}
+
+
+
+{{- end}}
+{{- end}}
diff --git a/go.dev/templates/libraries.tmpl b/go.dev/templates/libraries.tmpl
new file mode 100644
index 00000000..f13b10bd
--- /dev/null
+++ b/go.dev/templates/libraries.tmpl
@@ -0,0 +1,20 @@
+{{define "libraries"}}
+{{$goLibraries := .Param "goLibraries"}}
+
+{{range $goLibraries}}
+
+{{end}}
+{{end}}
diff --git a/go.dev/templates/pkg.tmpl b/go.dev/templates/pkg.tmpl
new file mode 100644
index 00000000..19d76302
--- /dev/null
+++ b/go.dev/templates/pkg.tmpl
@@ -0,0 +1,3 @@
+{{define "pkg path name?" -}}
+{{or .name .path}}
+{{- end}}
diff --git a/go.dev/templates/projects.tmpl b/go.dev/templates/projects.tmpl
new file mode 100644
index 00000000..2f9d07e1
--- /dev/null
+++ b/go.dev/templates/projects.tmpl
@@ -0,0 +1,51 @@
+{{define "projects"}}
+{{$featuredProjects := .Param "featuredProjects"}}
+
+
Featured users
+
+
+
+
+
+
+
+
+
+
+
+ {{- range $index, $project := $featuredProjects}}
+ Customer
+ Brief introduction
+ Projects using go
+
+
+ {{- end}}
+
+
+
+
+
+
+
+ {{.desc}}
+
+
+
+ {{- range .ctas}}
+
+
+
+ {{.title}}
+
+ {{- range .paragraphs}}
+
Use Go for building elegant CLIs
-
-
+Go books for creating CLIs
-
View More
-
-
-
+ src="/images/gophers/factory.png">
-