Skip to content

Commit

Permalink
change cookbook list template to use intro field
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed Apr 2, 2017
1 parent 76c2cb6 commit b8771ce
Show file tree
Hide file tree
Showing 31 changed files with 96 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/hugosite2/content/cookbook/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
+++
title = "cookbook"
+++
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title = "accepting multi body types"
menu = "accepting multi body types"
tags = ["content negotiation"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "building fake servers"
tags = ["fake", "contract", "testing", "client"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/combining-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "combining modules"
tags = ["module"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/dynamic-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "dynamic path elements"
tags = ["path", "basics", "contract", "route"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "full auto service wrappers"
tags = ["circe", "auto", "marshalling", "json", "message format", "filter", "route", "auto"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/handlebars.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "handlebars"
tags = ["web", "templating", "handlebars"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/helloworld.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "helloworld"
tags = ["getting started"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/http-clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "http clients"
tags = ["client", "ssl", "secure", "finagle api", "getting started"]
categories = ["recipe"]
intro = "asd"
+++

Unlike traditional HTTP client libraries, **Finagle HTTP clients are configured to only talk to a single service** using one or more hosts that are known at creation time of that client.
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/module-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "module filters"
tags = ["module", "filter"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/msgpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "msgpack"
tags = ["msgpack", "message format"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/multipart-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "multipart forms"
tags = ["form", "web", "multipart", "contract"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/multipart-web-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "multipart web forms"
tags = ["form", "web", "multipart", "contract"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/mustache.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "mustache"
tags = ["web", "templating", "mustache"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/patching-endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "patching endpoint"
tags = ["circe", "patch", "route"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/security-custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "custom security"
tags = ["security", "filter", "contract"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/security-oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "oauth security"
tags = ["security", "filter", "contract"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "semi-auto body marshalling"
tags = ["body", "contract", "json", "filter", "auto"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "services and filters"
tags = ["server", "client", "service", "filter", "finagle api"]
categories = ["recipe"]
intro = "asd"
+++

At it's core, Finagle relies on 2 concepts for implementing HTTP services, `Service` and `Filter`. These are documented [elsewhere](#reading). but elow is a brief overview with code examples.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "serving multiple content types"
tags = ["content negotiation"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "serving static content"
tags = ["web", "static"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/simple-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "simple forms"
tags = ["form", "web"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/simple-html.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "html"
tags = ["web", "html"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/simple-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "json"
tags = ["json", "message format"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "simple request parameters"
tags = ["getting started", "request", "contract"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "typesafe http clients"
tags = ["contract", "client"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/simple-xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "xml"
tags = ["message format", "xml"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/streaming-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "streaming responses"
tags = ["streaming", "finagle api"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/swagger-auto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "auto-documentation with swagger"
tags = ["swagger", "openapi", "docs"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
1 change: 1 addition & 0 deletions src/main/hugosite2/content/cookbook/web-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title = "web forms"
tags = ["web", "form"]
categories = ["recipe"]
intro = "asd"
+++

```scala
Expand Down
64 changes: 64 additions & 0 deletions src/main/hugosite2/layouts/section/cookbook.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">

{{ partial "head.html" . }}
<body>
<div id="all">
<header>
{{ partial "nav.html" . }}
</header>
{{ partial "breadcrumbs.html" . }}
<div id="content">
<div class="container">
<div class="row">
<div class="col-md-9" id="cookbook-listing-medium">
{{ $paginator := .Paginate (where .Data.Pages "Type" "cookbook") }}
{{ range $paginator.Pages }}
<section class="post">
<div class="row">
<div class="col-md-12">
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="clearfix">
<p class="author-category">
{{ if isset .Params "author" }}
By <a href="#">{{ .Params.author }}</a>
{{ end }}
{{ if isset .Params "categories" }}
{{ if gt (len .Params.categories) 0 }}
in <a href="{{ $.Site.BaseURL }}categories/{{ index .Params.categories 0 | urlize | lower }}">{{ index .Params.categories 0 }}</a>
{{ end }}
{{ end }}
</p>
</div>
<p class="intro">{{ .Params.intro }}</p>
<p class="read-more"><a href="{{ .Permalink }}" class="btn btn-template-main">Continue reading</a>
</p>
</div>
</div>
</section>
{{ end }}
<ul class="pager">
{{ if .Paginator.HasPrev }}
<li class="previous"><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">&larr; Previous</a></li>
{{ else }}
<li class="previous disabled"><a href="#">&larr; Previous</a></li>
{{ end }}

{{ if .Paginator.HasNext }}
<li class="next"><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">Next &rarr;</a></li>
{{ else }}
<li class="next disabled"><a href="#">Next &rarr;</a></li>
{{ end }}
</ul>
</div>
<div class="col-md-3">
{{ partial "sidebar.html" . }}
</div>
</div>
</div>
</div>
{{ partial "footer.html" . }}
</div>
{{ partial "scripts.html" . }}
</body>
</html>

0 comments on commit b8771ce

Please sign in to comment.