-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1729 from hairyhenderson/new-website-theme
Migrate docs site to new theme
- Loading branch information
Showing
27 changed files
with
492 additions
and
3,579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ report.xml | |
*.cid | ||
*.iid | ||
*.out | ||
.netlify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
date: {{ .Date }} | ||
draft: true | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,51 @@ | ||
baseURL = "/" | ||
languageCode = "en-us" | ||
title = "gomplate documentation" | ||
theme = "hugo-material-docs" | ||
theme = "hugo-theme-relearn" | ||
googleAnalytics = "UA-82637990-3" | ||
|
||
[params] | ||
alwaysopen = false | ||
editURL = "https://github.com/hairyhenderson/gomplate/edit/main/docs/content/" | ||
author = "hairyhenderson" | ||
description = "gomplate documentation" | ||
copyright = "Released under the MIT license" | ||
provider = "GitHub" | ||
repo_url = "https://github.com/hairyhenderson/gomplate" | ||
logo = "images/gomplate-icon.svg" | ||
favicon = "favicon.ico" | ||
custom_css = [ | ||
"stylesheets/search.css", | ||
"stylesheets/custom-palettes.css", | ||
] | ||
custom_js = [ | ||
"https://code.jquery.com/jquery-3.3.1.min.js", | ||
"https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.4.4/fuse.min.js", | ||
"https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js", | ||
"js/search.js", | ||
"js/faro.js" | ||
] | ||
showVisitedLinks = false | ||
disableSearch = false | ||
disableSearchHiddenPages = false | ||
disableSeoHiddenPages = false | ||
disableTagHiddenPages = false | ||
disableAssetsBusting = false | ||
disableGeneratorVersion = false | ||
disableInlineCopyToClipBoard = true | ||
disableShortcutsTitle = false | ||
disableLandingPageButton = false | ||
disableLanguageSwitchingButton = false | ||
disableBreadcrumb = false | ||
disableToc = false | ||
disableMathJax = true | ||
disableMermaid = true | ||
disableSwagger = true | ||
disableNextPrev = false | ||
ordersectionsby = "weight" | ||
themeVariantAuto = ["gomplate-light", "gomplate-dark"] | ||
themeVariant = ["auto", "gomplate-light", "gomplate-dark"] | ||
titleSeparator = "-" | ||
collapsibleMenu = true | ||
additionalContentLanguage = [ "en" ] | ||
disableExplicitIndexURLs = true | ||
externalLinkTarget = "_blank" | ||
|
||
[params.palette] | ||
primary = "spalding-gray" | ||
accent = "spalding-blue" | ||
|
||
[social] | ||
twitter = "hairyhenderson" | ||
github = "hairyhenderson" | ||
[markup] | ||
[markup.highlight] | ||
guessSyntax = false | ||
noClasses = false | ||
|
||
[outputs] | ||
home = ["HTML", "RSS", "JSON"] | ||
home = [ "HTML", "RSS", "SEARCH", "SEARCHPAGE"] | ||
|
||
[privacy] | ||
[privacy.googleAnalytics] | ||
disable = false | ||
anonymizeIP = true | ||
respectDoNotTrack = true | ||
useSessionStorage = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
title: Functions | ||
--- | ||
|
||
Almost all of gomplate's utility is provided as _functions._ These are key | ||
words that perform some action. | ||
|
||
For example, the [`base64.Encode`][] function will encode some input string as | ||
a base-64 string: | ||
|
||
``` | ||
The word is {{ base64.Encode "swordfish" }} | ||
``` | ||
renders as: | ||
``` | ||
The word is c3dvcmRmaXNo | ||
``` | ||
|
||
## Built-ins | ||
|
||
Go's [`text/template`][] language provides a number of built-in functions, | ||
operators, and actions that can be used in templates. | ||
|
||
### Built-in functions | ||
|
||
Here is a list of the built-in functions, but see [the documentation](https://golang.org/pkg/text/template/#hdr-Functions) | ||
for full details: | ||
|
||
- `and`, `or`, `not`: Returns boolean AND/OR/NOT of the argument(s). | ||
- `call`: Returns the result of calling a function argument. | ||
- `html`, `js`, `urlquery`: Safely escapes input for inclusion in HTML, JavaScript, and URL query strings. | ||
- `index`: Returns the referenced element of an array/slice, string, or map. See also [Arrays](#arrays) and [Maps](#maps). | ||
- `len`: Returns the length of the argument. | ||
- `print`, `printf`, `println`: Aliases for Go's [`fmt.Print`](https://golang.org/pkg/fmt/#Print), | ||
[`fmt.Printf`](https://golang.org/pkg/fmt/#Printf), and [`fmt.Println`](https://golang.org/pkg/fmt/#Println) | ||
functions. See the [format documentation](https://golang.org/pkg/fmt/#hdr-Printing) | ||
for details on `printf`'s format syntax. | ||
|
||
### Operators | ||
|
||
And the following comparison operators are also supported: | ||
|
||
- `eq`: Equal (`==`) | ||
- `ne`: Not-equal (`!=`) | ||
- `lt`: Less than (`<`) | ||
- `le`: Less than or equal to (`<=`) | ||
- `gt`: Greater than (`>`) | ||
- `ge`: Greater than or equal to (`>=`) | ||
|
||
### Actions | ||
|
||
There are also a few _actions_, which are used for control flow and other purposes. See [the documentation](https://golang.org/pkg/text/template/#hdr-Actions) for details on these: | ||
|
||
- `if`/`else`/`else if`: Conditional control flow. | ||
- `with`/`else`: Conditional execution with assignment. | ||
- `range`: Looping control flow. See discussion in the [Arrays](#arrays) and [Maps](#maps) sections. | ||
- `break`: The innermost `range` loop is ended early, stopping the current iteration and bypassing all remaining iterations. | ||
- `continue`: The current iteration of the innermost `range` loop is stopped, and the loop starts the next iteration. | ||
- `template`: Include the output of a named template. See the [Nested templates](#nested-templates) section for more details, and the [`tmpl`](../functions/tmpl) namespace for more flexible versions of `template`. | ||
- `define`: Define a named nested template. See the [Nested templates](#nested-templates) section for more details. | ||
- `block`: Shorthand for `define` followed immediately by `template`. | ||
|
||
## gomplate functions | ||
|
||
gomplate provides over 200 functions not found in the standard library. These | ||
are grouped into namespaces, and documented on the following pages: | ||
|
||
{{% children depth="3" description="false" %}} | ||
|
||
[`text/template`]: https://golang.org/pkg/text/template/ | ||
[`base64.Encode`]: ../functions/base64#base64-encode | ||
[data sources]: ../datasources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.