49809a03Merge commit '20a631b4964fc0ab9137cce1e41774cbc17de044'20a631b4Squashed 'themes/gohugoioTheme/' changes from b8202f539..dafc91ff18b58f565Re-generate CLI docs4653a724Add Netlify deployment badge2d6246bcRemove some deprecated site variablese6777153Improve Algolia Search Display Styling1570999fAdd missing "." in front of gitlab-ci.yaml exampleb922ae7dThis adds documentation to the new configDir/Environment logic from .53 (#729)7cff379fCorrectly escape multi-word taxonomy terms in example2dfeeda4fix typo by removing stray paren0870bd9aFix typo in `paginate` description91e8be85Fixes https://github.com/gohugoio/hugo/issues/5609c1db65ecMake the dummy URL more obviousb4589ff0Fix a linkb73dcb9aConsistently use "posts" as section name in examples7a56abbcFormat definitionsa9c6fd9bMinor clarification over the last commit5c86bdc8Add alternative instructions for Quick Start for non-git usersdafe7ee9Add Visual Studio Code plug-ins110ed19eUpdate HUGO_VERSION2abd031aUpdate page.mdb332f7b9Update page.mdf5a8c9d4Update static-files.md6d0c155cAdd note about relative protocol URLsa13751acTheme Warning: Remove note about unquoted URLs4c8f7d68Incorporate feedback6f2b9cf0Update Creating Themes Warning40d88d98Fix ToC example to use binary true/false4a11f3f1Fix typo2dbfc0a4Fix a typo in taxonomiesd63790efDo not mark UndocumentedFeature issues as staled7aff095Regenerate docs.json71c0826fUpdate transform.Unmarshal.md git-subtree-dir: docs git-subtree-split:49809a038b
2.0 KiB
title, description, date, categories, keywords, weight, sections_weight, draft, toc
| title | description | date | categories | keywords | weight | sections_weight | draft | toc | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Code Toggle | Code Toggle tryout and showcase. | 2018-03-16 |
|
|
60 | 60 | false | true |
The Config Toggler!
This is an example for the Config Toggle shortcode.
Its purpose is to let users choose a Config language by clicking on its corresponding tab. Upon doing so, every Code toggler on the page will be switched to the target language. Also, target language will be saved in user's localStorage so when they go to a different pages, Code Toggler display their last "toggled" config language.
{{% note %}}
The code-toggler shortcode is not an internal Hugo shortcode. This page's purpose is to test out a custom feature that we use throughout this site. See: https://github.com/gohugoio/gohugoioTheme/blob/master/layouts/shortcodes/code-toggle.html
{{% /note %}}
That Config Toggler
{{< code-toggle file="config">}}
baseURL: "https://yoursite.example.com/" title: "My Hugo Site" footnoteReturnLinkContents: "↩" permalinks: posts: /:year/:month/:title/ params: Subtitle: "Hugo is Absurdly Fast!" AuthorName: "Jon Doe" GitHubUser: "spf13" ListOfFoo: - "foo1" - "foo2" SidebarRecentLimit: 5 {{< /code-toggle >}}
Another Config Toggler!
{{< code-toggle file="theme">}}
theme.toml template for a Hugo theme
name = "Hugo Theme" license = "MIT" licenselink = "https://github.com/budparr/gohugo.io/blob/master/LICENSE.md" description = "" homepage = "https://github.com/budparr/gohugo.io" tags = ["website"] features = ["", ""] min_version = 0.18
[author] name = "Bud Parr" homepage = "https://github.com/budparr"
{{< /code-toggle >}}
Two regular code blocks
{{< code file="bf-config.toml" >}} [blackfriday] angledQuotes = true fractions = false plainIDAnchors = true extensions = ["hardLineBreak"] {{< /code >}}
{{< code file="bf-config.yml" >}} blackfriday: angledQuotes: true fractions: false plainIDAnchors: true extensions: - hardLineBreak {{< /code >}}