Skip to content

Commit

Permalink
Drop persistLang=false from UG pages (#1608)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jul 5, 2023
1 parent 397c5d4 commit 48db5dc
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 74 deletions.
30 changes: 15 additions & 15 deletions userguide/content/en/docs/adding-content/content.md
Expand Up @@ -34,7 +34,7 @@ If you've copied the example site, you already have appropriately named top-leve

If you've copied the example site and *don't* want to use one of the provided content sections, just delete the appropriate content subdirectory. Similarly, if you want to add a top-level section, just add a new subdirectory, though you'll need to specify the layout or content type explicitly in the [frontmatter](#page-frontmatter) of each page if you want to use any existing Docsy template other than the default one. For example, if you create a new directory `content/en/amazing` and want one or more pages in that custom section to use Docsy's `docs` template, you add `type: docs` to the frontmatter of each page:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand Down Expand Up @@ -79,7 +79,7 @@ Since Hugo 0.76, this has become practical without copying layouts to your site,

For example, for the `/news/` section, you can specify the following front matter in the index page which will change the type of the section and everything below it to "blog":

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand Down Expand Up @@ -126,7 +126,7 @@ cascade:

If you want to create a "docs" site, specifying something like the following in the top level `_index.md` will set all top level sections to be treated as "docs", except for "news":

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand Down Expand Up @@ -192,7 +192,7 @@ Each page file in a Hugo site has metadata frontmatter that tells Hugo about the

For example, here's the frontmatter for this page:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand Down Expand Up @@ -237,7 +237,7 @@ As of version 0.100, [Goldmark](https://github.com/yuin/goldmark/) is the only M

If you've been using versions of Hugo before 0.60 that use [`BlackFriday`](https://github.com/russross/blackfriday) as its Markdown parser, you may need to make some small changes to your site to work with the current `Goldmark` Markdown parser. In particular, if you cloned an earlier version of our example site, add the following to your `hugo.toml`/`hugo.yaml`/`hugo.json` to allow Goldmark to render raw HTML as well as Markdown:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[markup]
Expand Down Expand Up @@ -320,7 +320,7 @@ By default a docs section landing page (the `_index.md` or `_index.html` in the

To display a simple bulleted list of links to the section's pages instead, specify `simple_list: true` in the landing page's frontmatter:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand All @@ -347,7 +347,7 @@ weight: 20

To display no links at all, specify `no_list: true` in the landing page's frontmatter:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand Down Expand Up @@ -378,7 +378,7 @@ Docsy's `blog` layout also gives you a left nav menu (like the `docs` layout), a

To create different blog categories to organize your posts, create subfolders in `blog/`. For instance, in our [example site](https://github.com/google/docsy-example/tree/main/content/en/blog) we have `news` and `releases`. Each category needs to have its own `_index.md` or `_index.html` landing page file specifying the category title for it to appear properly in the left nav and top-level blog landing page. Here's the index page for `releases`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand All @@ -405,7 +405,7 @@ weight: 20

To add author and date information to blog posts, add them to the page frontmatter:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand Down Expand Up @@ -480,7 +480,7 @@ If you've just used the theme, you can still use all Docsy's provided [page bloc

The `community` landing page template has boilerplate content that's automatically filled in with the project name and community links specified in `hugo.toml`/`hugo.yaml`/`hugo.json`, providing your users with quick links to resources that help them get involved in your project. The same links are also added by default to your site footer.

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.links]
Expand Down Expand Up @@ -611,7 +611,7 @@ You can also use this directory for other files used by your project, including

Hugo will, by default, create an RSS feed for the home page and any section. For the main RSS feed you can control which sections to include by setting a site param in your `hugo.toml`/`hugo.yaml`/`hugo.json`. This is the default configuration:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
rss_sections = ["blog"]
Expand All @@ -631,7 +631,7 @@ rss_sections:

To disable all RSS feeds, add the following to your `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
disableKinds = ["RSS"]
Expand All @@ -656,7 +656,7 @@ disableKinds:

If you have enabled our [print feature](/docs/adding-content/print/) or otherwise specified section-level output formats in `hugo.toml`/`hugo.yaml`/`hugo.json`, make sure that `"RSS"` is listed as an output format, otherwise you won't get section-level RSS feeds (and your blog section won't get a nice orange RSS button). Your `hugo.toml`/`hugo.yaml`/`hugo.json` specification overrides the Hugo default [output formats](https://gohugo.io/templates/output-formats/) for sections, which are HTML and RSS.

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[outputs]
Expand Down Expand Up @@ -689,7 +689,7 @@ Hugo creates a `sitemap.xml` file for your generated site by default: for exampl

You can configure the frequency with which your sitemap is updated, your sitemap filename, and the default page priority in your `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[sitemap]
Expand All @@ -716,7 +716,7 @@ sitemap:

To override any of these values for a given page, specify it in page frontmatter:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand Down
Expand Up @@ -67,7 +67,7 @@ As soon as you use a `math` code block on your page, support of \\(\KaTeX\\) is

If you want to use inline formulae and don't have a `math` code block present in your page which triggers auto activation, you need to manually activate \\(\KaTeX\\) support. The easiest way to do so is to add a `math` attribute to the frontmatter of your page and set it to `true`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Page front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand All @@ -88,7 +88,7 @@ math: true

If you use formulae in most of your pages, you can also enable sitewide \\(\KaTeX\\) support inside the Docsy theme. To do so update `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Site configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.katex]
Expand All @@ -112,7 +112,7 @@ params:

Additionally, you can customize various \\(\KaTeX\\) options inside `hugo.toml`/`hugo.yaml`/`hugo.json`, if needed:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Site configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.katex]
Expand Down Expand Up @@ -283,7 +283,7 @@ As soon as you use a `chem` code block on your page, rendering support for chemi

If you want to use chemical formulae inline and don't have a `chem` code block present in your page which triggers auto activation, you need to manually activate rendering support for chemical formulae. The easiest way to do so is to add a `chem` attribute to the frontmatter of your page and set it to `true`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Page front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand All @@ -304,7 +304,7 @@ chem: true

If you use formulae in most of your pages, you can also enable sitewide rendering support for chemical formulae inside the Docsy theme. To do so, enable `mhchem` inside your `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Site configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.katex]
Expand Down Expand Up @@ -368,7 +368,7 @@ With hugo version 0.93 or higher, support of Mermaid diagrams is automatically e

If you are using hugo version 0.92 or lower, you need to enable Mermaid manually by updating your `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Hugo version <= 0.92 only:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.mermaid]
Expand All @@ -392,7 +392,7 @@ params:

If needed, you can define custom settings for your diagrams, such as themes, padding in your `hugo.toml`/`hugo.yaml`/`hugo.json`.

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.mermaid]
Expand Down Expand Up @@ -476,7 +476,7 @@ Foo -> Foo7: To queue

To enable/disable PlantUML, update `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.plantuml]
Expand All @@ -500,7 +500,7 @@ params:

Other optional settings are:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.plantuml]
Expand Down Expand Up @@ -609,7 +609,7 @@ Automatically renders to:
To enable/disable MarkMap, update `hugo.toml`/`hugo.yaml`/`hugo.json`:
{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.markmap]
Expand Down Expand Up @@ -650,7 +650,7 @@ As the diagram data is transported via the browser, the diagrams.net server does
To enable detection of diagrams, update `hugo.toml`/`hugo.yaml`/`hugo.json`:
{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.drawio]
Expand All @@ -674,7 +674,7 @@ params:
You can also [deploy and use your own server](https://github.com/jgraph/docker-drawio/blob/master/README.md) for editing diagrams, in which case update the configuration to point to that server:
{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.drawio]
Expand Down
8 changes: 4 additions & 4 deletions userguide/content/en/docs/adding-content/feedback.md
Expand Up @@ -38,7 +38,7 @@ _requires_ `gtag.js`) and Universal Analytics (UA) site tags. If you prefer usin
the older `analytics.js` library for your UA site tag, then set
`params.disableGtagForUniversalAnalytics` to `true` in your project's [configuration file].

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params]
Expand Down Expand Up @@ -136,7 +136,7 @@ other words!
2. Ensure that Google Analytics is enabled, as described [above](#setup).
3. Set the response text that users see after clicking **Yes** or **No**.

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}

{{< tab header="hugo.toml" lang="toml" >}}
Expand Down Expand Up @@ -219,7 +219,7 @@ response text.
Add the parameter `hide_feedback` to the page's front matter and set it to
`true`.

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Front matter:" disabled=true />}}
{{< tab header="toml" lang="toml" >}}
+++
Expand All @@ -243,7 +243,7 @@ hide_feedback: true
Set `params.ui.feedback.enable` to `false` in
`hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.ui.feedback]
Expand Down
2 changes: 1 addition & 1 deletion userguide/content/en/docs/adding-content/iconsimages.md
Expand Up @@ -14,7 +14,7 @@ overrides the default Docsy logo in the theme.
If you don't want a logo to appear in the navbar, then set `navbar_logo` to
`false` in your project's config:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
navbar_logo = false
Expand Down
6 changes: 3 additions & 3 deletions userguide/content/en/docs/adding-content/lookandfeel.md
Expand Up @@ -93,7 +93,7 @@ When you use `.-bg-<color>`, the text colors will be adjusted to get proper cont

With Hugo version 0.60 and higher, you can choose from a range of code block highlight and colour styles using [Chroma](https://github.com/alecthomas/chroma) that are applied to your fenced code blocks by default. If you copied a recent `hugo.toml` your site uses Tango (like this site), otherwise the Hugo default is Monokai. You can switch to any of the [available Chroma styles](https://xyproto.github.io/splash/docs/all.html) (including our Docsy default Tango) using your `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[markup]
Expand Down Expand Up @@ -130,7 +130,7 @@ markup:

By default code highlighting styles are not applied to code blocks without a specified language, instead you get Docsy's default style of grey with black text. If you would like the code highlighting style to apply to all code blocks, even without a language, uncomment or add the following line under `[markup.highlight]` in your `hugo.toml`/`hugo.yaml`/`hugo.json`.

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
# Uncomment if you want your chosen highlight style used for code blocks without a specified language
Expand All @@ -155,7 +155,7 @@ You can find out more about code highlighting in Hugo with Chroma in [Syntax Hig

Optionally, you can enable Prism syntax highlighting in your `hugo.toml`/`hugo.yaml`/`hugo.json`:

{{< tabpane persistLang=false >}}
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
# Enable syntax highlighting and copy buttons on code blocks with Prism
Expand Down

0 comments on commit 48db5dc

Please sign in to comment.