Add admonition type to shortcode (#9482)
* Change existing admon blocks * Fix includes issue
This commit is contained in:
committed by
k8s-ci-robot
parent
e839031292
commit
d65e1790ff
@@ -9,7 +9,6 @@ This page shows how to automatically generate reference pages for the
|
||||
commands provided by the `kubectl` tool.
|
||||
|
||||
{{< note >}}
|
||||
**Note:**
|
||||
This topic shows how to generate reference documentation for
|
||||
[kubectl commands](/docs/reference/generated/kubectl/kubectl-commands)
|
||||
like
|
||||
@@ -132,7 +131,6 @@ on how to do this, see
|
||||
Monitor your cherry-pick pull request until it is merged into the release branch.
|
||||
|
||||
{{< note >}}
|
||||
**Note:**
|
||||
Proposing a cherry pick requires that you have permission to set a label and a
|
||||
milestone in your pull request. If you don’t have those permissions, you will
|
||||
need to work with someone who can set the label and milestone for you.
|
||||
|
||||
@@ -98,7 +98,7 @@ or more comments in the Kubernetes source code.
|
||||
### Making changes to comments in the source code
|
||||
|
||||
{{< note >}}
|
||||
**Note**: The following steps are an example, not a general procedure. Details
|
||||
The following steps are an example, not a general procedure. Details
|
||||
will be different in your situation.
|
||||
{{< /note >}}
|
||||
|
||||
@@ -184,7 +184,7 @@ to monitor your pull request until it has been merged.
|
||||
is an example of a pull request that fixes a typo in the Kubernetes source code.
|
||||
|
||||
{{< note >}}
|
||||
**Note**: It can be tricky to determine the correct source file to be changed. In the
|
||||
It can be tricky to determine the correct source file to be changed. In the
|
||||
preceding example, the authoritative source file is under the `staging` directory
|
||||
in the `kubernetes/kubernetes` repository. But in your situation,the `staging` directory
|
||||
might not be the place to find the authoritative source. For guidance, check the
|
||||
@@ -208,9 +208,11 @@ commit into the release-1.9 branch. The idea is to cherry pick the commit that e
|
||||
the commit that has the results of running the scripts. For instructions, see
|
||||
[Propose a Cherry Pick](https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md).
|
||||
|
||||
**Note:** Proposing a cherry pick requires that you have permission to set a label and a milestone in your
|
||||
{{< note >}}
|
||||
Proposing a cherry pick requires that you have permission to set a label and a milestone in your
|
||||
pull request. If you don't have those permissions, you will need to work with someone who can set the label
|
||||
and milestone for you.
|
||||
{{< /note >}}
|
||||
|
||||
When you have a pull request in place for cherry picking your one commit into the release-1.9 branch,
|
||||
the next step is to run these scripts in the release-1.9 branch of your local environment.
|
||||
|
||||
@@ -71,7 +71,6 @@ your base directory is `$GOPATH/src/github.com/kubernetes/kubernetes.`
|
||||
The remaining steps refer to your base directory as `<k8s-base>`.
|
||||
|
||||
{{< note >}}
|
||||
**Note:**
|
||||
If you only need to generate, but not change, the reference docs, you don't need to
|
||||
manually get the `kubernetes/kubernetes` repository. When you run the `update-imported-docs`
|
||||
tool, it automatically clones the `kubernetes/kubernetes` repository.
|
||||
@@ -109,7 +108,7 @@ to do this, see
|
||||
Monitor your cherry-pick pull request until it is merged into the release branch.
|
||||
|
||||
{{< note >}}
|
||||
**Note:** Proposing a cherry pick requires that you have permission to set a label
|
||||
Proposing a cherry pick requires that you have permission to set a label
|
||||
and a milestone in your pull request. If you don’t have those permissions, you will
|
||||
need to work with someone who can set the label and milestone for you.
|
||||
{{< /note >}}
|
||||
|
||||
@@ -12,8 +12,7 @@ This page assumes that you've read and mastered the tasks in the
|
||||
learn about more ways to contribute.
|
||||
|
||||
{{< note >}}
|
||||
**Note:** Some tasks require you to use the Git command line client and other
|
||||
tools.
|
||||
Some tasks require you to use the Git command line client and other tools.
|
||||
{{< /note >}}
|
||||
|
||||
{{% /capture %}}
|
||||
@@ -387,11 +386,11 @@ most up-to-date version of that branch.
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
**Note:** Do not reference a Github issue or pull request by ID or URL in the
|
||||
commit message. If you do, it will cause that issue or pull request to get
|
||||
a notification every time the commit shows up in a new Git branch. You can
|
||||
link issues and pull requests together later, in the Github UI.
|
||||
{{< /note >}}
|
||||
Do not reference a Github issue or pull request by ID or URL in the
|
||||
commit message. If you do, it will cause that issue or pull request to get
|
||||
a notification every time the commit shows up in a new Git branch. You can
|
||||
link issues and pull requests together later, in the Github UI.
|
||||
{{< /note >}}
|
||||
|
||||
5. Optionally, you can test your change by staging the site locally using the
|
||||
`hugo` command. See [View your changes locally](#view-your-changes-locally).
|
||||
|
||||
@@ -29,6 +29,10 @@ Localizations must meet some requirements for workflow (*how* to localize) and o
|
||||
|
||||
To add a new localization of the Kubernetes documentation, you'll need to update the website by modifying the [site configuration](#modify-the-site-configuration) and [directory structure](#add-a-new-localization-directory). Then you can start [translating documents](#translating-documents)!
|
||||
|
||||
{{< note >}}
|
||||
For an example localization-related [pull request](../create-pull-request), see [this pull request](https://github.com/kubernetes/website/pull/8636) to the [Kubernetes website repo](https://github.com/kubernetes/website) adding Korean localization to the Kubernetes docs.
|
||||
{{< /note >}}
|
||||
|
||||
Let Kubernetes SIG Docs know you're interested in creating a localization! Join the [SIG Docs Slack channel](https://kubernetes.slack.com/messages/C1J0BPD2M/). We're happy to help you get started and answer any questions you have.
|
||||
|
||||
All localization teams must be self-sustaining with their own resources. We're happy to host your work, but we can't translate it for you.
|
||||
|
||||
@@ -213,7 +213,7 @@ documentation.
|
||||
include more detail if appropriate.
|
||||
|
||||
{{< note >}}
|
||||
**Note**: Do not include references to other Github issues or pull
|
||||
Do not include references to other Github issues or pull
|
||||
requests in your commit message. You can add those to the pull request
|
||||
description later.
|
||||
{{< /note >}}
|
||||
@@ -231,7 +231,7 @@ description later.
|
||||
**Create pull request**.
|
||||
|
||||
{{< note >}}
|
||||
**Note**: If you don't want to create the pull request now, you can do it
|
||||
If you don't want to create the pull request now, you can do it
|
||||
later, by browsing to the main URL of the Kubernetes website repository or
|
||||
your fork's repository. The Github website will prompt you to create the
|
||||
pull request if it detects that you pushed a new branch to your fork.
|
||||
|
||||
@@ -32,7 +32,7 @@ weight: 10
|
||||
|
||||
|
||||
{{% note %}}
|
||||
**Note:** For page weights, it can be smart not to use 1, 2, 3 ..., but some other interval, say 10, 20, 30... This allows you to insert pages where you want later.
|
||||
For page weights, it can be smart not to use 1, 2, 3 ..., but some other interval, say 10, 20, 30... This allows you to insert pages where you want later.
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ linkTitle: Title used in links
|
||||
|
||||
|
||||
{{% note %}}
|
||||
**Note:** The above needs to be done per language. If you don't see your section in the menu, it is probably because it is not identified as a section by Hugo. Create a `_index.md` content file in the section folder.
|
||||
The above needs to be done per language. If you don't see your section in the menu, it is probably because it is not identified as a section by Hugo. Create a `_index.md` content file in the section folder.
|
||||
{{% /note %}}
|
||||
|
||||
### Documentation Side Menu
|
||||
|
||||
@@ -5,5 +5,5 @@ title: Example #1
|
||||
This is an **example** content file inside the **includes** leaf bundle.
|
||||
|
||||
{{< note >}}
|
||||
**Note:** Included content files can also contain shortcodes.
|
||||
Included content files can also contain shortcodes.
|
||||
{{< /note >}}
|
||||
@@ -154,7 +154,9 @@ println "This is tab 2."
|
||||
{{</* tabs name="tab_with_md" >}}
|
||||
{{% tab name="Markdown" %}}
|
||||
This is **some markdown.**
|
||||
{{< note >}}**Note:** It can even contain shortcodes.{{< /note >}}
|
||||
{{< note >}}
|
||||
It can even contain shortcodes.
|
||||
{{< /note >}}
|
||||
{{% /tab %}}
|
||||
{{< tab name="HTML" >}}
|
||||
<div>
|
||||
@@ -170,7 +172,11 @@ Will be rendered as:
|
||||
{{< tabs name="tab_with_md" >}}
|
||||
{{% tab name="Markdown" %}}
|
||||
This is **some markdown.**
|
||||
{{< note >}}**Note:** It can even contain shortcodes.{{< /note >}}
|
||||
|
||||
{{< note >}}
|
||||
It can even contain shortcodes.
|
||||
{{< /note >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< tab name="HTML" >}}
|
||||
<div>
|
||||
|
||||
@@ -15,7 +15,7 @@ directory of the [`kubernetes/website`](https://github.com/kubernetes/website)
|
||||
repository.
|
||||
|
||||
{{< note >}}
|
||||
**Note**: Every new topic needs to use a template. If you are unsure which
|
||||
Every new topic needs to use a template. If you are unsure which
|
||||
template to use for a new topic, start with the
|
||||
[concept template](#concept-template).
|
||||
{{< /note >}}
|
||||
|
||||
@@ -19,7 +19,7 @@ docs, follow the instructions on
|
||||
{{% capture body %}}
|
||||
|
||||
{{< note >}}
|
||||
**Note:** Kubernetes documentation uses [Blackfriday Markdown Renderer](https://github.com/russross/blackfriday) along with a few [Hugo Shortcodes](/docs/home/contribute/includes/) to support glossary entries, tabs,
|
||||
Kubernetes documentation uses [Blackfriday Markdown Renderer](https://github.com/russross/blackfriday) along with a few [Hugo Shortcodes](/docs/home/contribute/includes/) to support glossary entries, tabs,
|
||||
and representing feature state.
|
||||
{{< /note >}}
|
||||
|
||||
@@ -189,7 +189,8 @@ A list of Kubernetes-specific terms and words to be used consistently across the
|
||||
</table>
|
||||
|
||||
## Shortcodes
|
||||
Hugo [Shortcodes](https://gohugo.io/content-management/shortcodes) help create different rhetorical appeal levels. Our documentation supports three different shortcodes in this category: **Note:** {{</* note */>}}, **Caution:** {{</* caution */>}}, and **Warning:** {{</* warning */>}}.
|
||||
|
||||
Hugo [Shortcodes](https://gohugo.io/content-management/shortcodes) help create different rhetorical appeal levels. Our documentation supports three different shortcodes in this category: **Note** {{</* note */>}}, **Caution** {{</* caution */>}}, and **Warning** {{</* warning */>}}.
|
||||
|
||||
1. Surround the text with an opening and closing shortcode.
|
||||
|
||||
@@ -197,7 +198,7 @@ Hugo [Shortcodes](https://gohugo.io/content-management/shortcodes) help create d
|
||||
|
||||
```
|
||||
{{</* note */>}}
|
||||
**Note:** The prefix you use is the same text you use in the tag.
|
||||
No need to include a prefix; the shortcode automatically provides on (Note:, Caution:, etc.).
|
||||
{{</* /note */>}}
|
||||
```
|
||||
|
||||
@@ -205,7 +206,7 @@ Hugo [Shortcodes](https://gohugo.io/content-management/shortcodes) help create d
|
||||
The output is:
|
||||
|
||||
{{< note >}}
|
||||
**Note:** The prefix you choose is the same text for the tag.
|
||||
The prefix you choose is the same text for the tag.
|
||||
{{< /note >}}
|
||||
|
||||
### Note
|
||||
@@ -216,14 +217,14 @@ For example:
|
||||
|
||||
```
|
||||
{{</* note */>}}
|
||||
**Note:** You can _still_ use Markdown inside these callouts.
|
||||
You can _still_ use Markdown inside these callouts.
|
||||
{{</* /note */>}}
|
||||
```
|
||||
|
||||
The output is:
|
||||
|
||||
{{< note >}}
|
||||
**Note:** You can _still_ use Markdown inside these callouts.
|
||||
You can _still_ use Markdown inside these callouts.
|
||||
{{< /note >}}
|
||||
|
||||
### Caution
|
||||
@@ -234,14 +235,14 @@ For example:
|
||||
|
||||
```
|
||||
{{</* caution */>}}
|
||||
**Caution:** The callout style only applies to the line directly above the tag.
|
||||
The callout style only applies to the line directly above the tag.
|
||||
{{</* /caution */>}}
|
||||
```
|
||||
|
||||
The output is:
|
||||
|
||||
{{< caution >}}
|
||||
**Caution:** The callout style only applies to the line directly above the tag.
|
||||
The callout style only applies to the line directly above the tag.
|
||||
{{< /caution >}}
|
||||
|
||||
### Warning
|
||||
@@ -252,7 +253,7 @@ For example:
|
||||
|
||||
```
|
||||
{{</* warning */>}}
|
||||
**Warning:** Beware.
|
||||
Beware.
|
||||
{{</* /warning */>}}
|
||||
```
|
||||
|
||||
@@ -260,7 +261,7 @@ For example:
|
||||
The output is:
|
||||
|
||||
{{< warning >}}
|
||||
**Warning:** Beware.
|
||||
Beware.
|
||||
{{< /warning >}}
|
||||
|
||||
### Katacoda Embedded Live Environment
|
||||
@@ -273,7 +274,7 @@ The Embedded Live Environment is configured to run `minikube start` and lets use
|
||||
as the documentation.
|
||||
|
||||
{{< caution >}}
|
||||
**Caution:** The session is limited to 15 minutes.
|
||||
The session is limited to 15 minutes.
|
||||
{{< /caution >}}
|
||||
|
||||
For example:
|
||||
@@ -306,7 +307,8 @@ The output is:
|
||||
1. Preheat oven to 350˚F
|
||||
|
||||
1. Prepare the batter, and pour into springform pan.
|
||||
{{< note >}}**Note:** Grease the pan for best results.{{< /note >}}
|
||||
|
||||
{{< note >}}Grease the pan for best results.{{< /note >}}
|
||||
|
||||
1. Bake for 20-25 minutes or until set.
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ file located at `/content/en/examples/pods/storage/gce-volume.yaml`.
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
**Note**: To show raw Hugo shortcodes as in the above example and prevent Hugo
|
||||
To show raw Hugo shortcodes as in the above example and prevent Hugo
|
||||
from interpreting them, use C-style comments directly after the `<` and before
|
||||
the `>` characters. View the code for this page for an example.
|
||||
{{< /note >}}
|
||||
@@ -155,7 +155,7 @@ kubectl create -f https://k8s.io/examples/pods/storage/gce-volume.yaml
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
**Note**: When adding new YAML files to the `<LANG>/examples` directory, make
|
||||
When adding new YAML files to the `<LANG>/examples` directory, make
|
||||
sure the file is also included into the `<LANG>/examples_test.go` file. The
|
||||
Travis CI for the Website automatically runs this test case when PRs are
|
||||
submitted to ensure all examples pass the tests.
|
||||
|
||||
Reference in New Issue
Block a user