From b8771ce97fe0c2b7f0ad23800c3a7aa9d35e09ae Mon Sep 17 00:00:00 2001 From: David Denton Date: Sun, 2 Apr 2017 16:52:18 +0100 Subject: [PATCH] change cookbook list template to use intro field --- src/main/hugosite2/content/cookbook/_index.md | 3 + .../cookbook/accepting-multiple-body-types.md | 1 + .../content/cookbook/building-fake-servers.md | 1 + .../content/cookbook/combining-modules.md | 1 + .../content/cookbook/dynamic-paths.md | 1 + .../cookbook/full-auto-service-wrappers.md | 1 + .../hugosite2/content/cookbook/handlebars.md | 1 + .../hugosite2/content/cookbook/helloworld.md | 1 + .../content/cookbook/http-clients.md | 1 + .../content/cookbook/module-filters.md | 1 + .../hugosite2/content/cookbook/msgpack.md | 1 + .../content/cookbook/multipart-form.md | 1 + .../content/cookbook/multipart-web-form.md | 1 + .../hugosite2/content/cookbook/mustache.md | 1 + .../content/cookbook/patching-endpoint.md | 1 + .../content/cookbook/security-custom.md | 1 + .../content/cookbook/security-oauth.md | 1 + .../content/cookbook/semi-auto-marshalling.md | 1 + .../content/cookbook/services-and-filters.md | 1 + .../serving-multiple-content-types.md | 1 + .../cookbook/serving-static-content.md | 1 + .../hugosite2/content/cookbook/simple-form.md | 1 + .../hugosite2/content/cookbook/simple-html.md | 1 + .../hugosite2/content/cookbook/simple-json.md | 1 + .../cookbook/simple-request-parameters.md | 1 + .../cookbook/simple-typesafe-http-clients.md | 1 + .../hugosite2/content/cookbook/simple-xml.md | 1 + .../content/cookbook/streaming-response.md | 1 + .../content/cookbook/swagger-auto-docs.md | 1 + .../hugosite2/content/cookbook/web-form.md | 1 + .../hugosite2/layouts/section/cookbook.html | 64 +++++++++++++++++++ 31 files changed, 96 insertions(+) create mode 100644 src/main/hugosite2/content/cookbook/_index.md create mode 100644 src/main/hugosite2/layouts/section/cookbook.html diff --git a/src/main/hugosite2/content/cookbook/_index.md b/src/main/hugosite2/content/cookbook/_index.md new file mode 100644 index 00000000..ee331024 --- /dev/null +++ b/src/main/hugosite2/content/cookbook/_index.md @@ -0,0 +1,3 @@ ++++ +title = "cookbook" ++++ \ No newline at end of file diff --git a/src/main/hugosite2/content/cookbook/accepting-multiple-body-types.md b/src/main/hugosite2/content/cookbook/accepting-multiple-body-types.md index 76d2fd55..f5f95692 100644 --- a/src/main/hugosite2/content/cookbook/accepting-multiple-body-types.md +++ b/src/main/hugosite2/content/cookbook/accepting-multiple-body-types.md @@ -3,6 +3,7 @@ title = "accepting multi body types" menu = "accepting multi body types" tags = ["content negotiation"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/building-fake-servers.md b/src/main/hugosite2/content/cookbook/building-fake-servers.md index 140fe71f..6cbf3e3a 100644 --- a/src/main/hugosite2/content/cookbook/building-fake-servers.md +++ b/src/main/hugosite2/content/cookbook/building-fake-servers.md @@ -2,6 +2,7 @@ title = "building fake servers" tags = ["fake", "contract", "testing", "client"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/combining-modules.md b/src/main/hugosite2/content/cookbook/combining-modules.md index 801d2632..3f1adb25 100644 --- a/src/main/hugosite2/content/cookbook/combining-modules.md +++ b/src/main/hugosite2/content/cookbook/combining-modules.md @@ -2,6 +2,7 @@ title = "combining modules" tags = ["module"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/dynamic-paths.md b/src/main/hugosite2/content/cookbook/dynamic-paths.md index 331fe012..d678aa83 100644 --- a/src/main/hugosite2/content/cookbook/dynamic-paths.md +++ b/src/main/hugosite2/content/cookbook/dynamic-paths.md @@ -2,6 +2,7 @@ title = "dynamic path elements" tags = ["path", "basics", "contract", "route"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/full-auto-service-wrappers.md b/src/main/hugosite2/content/cookbook/full-auto-service-wrappers.md index ff09b363..52112a28 100644 --- a/src/main/hugosite2/content/cookbook/full-auto-service-wrappers.md +++ b/src/main/hugosite2/content/cookbook/full-auto-service-wrappers.md @@ -2,6 +2,7 @@ title = "full auto service wrappers" tags = ["circe", "auto", "marshalling", "json", "message format", "filter", "route", "auto"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/handlebars.md b/src/main/hugosite2/content/cookbook/handlebars.md index 3ed682ae..6d40fb0f 100644 --- a/src/main/hugosite2/content/cookbook/handlebars.md +++ b/src/main/hugosite2/content/cookbook/handlebars.md @@ -2,6 +2,7 @@ title = "handlebars" tags = ["web", "templating", "handlebars"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/helloworld.md b/src/main/hugosite2/content/cookbook/helloworld.md index 5598d70c..f3c89477 100644 --- a/src/main/hugosite2/content/cookbook/helloworld.md +++ b/src/main/hugosite2/content/cookbook/helloworld.md @@ -2,6 +2,7 @@ title = "helloworld" tags = ["getting started"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/http-clients.md b/src/main/hugosite2/content/cookbook/http-clients.md index f65c22cb..0376bd73 100644 --- a/src/main/hugosite2/content/cookbook/http-clients.md +++ b/src/main/hugosite2/content/cookbook/http-clients.md @@ -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. diff --git a/src/main/hugosite2/content/cookbook/module-filters.md b/src/main/hugosite2/content/cookbook/module-filters.md index 0953257a..d883a01e 100644 --- a/src/main/hugosite2/content/cookbook/module-filters.md +++ b/src/main/hugosite2/content/cookbook/module-filters.md @@ -2,6 +2,7 @@ title = "module filters" tags = ["module", "filter"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/msgpack.md b/src/main/hugosite2/content/cookbook/msgpack.md index 016fe30c..ab2e383e 100644 --- a/src/main/hugosite2/content/cookbook/msgpack.md +++ b/src/main/hugosite2/content/cookbook/msgpack.md @@ -2,6 +2,7 @@ title = "msgpack" tags = ["msgpack", "message format"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/multipart-form.md b/src/main/hugosite2/content/cookbook/multipart-form.md index 72d6c14b..10bc40fe 100644 --- a/src/main/hugosite2/content/cookbook/multipart-form.md +++ b/src/main/hugosite2/content/cookbook/multipart-form.md @@ -2,6 +2,7 @@ title = "multipart forms" tags = ["form", "web", "multipart", "contract"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/multipart-web-form.md b/src/main/hugosite2/content/cookbook/multipart-web-form.md index afb62c71..95f19f2b 100644 --- a/src/main/hugosite2/content/cookbook/multipart-web-form.md +++ b/src/main/hugosite2/content/cookbook/multipart-web-form.md @@ -2,6 +2,7 @@ title = "multipart web forms" tags = ["form", "web", "multipart", "contract"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/mustache.md b/src/main/hugosite2/content/cookbook/mustache.md index 5b0e1152..8a3a4b81 100644 --- a/src/main/hugosite2/content/cookbook/mustache.md +++ b/src/main/hugosite2/content/cookbook/mustache.md @@ -2,6 +2,7 @@ title = "mustache" tags = ["web", "templating", "mustache"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/patching-endpoint.md b/src/main/hugosite2/content/cookbook/patching-endpoint.md index 13e84179..7bb5d220 100644 --- a/src/main/hugosite2/content/cookbook/patching-endpoint.md +++ b/src/main/hugosite2/content/cookbook/patching-endpoint.md @@ -2,6 +2,7 @@ title = "patching endpoint" tags = ["circe", "patch", "route"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/security-custom.md b/src/main/hugosite2/content/cookbook/security-custom.md index 91ed78f1..1e2c3da5 100644 --- a/src/main/hugosite2/content/cookbook/security-custom.md +++ b/src/main/hugosite2/content/cookbook/security-custom.md @@ -2,6 +2,7 @@ title = "custom security" tags = ["security", "filter", "contract"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/security-oauth.md b/src/main/hugosite2/content/cookbook/security-oauth.md index 195b8e88..a37913ac 100644 --- a/src/main/hugosite2/content/cookbook/security-oauth.md +++ b/src/main/hugosite2/content/cookbook/security-oauth.md @@ -2,6 +2,7 @@ title = "oauth security" tags = ["security", "filter", "contract"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/semi-auto-marshalling.md b/src/main/hugosite2/content/cookbook/semi-auto-marshalling.md index 5a074548..86f1e171 100644 --- a/src/main/hugosite2/content/cookbook/semi-auto-marshalling.md +++ b/src/main/hugosite2/content/cookbook/semi-auto-marshalling.md @@ -2,6 +2,7 @@ title = "semi-auto body marshalling" tags = ["body", "contract", "json", "filter", "auto"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/services-and-filters.md b/src/main/hugosite2/content/cookbook/services-and-filters.md index 2c74c316..3b66c736 100644 --- a/src/main/hugosite2/content/cookbook/services-and-filters.md +++ b/src/main/hugosite2/content/cookbook/services-and-filters.md @@ -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. diff --git a/src/main/hugosite2/content/cookbook/serving-multiple-content-types.md b/src/main/hugosite2/content/cookbook/serving-multiple-content-types.md index 5d92367e..c222e7e0 100644 --- a/src/main/hugosite2/content/cookbook/serving-multiple-content-types.md +++ b/src/main/hugosite2/content/cookbook/serving-multiple-content-types.md @@ -2,6 +2,7 @@ title = "serving multiple content types" tags = ["content negotiation"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/serving-static-content.md b/src/main/hugosite2/content/cookbook/serving-static-content.md index 833c1b20..1996c9cf 100644 --- a/src/main/hugosite2/content/cookbook/serving-static-content.md +++ b/src/main/hugosite2/content/cookbook/serving-static-content.md @@ -2,6 +2,7 @@ title = "serving static content" tags = ["web", "static"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/simple-form.md b/src/main/hugosite2/content/cookbook/simple-form.md index d1c741c2..18d20af6 100644 --- a/src/main/hugosite2/content/cookbook/simple-form.md +++ b/src/main/hugosite2/content/cookbook/simple-form.md @@ -2,6 +2,7 @@ title = "simple forms" tags = ["form", "web"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/simple-html.md b/src/main/hugosite2/content/cookbook/simple-html.md index 4a410a2d..bea17052 100644 --- a/src/main/hugosite2/content/cookbook/simple-html.md +++ b/src/main/hugosite2/content/cookbook/simple-html.md @@ -2,6 +2,7 @@ title = "html" tags = ["web", "html"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/simple-json.md b/src/main/hugosite2/content/cookbook/simple-json.md index c3e4361d..635e7fee 100644 --- a/src/main/hugosite2/content/cookbook/simple-json.md +++ b/src/main/hugosite2/content/cookbook/simple-json.md @@ -2,6 +2,7 @@ title = "json" tags = ["json", "message format"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/simple-request-parameters.md b/src/main/hugosite2/content/cookbook/simple-request-parameters.md index 1c4efcc7..fe9343a5 100644 --- a/src/main/hugosite2/content/cookbook/simple-request-parameters.md +++ b/src/main/hugosite2/content/cookbook/simple-request-parameters.md @@ -2,6 +2,7 @@ title = "simple request parameters" tags = ["getting started", "request", "contract"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/simple-typesafe-http-clients.md b/src/main/hugosite2/content/cookbook/simple-typesafe-http-clients.md index cddfd8e0..b9f6fe27 100644 --- a/src/main/hugosite2/content/cookbook/simple-typesafe-http-clients.md +++ b/src/main/hugosite2/content/cookbook/simple-typesafe-http-clients.md @@ -2,6 +2,7 @@ title = "typesafe http clients" tags = ["contract", "client"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/simple-xml.md b/src/main/hugosite2/content/cookbook/simple-xml.md index b4cb9bc7..b811c740 100644 --- a/src/main/hugosite2/content/cookbook/simple-xml.md +++ b/src/main/hugosite2/content/cookbook/simple-xml.md @@ -2,6 +2,7 @@ title = "xml" tags = ["message format", "xml"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/streaming-response.md b/src/main/hugosite2/content/cookbook/streaming-response.md index c23ed707..f5d42dc6 100644 --- a/src/main/hugosite2/content/cookbook/streaming-response.md +++ b/src/main/hugosite2/content/cookbook/streaming-response.md @@ -2,6 +2,7 @@ title = "streaming responses" tags = ["streaming", "finagle api"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/swagger-auto-docs.md b/src/main/hugosite2/content/cookbook/swagger-auto-docs.md index ef34beef..5914e041 100644 --- a/src/main/hugosite2/content/cookbook/swagger-auto-docs.md +++ b/src/main/hugosite2/content/cookbook/swagger-auto-docs.md @@ -2,6 +2,7 @@ title = "auto-documentation with swagger" tags = ["swagger", "openapi", "docs"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/content/cookbook/web-form.md b/src/main/hugosite2/content/cookbook/web-form.md index 4ccbce1d..06605eb1 100644 --- a/src/main/hugosite2/content/cookbook/web-form.md +++ b/src/main/hugosite2/content/cookbook/web-form.md @@ -2,6 +2,7 @@ title = "web forms" tags = ["web", "form"] categories = ["recipe"] +intro = "asd" +++ ```scala diff --git a/src/main/hugosite2/layouts/section/cookbook.html b/src/main/hugosite2/layouts/section/cookbook.html new file mode 100644 index 00000000..8f5abf09 --- /dev/null +++ b/src/main/hugosite2/layouts/section/cookbook.html @@ -0,0 +1,64 @@ + + + + {{ partial "head.html" . }} + +
+
+ {{ partial "nav.html" . }} +
+ {{ partial "breadcrumbs.html" . }} +
+
+
+
+ {{ $paginator := .Paginate (where .Data.Pages "Type" "cookbook") }} + {{ range $paginator.Pages }} +
+
+
+

{{ .Title }}

+
+

+ {{ if isset .Params "author" }} + By {{ .Params.author }} + {{ end }} + {{ if isset .Params "categories" }} + {{ if gt (len .Params.categories) 0 }} + in {{ index .Params.categories 0 }} + {{ end }} + {{ end }} +

+
+

{{ .Params.intro }}

+

Continue reading +

+
+
+
+ {{ end }} + +
+
+ {{ partial "sidebar.html" . }} +
+
+
+
+ {{ partial "footer.html" . }} +
+ {{ partial "scripts.html" . }} + +