mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Update website
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
73b7ecaed5
commit
35742c9f04
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2016 LabStack
|
Copyright (c) 2017 LabStack
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -6,6 +6,6 @@ googleAnalytics = "UA-85059636-2"
|
|||||||
[permalinks]
|
[permalinks]
|
||||||
guide = "/guide/:filename"
|
guide = "/guide/:filename"
|
||||||
middleware = "/middleware/:filename"
|
middleware = "/middleware/:filename"
|
||||||
recipes = "/recipes/:filename"
|
examples = "/examples/:filename"
|
||||||
[params]
|
[params]
|
||||||
description = "Echo is a high performance, extensible, minimalist web framework for Go (Golang)."
|
description = "Echo is a high performance, extensible, minimalist web framework for Go (Golang)."
|
||||||
|
13
website/content/examples.md
Normal file
13
website/content/examples.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
+++
|
||||||
|
title = "Examples"
|
||||||
|
description = "Echo examples"
|
||||||
|
type = "examples"
|
||||||
|
[menu.main]
|
||||||
|
name = "Examples"
|
||||||
|
pre = "<i class='fa fa-code'></i>"
|
||||||
|
weight = 2
|
||||||
|
identifier = "examples"
|
||||||
|
url = "/examples"
|
||||||
|
+++
|
||||||
|
|
||||||
|
<script>location = '/examples/hello-world';</script>
|
@ -3,7 +3,7 @@ title = "Auto TLS Example"
|
|||||||
description = "Automatic TLS certificates from Let's Encrypt example for Echo"
|
description = "Automatic TLS certificates from Let's Encrypt example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Auto TLS"
|
name = "Auto TLS"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 2
|
weight = 2
|
||||||
+++
|
+++
|
||||||
|
|
@ -4,7 +4,7 @@ description = "CORS example for Echo"
|
|||||||
[menu.main]
|
[menu.main]
|
||||||
name = "CORS"
|
name = "CORS"
|
||||||
identifier = "middleware-cors"
|
identifier = "middleware-cors"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 3
|
weight = 3
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "CRUD Example"
|
|||||||
description = "CRUD (Create, read, update and delete) example for Echo"
|
description = "CRUD (Create, read, update and delete) example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "CRUD"
|
name = "CRUD"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 2
|
weight = 2
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "Embed Resources Example"
|
|||||||
description = "Embed resources example for Echo"
|
description = "Embed resources example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Embed Resources"
|
name = "Embed Resources"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 14
|
weight = 14
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "File Upload Example"
|
|||||||
description = "File upload example for Echo"
|
description = "File upload example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "File Upload"
|
name = "File Upload"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 7
|
weight = 7
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "Google App Engine Example"
|
|||||||
description = "Google App Engine example for Echo"
|
description = "Google App Engine example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Google App Engine"
|
name = "Google App Engine"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 12
|
weight = 12
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "Graceful Shutdown Example"
|
|||||||
description = "Graceful shutdown example for Echo"
|
description = "Graceful shutdown example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Graceful Shutdown"
|
name = "Graceful Shutdown"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 13
|
weight = 13
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "Hello World Example"
|
|||||||
description = "Hello world example for Echo"
|
description = "Hello world example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Hello World"
|
name = "Hello World"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 1
|
weight = 1
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "HTTP/2 Example"
|
|||||||
description = "HTTP/2 example for Echo"
|
description = "HTTP/2 example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "HTTP/2"
|
name = "HTTP/2"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 3
|
weight = 3
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "JSONP Example"
|
|||||||
description = "JSONP example for Echo"
|
description = "JSONP example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "JSONP"
|
name = "JSONP"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 6
|
weight = 6
|
||||||
+++
|
+++
|
||||||
|
|
@ -4,7 +4,7 @@ description = "JWT example for Echo"
|
|||||||
[menu.main]
|
[menu.main]
|
||||||
name = "JWT"
|
name = "JWT"
|
||||||
identifier = "recipe-jwt"
|
identifier = "recipe-jwt"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 11
|
weight = 11
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "Middleware Example"
|
|||||||
description = "Middleware example for Echo"
|
description = "Middleware example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Middleware"
|
name = "Middleware"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 3
|
weight = 3
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "Streaming Response Example"
|
|||||||
description = "Streaming response example for Echo"
|
description = "Streaming response example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Streaming Response"
|
name = "Streaming Response"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 3
|
weight = 3
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "Subdomains Example"
|
|||||||
description = "Subdomains example for Echo"
|
description = "Subdomains example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Subdomains"
|
name = "Subdomains"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 10
|
weight = 10
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "Twitter Like API Example"
|
|||||||
description = "Twitter Like API example for Echo"
|
description = "Twitter Like API example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Twitter"
|
name = "Twitter"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 2
|
weight = 2
|
||||||
+++
|
+++
|
||||||
|
|
@ -3,7 +3,7 @@ title = "WebSocket Example"
|
|||||||
description = "WebSocket example for Echo"
|
description = "WebSocket example for Echo"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "WebSocket"
|
name = "WebSocket"
|
||||||
parent = "recipes"
|
parent = "examples"
|
||||||
weight = 5
|
weight = 5
|
||||||
+++
|
+++
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
+++
|
+++
|
||||||
title = "Guide"
|
title = "Guide"
|
||||||
description = "Guide"
|
description = "Echo guide"
|
||||||
type = "guide"
|
type = "guide"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Guide"
|
name = "Guide"
|
||||||
|
@ -42,7 +42,7 @@ description = "Migration"
|
|||||||
- Dropped support for `fasthttp`
|
- Dropped support for `fasthttp`
|
||||||
- Dropped deprecated API
|
- Dropped deprecated API
|
||||||
- Moved `Logger` interface to root level
|
- Moved `Logger` interface to root level
|
||||||
- Moved website and recipes to the main repo
|
- Moved website and examples to the main repo
|
||||||
- Updated docs and fixed numerous issues
|
- Updated docs and fixed numerous issues
|
||||||
|
|
||||||
## [Recipes](/recipes/hello-world)
|
## [Examples](/examples/hello-world)
|
||||||
|
@ -129,7 +129,7 @@ func(c echo.Context) error {
|
|||||||
Go type into JSON and send it as JSONP payload constructed using a callback, with
|
Go type into JSON and send it as JSONP payload constructed using a callback, with
|
||||||
status code.
|
status code.
|
||||||
|
|
||||||
[*Example*](/recipes/jsonp)
|
[*Example*](/examples/jsonp)
|
||||||
|
|
||||||
## Send XML
|
## Send XML
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
+++
|
+++
|
||||||
title = "Middleware"
|
title = "Middleware"
|
||||||
description = "Middleware"
|
description = "Echo middleware"
|
||||||
type = "middleware"
|
type = "middleware"
|
||||||
[menu.main]
|
[menu.main]
|
||||||
name = "Middleware"
|
name = "Middleware"
|
||||||
@ -105,4 +105,4 @@ e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
|
|||||||
|
|
||||||
Example above skips Logger middleware when request host starts with localhost.
|
Example above skips Logger middleware when request host starts with localhost.
|
||||||
|
|
||||||
## [Writing Custom Middleware]({{< ref "recipes/middleware.md">}})
|
## [Writing Custom Middleware]({{< ref "examples/middleware.md">}})
|
||||||
|
@ -80,4 +80,4 @@ DefaultJWTConfig = JWTConfig{
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## [Recipe]({{< ref "recipes/jwt.md">}})
|
## [Recipe]({{< ref "examples/jwt.md">}})
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
+++
|
|
||||||
title = "Recipes"
|
|
||||||
description = "Recipes"
|
|
||||||
type = "recipes"
|
|
||||||
[menu.main]
|
|
||||||
name = "Recipes"
|
|
||||||
pre = "<i class='fa fa-code'></i>"
|
|
||||||
weight = 2
|
|
||||||
identifier = "recipes"
|
|
||||||
url = "/recipes"
|
|
||||||
+++
|
|
||||||
|
|
||||||
<script>location = "/recipes/hello-world";</script>
|
|
@ -1,12 +1,11 @@
|
|||||||
{{ partial "head.html" . }}
|
{{ partial "head.html" . }}
|
||||||
<body>
|
<body class="docs">
|
||||||
<link rel="stylesheet" href="https://cdn.labstack.com/styles/docs.css">
|
|
||||||
{{ partial "topnav.html" . }}
|
{{ partial "topnav.html" . }}
|
||||||
<div class="w3-container w3-content">
|
<div class="w3-container w3-content">
|
||||||
{{ partial "sidenav.html" . }}
|
{{ partial "sidenav.html" . }}
|
||||||
<div class="main">
|
<div class="main">
|
||||||
{{ partial "ad.html" }}
|
{{ partial "ad.html" }}
|
||||||
<div class="w3-row-padding">
|
<div class="w3-row">
|
||||||
<div class="w3-col s12 m10 l10">
|
<div class="w3-col s12 m10 l10">
|
||||||
{{ partial "notice.html" }}
|
{{ partial "notice.html" }}
|
||||||
<article class="content">
|
<article class="content">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<footer class="w3-container w3-content w3-padding-48 w3-center footer">
|
<footer class="w3-container w3-content w3-padding-48 w3-center footer">
|
||||||
<p>
|
<p>
|
||||||
<strong>Echo</strong> by <a href="https://labstack.com">LabStack</a> © 2016 LabStack. All Rights Reserved.
|
<strong>Echo</strong> by <a href="https://labstack.com">LabStack</a> © 2017 LabStack. All Rights Reserved.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a class="icon" href="https://labstack.com/blog">
|
<a class="icon" href="https://labstack.com/blog">
|
||||||
@ -30,5 +30,3 @@ docsearch({
|
|||||||
</script>
|
</script>
|
||||||
<script src="https://cdn.labstack.com/scripts/prism.js"></script>
|
<script src="https://cdn.labstack.com/scripts/prism.js"></script>
|
||||||
<script src="https://cdn.labstack.com/scripts/base.js"></script>
|
<script src="https://cdn.labstack.com/scripts/base.js"></script>
|
||||||
<script src="https://cdn.labstack.com/scripts/docs.js"></script>
|
|
||||||
<script src="/scripts/main.js"></script>
|
|
||||||
|
@ -21,12 +21,10 @@
|
|||||||
{{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }}
|
{{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }}
|
||||||
</title>
|
</title>
|
||||||
<link rel="stylesheet" href="https://unpkg.com/font-awesome@4.6.3/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://unpkg.com/font-awesome@4.6.3/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css">
|
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css">-->
|
||||||
<link rel="stylesheet" href="https://cdn.labstack.com/styles/w3.css">
|
<link rel="stylesheet" href="https://cdn.labstack.com/styles/w3.css">
|
||||||
<link rel="stylesheet" href="https://cdn.labstack.com/styles/prism.css">
|
<link rel="stylesheet" href="https://cdn.labstack.com/styles/prism.css">
|
||||||
<link rel="stylesheet" href="https://cdn.labstack.com/styles/base.css">
|
<link rel="stylesheet" href="https://cdn.labstack.com/styles/base.css">
|
||||||
<link rel="stylesheet" href="https://cdn.labstack.com/styles/ad.css">
|
|
||||||
<link rel="stylesheet" href="/styles/main.css">
|
|
||||||
<script>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<div class="w3-panel w3-pale-green w3-leftbar w3-border-green">
|
<!--<div class="w3-panel w3-pale-green w3-leftbar w3-border-green">
|
||||||
<h3>
|
<h3>
|
||||||
Check out our new project <a href="https://armor.labstack.com">Armor</a>
|
Check out our new project <a href="https://armor.labstack.com">Armor</a>
|
||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
Uncomplicated, modern HTTP server, supports HTTP/2 and auto TLS
|
Uncomplicated, modern HTTP server, supports HTTP/2 and auto TLS
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>-->
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
<nav class="w3-sidenav w3-border-right collapse">
|
<nav class="w3-sidenav w3-border-right">
|
||||||
<span class="w3-closenav w3-xxlarge hide-large" onclick="closeSidenav()">×</span>
|
|
||||||
<button class="w3-btn w3-white w3-border w3-border-theme w3-round-xlarge" onclick="location.href='/support-echo';">
|
<button class="w3-btn w3-white w3-border w3-border-theme w3-round-xlarge" onclick="location.href='/support-echo';">
|
||||||
<i class="fa fa-heart" aria-hidden="true"></i> Support Echo
|
<i class="fa fa-heart" aria-hidden="true"></i> Support Echo
|
||||||
</button>
|
</button>
|
||||||
{{ $currentNode := . }}
|
{{ $currentNode := . }}
|
||||||
<div class="menu hide-large">
|
<div class="menu">
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<a{{ if or ($currentNode.HasMenuCurrent "main" .) ($currentNode.IsMenuCurrent "main" .) }} class="active"{{ end }} href="{{ .URL }}">
|
<a{{ if or ($currentNode.HasMenuCurrent "main" .) ($currentNode.IsMenuCurrent "main" .) }} class="active"{{ end }} href="{{ .URL }}">
|
||||||
<div class="w3-xlarge w3-padding-top">{{ .Name }}</div>
|
{{ .Name }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-menu">
|
<div class="sub-menu">
|
||||||
{{ if .IsPage }}
|
{{ if .IsPage }}
|
||||||
{{ range where .Site.Menus.main "Identifier" .Type }}
|
{{ range where .Site.Menus.main "Identifier" .Type }}
|
||||||
<div class="w3-xlarge w3-padding-top">{{ .Pre }} {{ .Name }}</div>
|
<h3>{{ .Pre }} {{ .Name }}</h3>
|
||||||
{{ range .Children }}
|
{{ range .Children }}
|
||||||
<a{{ if $currentNode.IsMenuCurrent "main" . }} class="active"{{ end }} href="{{ .URL }}">
|
<a{{ if $currentNode.IsMenuCurrent "main" . }} class="active"{{ end }} href="{{ .URL }}">
|
||||||
{{ .Name }}
|
{{ .Name }}
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
<a{{ if or ($currentNode.HasMenuCurrent "main" .) ($currentNode.IsMenuCurrent "main" .) }} class="active"{{ end }} href="{{ .URL }}">{{ .Name }}</a>
|
<a{{ if or ($currentNode.HasMenuCurrent "main" .) ($currentNode.IsMenuCurrent "main" .) }} class="active"{{ end }} href="{{ .URL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
<span class="w3-xxlarge hide-large" onclick="openSidenav()">☰</span>
|
<button class="hamburger hide-large" onclick="toggleSidenav()">
|
||||||
|
<span></span>
|
||||||
|
</button>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
|
|
Loading…
Reference in New Issue
Block a user