Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix index error #112

Merged
merged 24 commits into from Feb 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
695cb83
update footer height
thinkerou Mar 5, 2019
c5f9b69
Merge remote-tracking branch 'upstream/master'
thinkerou Mar 5, 2019
716ecae
Merge remote-tracking branch 'upstream/master'
thinkerou Mar 6, 2019
7be747e
Merge remote-tracking branch 'upstream/master'
thinkerou Mar 12, 2019
a12b728
Merge remote-tracking branch 'upstream/master'
thinkerou Mar 12, 2019
097684b
Merge remote-tracking branch 'upstream/master'
thinkerou Mar 14, 2019
a9d1a03
Merge remote-tracking branch 'upstream/master'
thinkerou Mar 14, 2019
4074771
Merge remote-tracking branch 'upstream/master'
thinkerou Mar 14, 2019
28161e8
Merge remote-tracking branch 'upstream/master'
thinkerou Mar 18, 2019
326d4a5
Merge remote-tracking branch 'upstream/master'
thinkerou Oct 13, 2019
d9d8551
Merge remote-tracking branch 'upstream/master'
thinkerou Feb 23, 2020
624bc1b
not use disqu
thinkerou Feb 23, 2020
6ee3025
update themes/docsy
thinkerou Feb 23, 2020
0491ba3
update ci config
thinkerou Feb 23, 2020
534f033
update ci config
thinkerou Feb 23, 2020
ad80c39
add comment js
thinkerou Feb 23, 2020
ab28ab0
fix conflict
thinkerou Feb 24, 2020
0141919
Merge remote-tracking branch 'upstream/master'
thinkerou Feb 24, 2020
66ad3f6
Merge remote-tracking branch 'upstream/master'
thinkerou Feb 29, 2020
978dcc3
Merge remote-tracking branch 'upstream/master'
thinkerou Feb 29, 2020
7a1644e
Revert "Fixed #108 (#109)"
thinkerou Feb 29, 2020
12d424d
update themes
thinkerou Feb 29, 2020
64afb9e
fix index error
thinkerou Feb 29, 2020
27c8917
fix index error
thinkerou Feb 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
84 changes: 63 additions & 21 deletions config.toml
Expand Up @@ -98,24 +98,67 @@ contentDir = "content/ko-kr"
time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true

# Everything below this are Site Params

[params]
copyright = "Gin Team"
#privacy_policy = "https://policies.google.com/privacy"

# First one is picked as the Twitter card image if not set on page.
# images = ["images/project-illustration.png"]

# Menu title if your navbar has a versions selector to access old versions of your site.
# This menu appears only if you have at least one [params.versions] set.
version_menu = "Releases"

# Flag used in the "version-banner" partial to decide whether to display a
# banner on every page indicating that this is an archived version of the docs.
# Set this flag to "true" if you want to display the banner.
archived_version = false

# The version number for the version of the docs represented in this doc set.
# Used in the "version-banner" partial to display a version number for the
# current doc set.
version = "0.0"

# A link to latest version of the docs. Used in the "version-banner" partial to
# point people to the main doc site.
url_latest_version = "https://example.com"

# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
github_repo = "https://github.com/gin-gonic/website"
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
github_project_repo = "https://github.com/google/docsy"

# Specify a value here if your content directory is not in your repo's root directory
# github_subdir = ""

# Google Custom Search Engine ID. Remove or comment out to disable search.
gcs_engine_id = "005538359705255204576:q0elqbxmlfs"

# Enable Algolia DocSearch
algolia_docsearch = false

# Enable Lunr.js offline search
offlineSearch = false

# User interface configuration
[params.ui]
# Enable to show the side bar menu in its compact state.
sidebar_menu_compact = false
sidebar_search_disable = true
# Set to true to disable breadcrumb navigation.
breadcrumb_disable = false
footer_about_disable = true
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
sidebar_search_disable = false
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar
navbar_logo = true
# Set to true to disable the About link in the site footer
footer_about_disable = false

# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
Expand All @@ -135,30 +178,29 @@ no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY
icon = "fab fa-gitter"
desc = "Discussion and help from your fellow users"
#[[params.links.user]]
#name ="Twitter"
#url = "https://example.org/twitter"
#icon = "fab fa-twitter"
#desc = "Follow us on Twitter to get the latest news!"
# name ="Twitter"
# url = "https://example.org/twitter"
# icon = "fab fa-twitter"
# desc = "Follow us on Twitter to get the latest news!"
#[[params.links.user]]
#name = "Stack Overflow"
#url = "https://example.org/stack"
#icon = "fab fa-stack-overflow"
#desc = "Practical questions and curated answers"
[[params.links.user]]
# name = "Stack Overflow"
# url = "https://example.org/stack"
# icon = "fab fa-stack-overflow"
# desc = "Practical questions and curated answers"
# Developer relevant links. These will show up on right side of footer and in the community page if you have one.
[[params.links.developer]]
name = "GitHub"
url = "https://github.com/gin-gonic/gin"
icon = "fab fa-github"
desc = "Development takes place here!"
# Developer relevant links. These will show up on right side of footer and in the community page if you have one.
#[[params.links.developer]]
#name = "Slack"
#url = "https://example.org/slack"
#icon = "fab fa-slack"
#desc = "Chat with other project developers"
# name = "Slack"
# url = "https://example.org/slack"
# icon = "fab fa-slack"
# desc = "Chat with other project developers"
#[[params.links.developer]]
#name = "Developer mailing list"
#url = "https://example.org/mail"
#icon = "fa fa-envelope"
#desc = "Discuss development issues around the project"

# name = "Developer mailing list"
# url = "https://example.org/mail"
# icon = "fa fa-envelope"
# desc = "Discuss development issues around the project"

41 changes: 20 additions & 21 deletions content/en/_index.html
Expand Up @@ -12,14 +12,13 @@
Download <i class="fab fa-github ml-2 "></i>
</a>
<p class="lead mt-5">The fastest full-featured web framework for Go. Crystal clear.</p>
<div class="mx-auto mt-5">
{{< blocks/link-down color="info" >}}
</div>
<div class="mx-auto mt-5"/>
{{< blocks/link-down color="info" >}}
</div>
{{< /blocks/cover >}}


{{< blocks/lead color="white" >}}
{{% blocks/lead color="white" %}}

**What is Gin?**

Expand All @@ -29,50 +28,50 @@

If you need performance and good productivity, you will love Gin.

{{< /blocks/lead >}}
{{% /blocks/lead %}}

{{< blocks/section color="light" >}}

{{< blocks/feature icon="fa fa-tachometer-alt" title="Fast" >}}
{{% blocks/feature icon="fa fa-tachometer-alt" title="Fast" %}}
Radix tree based routing, small memory foot print. No reflection. Predictable API performance.
{{< /blocks/feature >}}
{{% /blocks/feature %}}

{{< blocks/feature icon="fa fa-bars" title="Middleware support" >}}
{{% blocks/feature icon="fa fa-bars" title="Middleware support" %}}
A incoming HTTP request can be handled by a chain of middlewares and the final action.
For example: Logger, Authorization, GZIP and finally post a message in the DB.
{{< /blocks/feature >}}
{{% /blocks/feature %}}

{{< blocks/feature icon="fa fa-life-ring" title="Crash-free" >}}
{{% blocks/feature icon="fa fa-life-ring" title="Crash-free" %}}
Gin can catch a panic occurred during a HTTP request and recover it. This way, your server will be always available. It’s also possible to report this panic to Sentry for example!
{{< /blocks/feature >}}
{{% /blocks/feature %}}

{{< /blocks/section >}}

{{< blocks/section color="white" >}}

{{< blocks/feature icon="fa fa-check-circle" title="JSON validation" >}}
{{% blocks/feature icon="fa fa-check-circle" title="JSON validation" %}}
Gin can parse and validate the JSON of a request, checking for example the existence of required values.
{{< /blocks/feature >}}
{{% /blocks/feature %}}

{{< blocks/feature icon="fa fa-users-cog" title="Routes grouping" >}}
{{% blocks/feature icon="fa fa-users-cog" title="Routes grouping" %}}
Organize your routes better. Authorization required vs non required, different API versions. In addition, the groups can be nested unlimitedly without degrading performance.
{{< /blocks/feature >}}
{{% /blocks/feature %}}


{{< blocks/feature icon="fa fa-briefcase" title="Error management" >}}
{{% blocks/feature icon="fa fa-briefcase" title="Error management" %}}
Gin provides a convenient way to collect all the errors occurred during a HTTP request. Eventually, a middleware can write them to a log file, to a database and send them through the network.
{{< /blocks/feature >}}
{{% /blocks/feature %}}

{{< /blocks/section >}}

{{< blocks/section color="info" >}}

{{< blocks/feature icon="fa fa-images" title="Rendering built-in" >}}
{{% blocks/feature icon="fa fa-images" title="Rendering built-in" %}}
Gin provides a easy to use API for JSON, XML and HTML rendering.
{{< /blocks/feature >}}
{{% /blocks/feature %}}

{{< blocks/feature icon="fa fa-code" title="Extendable" >}}
{{% blocks/feature icon="fa fa-code" title="Extendable" %}}
Creating a new middleware is so easy, just check out the sample codes.
{{< /blocks/feature >}}
{{% /blocks/feature %}}

{{< /blocks/section >}}
7 changes: 3 additions & 4 deletions content/ja/_index.html
Expand Up @@ -3,7 +3,7 @@
linkTitle = "Gin Web Framework"
+++

{{< blocks/cover title="Gin Web Framework for Go" image_anchor="top" height="full" color="orange" >}}
{{< blocks/cover title="Gin Web Framework" image_anchor="top" height="full" color="orange" >}}
<div class="mx-auto">
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/docs" >}}">
Learn More <i class="fas fa-arrow-alt-circle-right ml-2"></i>
Expand All @@ -12,9 +12,8 @@
Download <i class="fab fa-github ml-2 "></i>
</a>
<p class="lead mt-5">The fastest full-featured web framework for Go. Crystal clear.</p>
<div class="mx-auto mt-5">
{{< blocks/link-down color="info" >}}
</div>
<div class="mx-auto mt-5"/>
{{< blocks/link-down color="info" >}}
</div>
{{< /blocks/cover >}}

Expand Down
5 changes: 2 additions & 3 deletions content/ko-kr/_index.html
Expand Up @@ -12,9 +12,8 @@
Download <i class="fab fa-github ml-2 "></i>
</a>
<p class="lead mt-5">The fastest full-featured web framework for Go. Crystal clear.</p>
<div class="mx-auto mt-5">
{{< blocks/link-down color="info" >}}
</div>
<div class="mx-auto mt-5"/>
{{< blocks/link-down color="info" >}}
</div>
{{< /blocks/cover >}}

Expand Down
7 changes: 3 additions & 4 deletions content/zh-cn/_index.html
Expand Up @@ -3,7 +3,7 @@
linkTitle = "Gin Web Framework"
+++

{{< blocks/cover title="Gin Web Framework for Go" image_anchor="top" height="full" color="orange" >}}
{{< blocks/cover title="Gin Web Framework" image_anchor="top" height="full" color="orange" >}}
<div class="mx-auto">
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/docs" >}}">
Learn More <i class="fas fa-arrow-alt-circle-right ml-2"></i>
Expand All @@ -12,9 +12,8 @@
Download <i class="fab fa-github ml-2 "></i>
</a>
<p class="lead mt-5">The fastest full-featured web framework for Go. Crystal clear.</p>
<div class="mx-auto mt-5">
{{< blocks/link-down color="info" >}}
</div>
<div class="mx-auto mt-5"/>
{{< blocks/link-down color="info" >}}
</div>
{{< /blocks/cover >}}

Expand Down
54 changes: 27 additions & 27 deletions content/zh-tw/_index.html
Expand Up @@ -3,75 +3,75 @@
linkTitle = "Gin Web Framework"
+++

{{< blocks/cover title="Gin Web Framework for Go" image_anchor="top" height="full" color="orange" >}}
{{< blocks/cover title="Gin Web Framework" image_anchor="top" height="full" color="orange" >}}
<div class="mx-auto">
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/docs" >}}">
深入瞭解 <i class="fas fa-arrow-alt-circle-right ml-2"></i>
Learn More <i class="fas fa-arrow-alt-circle-right ml-2"></i>
</a>
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="https://github.com/gin-gonic/gin/releases">
下載 <i class="fab fa-github ml-2 "></i>
Download <i class="fab fa-github ml-2 "></i>
</a>
<p class="lead mt-5">最快速、功能完整的 Go Web 框架。顯而易見。</p>
<div class="mx-auto mt-5">
{{< blocks/link-down color="info" >}}
</div>
<p class="lead mt-5">The fastest full-featured web framework for Go. Crystal clear.</p>
<div class="mx-auto mt-5"/>
{{< blocks/link-down color="info" >}}
</div>
{{< /blocks/cover >}}


{{% blocks/lead color="white" %}}

**Gin 是什麼?**
**What is Gin?**

Gin 是一個使用 Golang 寫的 Web 框架。
Gin is a web framework written in Golang.

它提供類似 Martini 的 API,但擁有更好的效能,速度快上了 40 倍。
It features a martini-like API with much better performance, up to 40 times faster.

如果你需要效能和高生產力,你將會愛上 Gin
If you need performance and good productivity, you will love Gin.

{{% /blocks/lead %}}

{{< blocks/section color="light" >}}

{{% blocks/feature icon="fa fa-tachometer-alt" title="快速" %}}
以 Radix tree 為基礎的路由,記憶體使用量小。
沒有使用 reflection。可預測的 API 效能。
{{% blocks/feature icon="fa fa-tachometer-alt" title="Fast" %}}
Radix tree based routing, small memory foot print. No reflection. Predictable API performance.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa fa-bars" title="支援 Middleware " %}}
傳入的請求可以由一系列的 Middleware 和最終行為來處理。例如:Logger、Authorization、GZIP,最後送訊息到資料庫。
{{% blocks/feature icon="fa fa-bars" title="Middleware support" %}}
A incoming HTTP request can be handled by a chain of middlewares and the final action.
For example: Logger, Authorization, GZIP and finally post a message in the DB.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa fa-life-ring" title="Crash-free" %}}
Gin 可以攔截發生在 HTTP 請求期間的 panic 並回復它。這樣的話,伺服器將永遠是可用狀態。舉例來說,它可以選擇回報 panic Sentry
Gin can catch a panic occurred during a HTTP request and recover it. This way, your server will be always available. It’s also possible to report this panic to Sentry for example!
{{% /blocks/feature %}}

{{< /blocks/section >}}

{{< blocks/section color="white" >}}

{{% blocks/feature icon="fa fa-check-circle" title="JSON 驗證" %}}
Gin 可以剖析和驗證請求裡的 JSON,例如檢查必要值。
{{% blocks/feature icon="fa fa-check-circle" title="JSON validation" %}}
Gin can parse and validate the JSON of a request, checking for example the existence of required values.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa fa-users-cog" title="路由群組" %}}
更好地組織你的路由。需不需要授權或不同的 API 版本。此外,這些群組可以無限制地巢狀嵌套而不會降低效能。
{{% blocks/feature icon="fa fa-users-cog" title="Routes grouping" %}}
Organize your routes better. Authorization required vs non required, different API versions. In addition, the groups can be nested unlimitedly without degrading performance.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa fa-briefcase" title="錯誤管理" %}}
Gin 提供了一種方便的方法來收集 HTTP 請求期間發生的所有錯誤。 最後, Middleware 可以將它們寫入日誌檔案、寫入資料庫,並透過網路傳送。

{{% blocks/feature icon="fa fa-briefcase" title="Error management" %}}
Gin provides a convenient way to collect all the errors occurred during a HTTP request. Eventually, a middleware can write them to a log file, to a database and send them through the network.
{{% /blocks/feature %}}

{{< /blocks/section >}}

{{< blocks/section color="info" >}}

{{% blocks/feature icon="fa fa-images" title="內建渲染" %}}
Gin 提供易使用的 API 來渲染 JSONXML HTML
{{% blocks/feature icon="fa fa-images" title="Rendering built-in" %}}
Gin provides a easy to use API for JSON, XML and HTML rendering.
{{% /blocks/feature %}}

{{% blocks/feature icon="fa fa-code" title="可擴展性" %}}
建立新的 Middleware 很簡單,直接查看範例程式碼即可。
{{% blocks/feature icon="fa fa-code" title="Extendable" %}}
Creating a new middleware is so easy, just check out the sample codes.
{{% /blocks/feature %}}

{{< /blocks/section >}}