Applying upstream feedback (#21)
* Smoke test content * Adding github button * Moving content to right, nav to left * Updating colour scheme * Reorganizing home page Signed-off-by: Nate W <nwaddington@cncf.io>
This commit is contained in:
parent
0f1f0e1a9e
commit
b86dfb7e45
|
@ -3,7 +3,7 @@
|
|||
This repository contains a boilerplate static site generator setup for creating CNCF documentation projects. We strongly recommend using this setup (it helps us help you and your project!), but none of the technologies in the stack are strictly required.
|
||||
|
||||
The starter uses the following:
|
||||
* **[Hugo](https://gohugo.io/)** as a static site generator
|
||||
* **[Hugo (extended, v0.73 or above)](https://gohugo.io/)** as a static site generator
|
||||
* **[Bootstrap 4.5.x](https://getbootstrap.com/docs/4.5/getting-started/introduction/)** as a CSS framework
|
||||
* **[Netlify](https://www.netlify.com/)** for building, hosting, and DNS management
|
||||
|
||||
|
|
|
@ -101,3 +101,37 @@ nav
|
|||
padding-left: 0
|
||||
ul
|
||||
padding-left: 1.5rem
|
||||
|
||||
.jumbotron img
|
||||
@extend .img-fluid
|
||||
max-width: 90%
|
||||
height: auto
|
||||
|
||||
.jumbotron
|
||||
background-color: #9cd9ce65
|
||||
|
||||
|
||||
.td-content, body
|
||||
blockquote.callout
|
||||
padding: 0.4rem 0.4rem 0.4rem 1rem
|
||||
border: 1px solid #eee
|
||||
border-left-width: 0.5em
|
||||
background: #fff
|
||||
color: #000
|
||||
margin-top: 0.5em
|
||||
margin-bottom: 0.5em
|
||||
|
||||
blockquote.callout
|
||||
border-radius: calc(1em/3)
|
||||
|
||||
.callout.caution
|
||||
border-left-color: #f0ad4e
|
||||
|
||||
.callout.note
|
||||
border-left-color: #428bca
|
||||
|
||||
.callout.warning
|
||||
border-left-color: #d9534f
|
||||
|
||||
h1:first-of-type + blockquote.callout
|
||||
margin-top: 1.5em
|
||||
|
|
16
config.toml
16
config.toml
|
@ -1,6 +1,5 @@
|
|||
title = "CNI"
|
||||
disableKinds = ["taxonomy", "taxonomyTerm"]
|
||||
copyright = "Cloud Native Computing Foundation."
|
||||
|
||||
enableGitInfo = true
|
||||
|
||||
|
@ -8,6 +7,7 @@ enableGitInfo = true
|
|||
style = "paraiso-dark"
|
||||
|
||||
[params]
|
||||
projectName = "CNI"
|
||||
font_awesome_version = "5.12.0"
|
||||
description = "The Container Network Interface"
|
||||
favicon = "favicon.png"
|
||||
|
@ -17,6 +17,12 @@ contentDir = "/content/"
|
|||
[params.logos]
|
||||
navbar = "cni-horizontal-color.png"
|
||||
|
||||
[[params.social]]
|
||||
name = "GitHub"
|
||||
color = "#000000"
|
||||
url = "https://github.com/containernetworking"
|
||||
icon = "fab fa-github"
|
||||
|
||||
[[params.social]]
|
||||
name = "Twitter"
|
||||
color = "#00aced"
|
||||
|
@ -44,11 +50,7 @@ url = "/"
|
|||
weight = 1
|
||||
|
||||
[[menu.main]]
|
||||
name = "Test Content"
|
||||
url = "/test-content/"
|
||||
name = "Sample Content"
|
||||
url = "/docs/"
|
||||
weight = 2
|
||||
|
||||
[[menu.main]]
|
||||
name = "Theme Documentation"
|
||||
url = "#"
|
||||
weight = 3
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: "Sample Docs Index"
|
||||
description: "Index of the sample docs section"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
toc: true
|
||||
---
|
||||
|
||||
# This is index content
|
||||
Tempor enim dolor magna elit. Aliquip enim sint fugiat et id et occaecat. Ea aliquip anim commodo amet magna amet.
|
||||
|
||||
Fugiat sit enim reprehenderit occaecat ex dolore commodo irure ea in pariatur. Sint dolore proident non proident incididunt enim. Commodo ex deserunt ipsum laboris minim officia labore. Reprehenderit elit dolore ipsum sunt ea id amet. Ea laboris sint reprehenderit ullamco ullamco Lorem amet. Cillum commodo proident amet dolore labore veniam velit eiusmod velit dolore. Adipisicing veniam ullamco aute nulla enim aliqua officia sint do ullamco incididunt nisi ad fugiat.
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: "Section 1 index"
|
||||
linkTitle: "Section 1 index and linkTitle Sample"
|
||||
description: "Example description text, lorem ipsum dolor sit amet make it look good"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
draft: true
|
||||
toc: true
|
||||
weight: 1
|
||||
---
|
||||
|
||||
## Section 1 {#section-1}
|
||||
|
||||
Labore occaecat fugiat consequat eiusmod occaecat ullamco enim adipisicing fugiat consequat reprehenderit labore. Nisi consectetur laboris cupidatat esse amet sunt officia deserunt aliquip non anim. Nostrud elit reprehenderit consectetur consectetur laborum est labore ex sint.
|
||||
|
||||
## Section 2
|
||||
|
||||
Occaecat aliqua cillum tempor proident amet aliquip. Amet nulla qui dolore id cillum dolor laboris ipsum in esse consequat. Enim pariatur elit do officia ea nisi Lorem. Magna do ea deserunt aliquip dolore eu aliquip sunt in commodo commodo.
|
||||
|
||||
|
||||
- Nisi dolor ullamco enim quis
|
||||
- Aute reprehenderit aliqua ad amet
|
||||
- Lorem ex reprehenderit Lorem est
|
||||
- Cupidatat est ullamco tempor
|
||||
|
||||
### Subsection 1
|
||||
|
||||
Enim culpa tempor ut deserunt sint commodo adipisicing. Aliqua exercitation cupidatat aliqua fugiat officia velit ullamco adipisicing. Non aute culpa veniam laborum. Pariatur magna consectetur ea est deserunt elit ullamco ullamco qui. Mollit nostrud aute non Lorem laboris nulla sint tempor esse occaecat est. Id cupidatat consectetur ea enim nisi laborum exercitation laboris qui. Anim veniam anim aliquip amet.
|
||||
|
||||
### Subsection 2 1 with a very very long title 1 with a very very long title 1 with a very very long title
|
||||
|
||||
Pariatur ad ad aute nulla. Enim anim incididunt elit aliquip nisi aliqua tempor sunt ut officia sit exercitation exercitation. Aliquip ullamco Lorem duis elit. Tempor ut et in officia commodo. Ut ut nostrud laborum nostrud commodo incididunt et do labore ullamco adipisicing cupidatat adipisicing. Elit reprehenderit esse irure officia irure tempor excepteur amet quis nisi.
|
||||
|
||||
#### Subsubsection 1 with a very very long title
|
||||
|
||||
Hello world `code`
|
||||
|
||||
```shell
|
||||
codeblock
|
||||
```
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
title: "Section 1 Child Page 2"
|
||||
description: "Example description text, lorem ipsum dolor sit amet make it look good"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
draft: true
|
||||
toc: true
|
||||
weight: 3
|
||||
---
|
||||
|
||||
## Section 1 {#section-1}
|
||||
|
||||
Et velit sint sint laborum irure sunt cillum. Dolore amet sit ullamco consectetur proident. Fugiat ut adipisicing fugiat irure incididunt cupidatat nulla occaecat incididunt do ex elit excepteur nulla. Do Lorem proident nisi aute anim. Id nisi anim aliqua nostrud proident cillum.
|
||||
|
||||
## Section 2
|
||||
|
||||
Nisi culpa qui proident in do officia in. Aute culpa cupidatat magna et nostrud ea ad culpa anim magna incididunt id. Magna reprehenderit duis cupidatat labore eiusmod consequat id velit pariatur veniam do irure. Ex duis aliqua nisi laborum elit esse non ipsum aute qui ut deserunt adipisicing aute. Enim nostrud incididunt eiusmod nulla ut occaecat reprehenderit fugiat quis aliquip duis ea sunt ad. Elit elit irure ea ullamco nostrud. Nisi consectetur veniam eu anim commodo adipisicing.
|
||||
|
||||
- Duis elit consectetur ipsum Lorem aute
|
||||
- Magna consequat veniam ipsum eiusmod quis
|
||||
- Id fugiat non sint minim dolor fugiat eu dolore
|
||||
- Nisi incididunt adipisicing deserunt
|
||||
|
||||
### Subsection 1
|
||||
|
||||
Irure dolor laboris in tempor. Cillum adipisicing excepteur eiusmod sit enim quis aliquip. Mollit eu sint proident ex proident ullamco voluptate nostrud non ut et consequat. Eiusmod deserunt deserunt nulla ut.
|
||||
|
||||
### Subsection 2 1 with a very very long title 1 with a very very long title 1 with a very very long title
|
||||
|
||||
Elit esse fugiat consequat veniam laboris. Commodo nisi occaecat duis deserunt ea dolore enim exercitation irure. Elit ullamco ad deserunt officia ex eu proident laborum irure amet incididunt.
|
||||
|
||||
#### Subsubsection 1 with a very very long title
|
||||
|
||||
Hello world `code`
|
||||
|
||||
```shell
|
||||
codeblock
|
||||
```
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
title: "Section 1 Child Page 1"
|
||||
description: "Example description text, lorem ipsum dolor sit amet make it look good"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
draft: true
|
||||
toc: true
|
||||
weight: 2
|
||||
---
|
||||
|
||||
## Section 1 {#section-1}
|
||||
|
||||
Et eu in excepteur sunt nisi ipsum excepteur ullamco adipisicing et. Sint deserunt nulla esse excepteur occaecat ex quis eiusmod culpa et ipsum. Laborum mollit deserunt ad ea. Fugiat est aliqua cupidatat pariatur tempor ipsum ad ullamco in do nisi nostrud fugiat. Commodo eiusmod tempor nisi esse incididunt mollit ipsum deserunt et aute.
|
||||
|
||||
## Section 2
|
||||
|
||||
Cillum cillum officia cupidatat occaecat laboris sit velit sit enim ad. Officia sit et mollit aliqua aute. Incididunt cillum laboris nulla consectetur do do non officia. Reprehenderit qui duis cupidatat nulla occaecat non ut fugiat magna non voluptate id. Reprehenderit aute excepteur aliquip irure. Amet proident amet do culpa eiusmod eu aliquip velit fugiat eiusmod.
|
||||
|
||||
- Qui id ipsum aliquip sint dolor in magna nisi
|
||||
- Sit sint aute deserunt amet dolore
|
||||
- Nulla fugiat reprehenderit officia commodo amet excepteur
|
||||
- Occaecat dolore veniam do
|
||||
|
||||
### Subsection 1
|
||||
|
||||
Nisi Lorem velit aliquip non ad laboris qui sunt. Eiusmod non amet id duis. Ea magna sint proident laborum do elit ipsum esse occaecat consectetur laboris.
|
||||
|
||||
### Subsection 2 1 with a very very long title 1 with a very very long title 1 with a very very long title
|
||||
|
||||
Officia ad sint cillum voluptate pariatur voluptate. Consectetur sit laborum aute sunt nulla ullamco minim cillum. Ex ea est consectetur ea eu occaecat irure amet aliquip id.
|
||||
|
||||
#### Subsubsection 1 with a very very long title
|
||||
|
||||
Hello world `code`
|
||||
|
||||
```shell
|
||||
codeblock
|
||||
```
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
---
|
||||
title: "Content page in /docs/"
|
||||
description: "Example description text, lorem ipsum dolor sit amet make it look good"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
draft: true
|
||||
toc: true
|
||||
weight: 20
|
||||
---
|
||||
|
||||
## Section 1 {#section-1}
|
||||
|
||||
Eiusmod veniam in tempor amet ex enim. Et nulla dolor ut cillum Lorem minim magna occaecat ea exercitation. Ex duis aliqua ullamco veniam cillum ea quis ad nisi laboris do deserunt amet. Aliqua Lorem veniam mollit voluptate consectetur ipsum deserunt nisi.
|
||||
|
||||
## Section 2
|
||||
|
||||
Dolore labore pariatur deserunt tempor elit cillum pariatur anim dolor laboris est nisi tempor. Enim irure laboris cillum mollit cupidatat aliquip in eu ad consequat velit. Magna irure nostrud non irure nulla. Eu velit in in dolor id aliqua aliquip aute laborum sunt velit commodo deserunt.
|
||||
|
||||
- Adipisicing est aliquip sunt cupidatat laborum culpa
|
||||
- Eiusmod sit eiusmod eu ea fugiat non do
|
||||
- Aliquip aliqua ut consectetur elit
|
||||
- Enim velit amet consectetur consectetur proident
|
||||
|
||||
### Subsection 1
|
||||
|
||||
Dolore commodo exercitation sit adipisicing aliquip nisi aliquip quis ex pariatur enim dolore ut commodo. Id cillum minim sunt consectetur aute et cillum. Ex nisi consectetur sint tempor elit est pariatur tempor.
|
||||
|
||||
### Subsection 2 1 with a very very long title 1 with a very very long title 1 with a very very long title
|
||||
|
||||
Ipsum magna labore aute consectetur. Quis deserunt laborum quis dolor fugiat aute ad. Et incididunt ullamco ipsum ad magna anim magna ullamco non est deserunt et deserunt irure. Sit tempor voluptate ipsum et ex.
|
||||
|
||||
#### Subsubsection 2 1 1 with a very very long title
|
||||
|
||||
This is `what a preformatted string` looks like.
|
||||
|
||||
Code blocks can be formatted using ```, like so:
|
||||
~~~
|
||||
```bash
|
||||
$ example command
|
||||
bash: example: command not found
|
||||
```
|
||||
~~~
|
||||
generating:
|
||||
```bash
|
||||
$ example command
|
||||
bash: example: command not found
|
||||
```
|
||||
|
|
@ -0,0 +1,325 @@
|
|||
---
|
||||
title: Docs smoke test page
|
||||
description: "Smoke test page, repurposed from https://github.com/kubernetes/website/blob/master/content/en/docs/test.md"
|
||||
main_menu: false
|
||||
---
|
||||
|
||||
This page serves two purposes:
|
||||
|
||||
- Demonstrate how the CNCF Hugo Netlify Starter uses Markdown
|
||||
- Provide a "smoke test" document we can use to test HTML, CSS, and template
|
||||
changes that affect the overall documentation.
|
||||
|
||||
## Heading levels
|
||||
|
||||
The above heading is an H2. The page title renders as an H1. The following
|
||||
sections show H3-H6.
|
||||
|
||||
### H3
|
||||
|
||||
This is in an H3 section.
|
||||
|
||||
#### H4
|
||||
|
||||
This is in an H4 section.
|
||||
|
||||
##### H5
|
||||
|
||||
This is in an H5 section.
|
||||
|
||||
###### H6
|
||||
|
||||
This is in an H6 section.
|
||||
|
||||
## Inline elements
|
||||
|
||||
Inline elements show up within the text of paragraph, list item, admonition, or
|
||||
other block-level element.
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
|
||||
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
||||
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
|
||||
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
||||
culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
### Inline text styles
|
||||
|
||||
- **bold**
|
||||
- _italic_
|
||||
- ***bold italic***
|
||||
- ~~strikethrough~~
|
||||
- <u>underline</u>
|
||||
- _<u>underline italic</u>_
|
||||
- **<u>underline bold</u>**
|
||||
- ***<u>underline bold italic</u>***
|
||||
- `monospace text`
|
||||
- **`monospace bold`**
|
||||
|
||||
## Lists
|
||||
|
||||
Markdown doesn't have strict rules about how to process lists. When we moved
|
||||
from Jekyll to Hugo, we broke some lists. To fix them, keep the following in
|
||||
mind:
|
||||
|
||||
- Make sure you indent sub-list items **2 spaces**.
|
||||
|
||||
- To end a list and start another, you need a HTML comment block on a new line
|
||||
between the lists, flush with the left-hand border. The first list won't end
|
||||
otherwise, no matter how many blank lines you put between it and the second.
|
||||
|
||||
### Bullet lists
|
||||
|
||||
- This is a list item
|
||||
* This is another list item in the same list
|
||||
- You can mix `-` and `*`
|
||||
- To make a sub-item, indent two spaces.
|
||||
- This is a sub-sub-item. Indent two more spaces.
|
||||
- Another sub-item.
|
||||
|
||||
<!-- separate lists -->
|
||||
|
||||
- This is a new list. With Hugo, you need to use a HTML comment to separate two
|
||||
consecutive lists. **The HTML comment needs to be at the left margin.**
|
||||
- Bullet lists can have paragraphs or block elements within them.
|
||||
|
||||
Indent the content to be the same as the first line of the bullet point.
|
||||
**This paragraph and the code block line up with the first `B` in `Bullet`
|
||||
above.**
|
||||
|
||||
```bash
|
||||
ls -l
|
||||
```
|
||||
|
||||
- And a sub-list after some block-level content
|
||||
|
||||
- A bullet list item can contain a numbered list.
|
||||
1. Numbered sub-list item 1
|
||||
2. Numbered sub-list item 2
|
||||
|
||||
### Numbered lists
|
||||
|
||||
1. This is a list item
|
||||
2. This is another list item in the same list. The number you use in Markdown
|
||||
does not necessarily correlate to the number in the final output. By
|
||||
convention, we keep them in sync.
|
||||
3. {{<note>}}
|
||||
For single-digit numbered lists, using two spaces after the period makes
|
||||
interior block-level content line up better along tab-stops.
|
||||
{{</note>}}
|
||||
|
||||
<!-- separate lists -->
|
||||
|
||||
1. This is a new list. With Hugo, you need to use a HTML comment to separate
|
||||
two consecutive lists. **The HTML comment needs to be at the left margin.**
|
||||
2. Numbered lists can have paragraphs or block elements within them.
|
||||
|
||||
Just indent the content to be the same as the first line of the bullet
|
||||
point. **This paragraph and the code block line up with the `N` in
|
||||
`Numbered` above.**
|
||||
|
||||
```bash
|
||||
ls -l
|
||||
```
|
||||
|
||||
- And a sub-list after some block-level content. This is at the same
|
||||
"level" as the paragraph and code block above, despite being indented
|
||||
more.
|
||||
|
||||
### Tab lists
|
||||
|
||||
Tab lists can be used to conditionally display content, e.g., when multiple
|
||||
options must be documented that require distinct instructions or context.
|
||||
|
||||
{{< tabs name="tab_lists_example" >}}
|
||||
{{% tab name="Choose one..." %}}
|
||||
Please select an option.
|
||||
{{% /tab %}}
|
||||
{{% tab name="Formatting tab lists" %}}
|
||||
|
||||
Tabs may also nest formatting styles.
|
||||
|
||||
1. Ordered
|
||||
1. (Or unordered)
|
||||
1. Lists
|
||||
|
||||
```bash
|
||||
echo 'Tab lists may contain code blocks!'
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab name="Nested headers" %}}
|
||||
|
||||
### Header within a tab list
|
||||
|
||||
Nested header tags may also be included.
|
||||
|
||||
{{< warning >}}
|
||||
Headers within tab lists will not appear in the Table of Contents.
|
||||
{{< /warning >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tabs >}}
|
||||
|
||||
### Checklists
|
||||
|
||||
Checklists are technically bullet lists, but the bullets are suppressed by CSS.
|
||||
|
||||
- [ ] This is a checklist item
|
||||
- [x] This is a selected checklist item
|
||||
|
||||
## Code blocks
|
||||
|
||||
You can create code blocks two different ways by surrounding the code block with
|
||||
three back-tick characters on lines before and after the code block. **Only use
|
||||
back-ticks (code fences) for code blocks.** This allows you to specify the
|
||||
language of the enclosed code, which enables syntax highlighting. It is also more
|
||||
predictable than using indentation.
|
||||
|
||||
```
|
||||
this is a code block created by back-ticks
|
||||
```
|
||||
|
||||
The back-tick method has some advantages.
|
||||
|
||||
- It works nearly every time
|
||||
- It is more compact when viewing the source code.
|
||||
- It allows you to specify what language the code block is in, for syntax
|
||||
highlighting.
|
||||
- It has a definite ending. Sometimes, the indentation method breaks with
|
||||
languages where spacing is significant, like Python or YAML.
|
||||
|
||||
To specify the language for the code block, put it directly after the first
|
||||
grouping of back-ticks:
|
||||
|
||||
```bash
|
||||
ls -l
|
||||
```
|
||||
|
||||
Common languages used in Kubernetes documentation code blocks include:
|
||||
|
||||
- `bash` / `shell` (both work the same)
|
||||
- `go`
|
||||
- `json`
|
||||
- `yaml`
|
||||
- `xml`
|
||||
- `none` (disables syntax highlighting for the block)
|
||||
|
||||
### Code blocks containing Hugo shortcodes
|
||||
|
||||
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. The following example illustrates this (view the Markdown
|
||||
source for this page).
|
||||
|
||||
```none
|
||||
{{</* codenew file="pods/storage/gce-volume.yaml" */>}}
|
||||
```
|
||||
|
||||
## Links
|
||||
|
||||
To format a link, put the link text inside square brackets, followed by the
|
||||
link target in parentheses. [Link to Kubernetes.io](https://kubernetes.io/) or
|
||||
[Relative link to Kubernetes.io](/)
|
||||
|
||||
You can also use HTML, but it is not preferred.
|
||||
<a href="https://kubernetes.io/">Link to Kubernetes.io</a>
|
||||
|
||||
## Images
|
||||
|
||||
To format an image, use similar syntax to [links](#links), but add a leading `!`
|
||||
character. The square brackets contain the image's alt text. Try to always use
|
||||
alt text so that people using screen readers can get some benefit from the
|
||||
image.
|
||||
|
||||

|
||||
|
||||
To specify extended attributes, such as width, title, caption, etc, use the
|
||||
<a href="https://gohugo.io/content-management/shortcodes/#figure">figure shortcode</a>,
|
||||
which is preferred to using a HTML `<img>` tag. Also, if you need the image to
|
||||
also be a hyperlink, use the `link` attribute, rather than wrapping the whole
|
||||
figure in Markdown link syntax as shown below.
|
||||
|
||||
{{< figure src="/img/pencil.png" title="Pencil icon" caption="Image used to illustrate the figure shortcode" width="200px" >}}
|
||||
|
||||
Even if you choose not to use the figure shortcode, an image can also be a link. This
|
||||
time the pencil icon links to the Kubernetes website. Outer square brackets enclose
|
||||
the entire image tag, and the link target is in the parentheses at the end.
|
||||
|
||||
[](https://kubernetes.io)
|
||||
|
||||
## Tables
|
||||
|
||||
Simple tables have one row per line, and columns are separated by `|`
|
||||
characters. The header is separated from the body by cells containing nothing
|
||||
but at least three `-` characters. For ease of maintenance, try to keep all the
|
||||
cell separators even, even if you heed to use extra space.
|
||||
|
||||
| Heading cell 1 | Heading cell 2 |
|
||||
|----------------|----------------|
|
||||
| Body cell 1 | Body cell 2 |
|
||||
|
||||
The header is optional. Any text separated by `|` will render as a table.
|
||||
|
||||
Markdown tables have a hard time with block-level elements within cells, such as
|
||||
list items, code blocks, or multiple paragraphs. For complex or very wide
|
||||
tables, use HTML instead.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Heading cell 1</th>
|
||||
<th>Heading cell 2</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Body cell 1</td>
|
||||
<td>Body cell 2</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Sidebars and Admonitions
|
||||
|
||||
Sidebars and admonitions provide ways to add visual importance to text. Use
|
||||
them sparingly.
|
||||
|
||||
### Sidebars
|
||||
|
||||
A sidebar offsets text visually, but without the visual prominence of
|
||||
[admonitions](#admonitions).
|
||||
|
||||
> This is a sidebar.
|
||||
>
|
||||
> You can have paragraphs and block-level elements within a sidebar.
|
||||
>
|
||||
> You can even have code blocks.
|
||||
>
|
||||
> ```bash
|
||||
> sudo dmesg
|
||||
> ```
|
||||
>
|
||||
|
||||
### Admonitions
|
||||
|
||||
Admonitions (notes, warnings, etc) use Hugo shortcodes.
|
||||
|
||||
{{< note >}}
|
||||
Notes catch the reader's attention without a sense of urgency.
|
||||
|
||||
You can have multiple paragraphs and block-level elements inside an admonition.
|
||||
|
||||
| Or | a | table |
|
||||
| :-- | --- | --- |
|
||||
{{< /note >}}
|
||||
|
||||
{{< caution >}}
|
||||
The reader should proceed with caution.
|
||||
{{< /caution >}}
|
||||
|
||||
|
||||
{{< warning >}}
|
||||
Warnings point out something that could cause harm if ignored.
|
||||
{{< /warning >}}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
title: "Docs Index"
|
||||
description: "index of the docs section"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
toc: true
|
||||
---
|
||||
|
||||
This is index content
|
|
@ -1,38 +0,0 @@
|
|||
---
|
||||
title: "Section 1 index"
|
||||
linkTitle: "Section 1 index and `linkTitle` Sample"
|
||||
description: "Example description text, lorem ipsum dolor sit amet make it look good"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
draft: true
|
||||
toc: true
|
||||
weight: 1
|
||||
---
|
||||
|
||||
## Section 1 {#section-1}
|
||||
|
||||
Meow
|
||||
|
||||
## Section 2
|
||||
|
||||
Meow Meow
|
||||
|
||||
- this
|
||||
- is
|
||||
- a
|
||||
- list
|
||||
|
||||
### Subsection 1
|
||||
|
||||
Mmeow
|
||||
|
||||
### Subsection 2 1 with a very very long title 1 with a very very long title 1 with a very very long title
|
||||
|
||||
Mmmeow
|
||||
|
||||
#### Subsubsection 1 with a very very long title
|
||||
|
||||
Hello world `code`
|
||||
|
||||
```shell
|
||||
codeblock
|
||||
```
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
title: "Section 1 Child Page 2"
|
||||
description: "Example description text, lorem ipsum dolor sit amet make it look good"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
draft: true
|
||||
toc: true
|
||||
weight: 3
|
||||
---
|
||||
|
||||
## Section 1 {#section-1}
|
||||
|
||||
Meow
|
||||
|
||||
## Section 2
|
||||
|
||||
Meow Meow
|
||||
|
||||
- this
|
||||
- is
|
||||
- a
|
||||
- list
|
||||
|
||||
### Subsection 1
|
||||
|
||||
Mmeow
|
||||
|
||||
### Subsection 2 1 with a very very long title 1 with a very very long title 1 with a very very long title
|
||||
|
||||
Mmmeow
|
||||
|
||||
#### Subsubsection 1 with a very very long title
|
||||
|
||||
Hello world `code`
|
||||
|
||||
```shell
|
||||
codeblock
|
||||
```
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
title: "Section 1 Child Page 1"
|
||||
description: "Example description text, lorem ipsum dolor sit amet make it look good"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
draft: true
|
||||
toc: true
|
||||
weight: 2
|
||||
---
|
||||
|
||||
## Section 1 {#section-1}
|
||||
|
||||
Meow
|
||||
|
||||
## Section 2
|
||||
|
||||
Meow Meow
|
||||
|
||||
- this
|
||||
- is
|
||||
- a
|
||||
- list
|
||||
|
||||
### Subsection 1
|
||||
|
||||
Mmeow
|
||||
|
||||
### Subsection 2 1 with a very very long title 1 with a very very long title 1 with a very very long title
|
||||
|
||||
Mmmeow
|
||||
|
||||
#### Subsubsection 1 with a very very long title
|
||||
|
||||
Hello world `code`
|
||||
|
||||
```shell
|
||||
codeblock
|
||||
```
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
Title: "Section 3 index"
|
||||
---
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
title: "Content page in `/docs`"
|
||||
description: "Example description text, lorem ipsum dolor sit amet make it look good"
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
draft: true
|
||||
toc: true
|
||||
weight: 20
|
||||
---
|
||||
|
||||
## Section 1 {#section-1}
|
||||
|
||||
Meow
|
||||
|
||||
## Section 2
|
||||
|
||||
Meow Meow
|
||||
|
||||
- this
|
||||
- is
|
||||
- a
|
||||
- list
|
||||
|
||||
### Subsection 1
|
||||
|
||||
Mmeow
|
||||
|
||||
### Subsection 2 1 with a very very long title 1 with a very very long title 1 with a very very long title
|
||||
|
||||
Mmmeow
|
||||
|
||||
#### Subsubsection 1 with a very very long title
|
||||
|
||||
Hello world `code`
|
||||
|
||||
```shell
|
||||
codeblock
|
||||
```
|
|
@ -1,118 +0,0 @@
|
|||
---
|
||||
title: "Pod Overview"
|
||||
description: "This page provides an overview of `Pod`, the smallest deployable object in the Kubernetes object model."
|
||||
date: 2020-01-07T14:59:38+01:00
|
||||
draft: true
|
||||
toc: true
|
||||
weight: 30
|
||||
---
|
||||
|
||||
## Understanding Pods
|
||||
|
||||
A *Pod* is the basic execution unit of a Kubernetes application--the smallest and simplest unit in the Kubernetes object model that you create or deploy. A Pod represents processes running on your cluster. More `code highlights`
|
||||
|
||||
A Pod encapsulates an application's container (or, in some cases, multiple containers), storage resources, a unique network IP, and options that govern how the container(s) should run. Here's some `code highlights interspersed with text`. A Pod represents a unit of deployment: *a single instance of an application in Kubernetes*, which might consist of either a single container or a small number of containers that are tightly coupled and that share resources.
|
||||
|
||||
[Docker](https://www.docker.com) is the most common container runtime used in a Kubernetes Pod, but Pods support other [container runtimes](/docs/setup/production-environment/container-runtimes/) as well.
|
||||
|
||||
This is a test table:
|
||||
|
||||
Value | Description
|
||||
:-----|:-----------
|
||||
`Pending` | The Pod has been accepted by the Kubernetes system, but one or more of the Container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while.
|
||||
`Running` | The Pod has been bound to a node, and all of the Containers have been created. At least one Container is still running, or is in the process of starting or restarting.
|
||||
`Succeeded` | All Containers in the Pod have terminated in success, and will not be restarted.
|
||||
`Failed` | All Containers in the Pod have terminated, and at least one Container has terminated in failure. That is, the Container either exited with non-zero status or was terminated by the system.
|
||||
`Unknown` | For some reason the state of the Pod could not be obtained, typically due to an error in communicating with the host of the Pod.
|
||||
|
||||
Pods in a Kubernetes cluster can be used in two main ways:
|
||||
|
||||
* **Pods that run a single container**. The "one-container-per-Pod" model is the most common Kubernetes use case; in this case, you can think of a Pod as a wrapper around a single container, and Kubernetes manages the Pods rather than the containers directly.
|
||||
* **Pods that run multiple containers that need to work together**. A Pod might encapsulate an application composed of multiple co-located containers that are tightly coupled and need to share resources. These co-located containers might form a single cohesive unit of service--one container serving files from a shared volume to the public, while a separate "sidecar" container refreshes or updates those files. The Pod wraps these containers and storage resources together as a single manageable entity.
|
||||
The [Kubernetes Blog](https://kubernetes.io/blog) has some additional information on Pod use cases. For more information, see:
|
||||
|
||||
* [The Distributed System Toolkit: Patterns for Composite Containers](https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns)
|
||||
* [Container Design Patterns](https://kubernetes.io/blog/2016/06/container-design-patterns)
|
||||
|
||||
Each Pod is meant to run a single instance of a given application. If you want to scale your application horizontally (e.g., run multiple instances), you should use multiple Pods, one for each instance. In Kubernetes, this is generally referred to as _replication_. Replicated Pods are usually created and managed as a group by an abstraction called a Controller. See [Pods and Controllers](#pods-and-controllers) for more information.
|
||||
|
||||
### How Pods manage multiple Containers
|
||||
|
||||
Pods are designed to support multiple cooperating processes (as containers) that form a cohesive unit of service. The containers in a Pod are automatically co-located and co-scheduled on the same physical or virtual machine in the cluster. The containers can share resources and dependencies, communicate with one another, and coordinate when and how they are terminated.
|
||||
|
||||
Note that grouping multiple co-located and co-managed containers in a single Pod is a relatively advanced use case. You should use this pattern only in specific instances in which your containers are tightly coupled. For example, you might have a container that acts as a web server for files in a shared volume, and a separate "sidecar" container that updates those files from a remote source, as in the following diagram:
|
||||
|
||||
{{< figure src="/images/docs/pod.svg" alt="example pod diagram" width="50%" >}}
|
||||
|
||||
Some Pods have init containers as well as app containers. Init containers run and complete before the app containers are started.
|
||||
|
||||
Pods provide two kinds of shared resources for their constituent containers: *networking* and *storage*.
|
||||
|
||||
Here's a giant architecture diagram
|
||||
|
||||

|
||||
|
||||
#### Networking
|
||||
|
||||
Each Pod is assigned a unique IP address. Every container in a Pod shares the network namespace, including the IP address and network ports. Containers *inside a Pod* can communicate with one another using `localhost`. When containers in a Pod communicate with entities *outside the Pod*, they must coordinate how they use the shared network resources (such as ports).
|
||||
|
||||
#### Storage
|
||||
|
||||
A Pod can specify a set of shared storage volume. All containers in the Pod can access the shared volumes, allowing those containers to share data. Volumes also allow persistent data in a Pod to survive in case one of the containers within needs to be restarted. See [Volumes](/docs/concepts/storage/volumes/) for more information on how Kubernetes implements shared storage in a Pod.
|
||||
|
||||
## Working with Pods
|
||||
|
||||
You'll rarely create individual Pods directly in Kubernetes--even singleton Pods. This is because Pods are designed as relatively ephemeral, disposable entities. When a Pod gets created (directly by you, or indirectly by a Controller), it is scheduled to run on a node in your cluster. The Pod remains on that Node until the process is terminated, the pod object is deleted, the Pod is *evicted* for lack of resources, or the Node fails.
|
||||
|
||||
> Restarting a container in a Pod should not be confused with restarting the Pod. The Pod itself does not run, but is an environment the containers run in and persists until it is deleted.
|
||||
|
||||
Pods do not, by themselves, self-heal. If a Pod is scheduled to a Node that fails, or if the scheduling operation itself fails, the Pod is deleted; likewise, a Pod won't survive an eviction due to a lack of resources or Node maintenance. Kubernetes uses a higher-level abstraction, called a *Controller*, that handles the work of managing the relatively disposable Pod instances. Thus, while it is possible to use Pod directly, it's far more common in Kubernetes to manage your pods using a Controller. See [Pods and Controllers](#pods-and-controllers) for more information on how Kubernetes uses Controllers to implement Pod scaling and healing.
|
||||
|
||||
### Pods and Controllers
|
||||
|
||||
A Controller can create and manage multiple Pods for you, handling replication and rollout and providing self-healing capabilities at cluster scope. For example, if a Node fails, the Controller might automatically replace the Pod by scheduling an identical replacement on a different Node.
|
||||
|
||||
Some examples of Controllers that contain one or more pods include:
|
||||
|
||||
* [Deployment](/docs/concepts/workloads/controllers/deployment/)
|
||||
* [StatefulSet](/docs/concepts/workloads/controllers/statefulset/)
|
||||
* [DaemonSet](/docs/concepts/workloads/controllers/daemonset/)
|
||||
|
||||
In general, Controllers use a Pod Template that you provide to create the Pods for which it is responsible.
|
||||
|
||||
## Pod Templates
|
||||
|
||||
Pod templates are pod specifications which are included in other objects, such as
|
||||
[Replication Controllers](/docs/concepts/workloads/controllers/replicationcontroller/), [Jobs](/docs/concepts/jobs/run-to-completion-finite-workloads/), and
|
||||
[DaemonSets](/docs/concepts/workloads/controllers/daemonset/). Controllers use Pod Templates to make actual pods.
|
||||
The sample below is a simple manifest for a Pod which contains a container that prints
|
||||
a message.
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: myapp-pod
|
||||
labels:
|
||||
app: myapp
|
||||
spec:
|
||||
containers:
|
||||
- name: myapp-container
|
||||
image: busybox
|
||||
command: ['sh', '-c', 'echo Hello Kubernetes! && sleep 3600']
|
||||
```
|
||||
|
||||
Rather than specifying the current desired state of all replicas, pod templates are like cookie cutters. Once a cookie has been cut, the cookie has no relationship to the cutter. There is no "quantum entanglement". Subsequent changes to the template or even switching to a new template has no direct effect on the pods already created. Similarly, pods created by a replication controller may subsequently be updated directly. This is in deliberate contrast to pods, which do specify the current desired state of all containers belonging to the pod. This approach radically simplifies system semantics and increases the flexibility of the primitive.
|
||||
|
||||
|
||||
# Header 1
|
||||
|
||||
## Header 2
|
||||
|
||||
### Header 3
|
||||
|
||||
#### Header 4
|
||||
|
||||
##### Header 5
|
||||
|
||||
###### Header 6
|
|
@ -6,16 +6,16 @@
|
|||
</header>
|
||||
<div class="container">
|
||||
<section class="row">
|
||||
<section class="col col-8">
|
||||
<h1 class="title">{{ .Page.Title | markdownify }}</h1>
|
||||
<p class="subtitle">{{ .Page.Description | markdownify }}</p>
|
||||
{{ partial "docs/content.html" . }}
|
||||
</section>
|
||||
<section class="col col-4">
|
||||
{{ partial "section-nav.html" . }}
|
||||
<hr />
|
||||
{{ partial "docs/docs-nav.html" . }}
|
||||
</section>
|
||||
<section class="col col-8">
|
||||
<h1 class="title">{{ .Page.Title | markdownify }}</h1>
|
||||
<p class="subtitle">{{ .Page.Description | markdownify }}</p>
|
||||
{{ partial "docs/content.html" . }}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
</header>
|
||||
<div class="container">
|
||||
<section class="row">
|
||||
<section class="col col-8">
|
||||
<h1 class="title">{{ .Page.Title | markdownify }}</h1>
|
||||
<p class="subtitle">{{ .Page.Description | markdownify }}</p>
|
||||
{{ partial "docs/content.html" . }}
|
||||
</section>
|
||||
<section class="col col-4">
|
||||
{{ partial "section-nav.html" . }}
|
||||
<hr />
|
||||
{{ partial "docs/docs-nav.html" . }}
|
||||
</section>
|
||||
<section class="col col-8">
|
||||
<h1 class="title">{{ .Page.Title | markdownify }}</h1>
|
||||
<p class="subtitle">{{ .Page.Description | markdownify }}</p>
|
||||
{{ partial "docs/content.html" . }}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{ $hastoc := .Params.toc }}
|
||||
{{ $toc := .TableOfContents }}
|
||||
|
||||
<p> On this page:</p>
|
||||
{{ if ($hastoc) }}
|
||||
<p> On this page:</p>
|
||||
{{ $toc }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{{ $projectName := site.Params.projectName }}
|
||||
{{ $year := now.Year }}
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
</br>
|
||||
<p>
|
||||
{{ with site.Copyright }}
|
||||
© {{ $year }} {{ . }} </br>
|
||||
{{ end }}
|
||||
© {{ $year }} The {{ $projectName }} Authors | Documentation Distributed under CC-BY-4.0
|
||||
</br>
|
||||
© {{ $year }} The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage/">Trademark Usage</a> page.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
{{ $title := site.Title }}
|
||||
<section class="container-xl">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<hr>
|
||||
<p>
|
||||
<a href="https://cncf.io">
|
||||
<a href="https://cncf.io" target="_blank">
|
||||
<img src="img/logos/cncf-color.png" width="200">
|
||||
</a>
|
||||
</br>
|
||||
We are a Cloud Native Computing Foundation project.
|
||||
</p>
|
||||
<p>
|
||||
KubeCon + CloudNativeCon North America Virtual | November 17-20, 2020 | Don’t Miss Out | <a href="https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/">Register Now</a>
|
||||
</p>
|
||||
<p>
|
||||
{{ $title }} is a Cloud Native Computing Foundation project.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
{{ $title := site.Title }}
|
||||
{{ $desc := site.Params.description | markdownify }}
|
||||
|
||||
<section class="container-xl">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>
|
||||
{{ $title }}
|
||||
</h1>
|
||||
<p class="lead">
|
||||
{{ $desc }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ with .Content }}
|
||||
<section class="container-xl">
|
||||
<div class="row">
|
||||
|
|
|
@ -2,14 +2,6 @@
|
|||
{{ $desc := site.Params.description | markdownify }}
|
||||
<section class="jumbotron">
|
||||
<div class="container">
|
||||
<h1>
|
||||
{{ $title }}
|
||||
</h1>
|
||||
|
||||
{{ with $desc }}
|
||||
<p class="lead">
|
||||
{{ . }}
|
||||
</p>
|
||||
{{ end }}
|
||||
<img src="/img/logos/cni-horizontal-color.png">
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{ $allSections := site.Sections }} <!-- "blog" and "docs" -->
|
||||
{{ $docsSections := where $allSections "Section" "test-content" }} <!-- "getting-started" and "deployment" -->
|
||||
{{ $docsSections := where $allSections "Section" "docs" }} <!-- "getting-started" and "deployment" -->
|
||||
{{ $thisUrl := .RelPermalink }} <!-- the URL of the current page -->
|
||||
|
||||
{{ range $docsSections }}
|
||||
|
|
|
@ -5,5 +5,4 @@
|
|||
{{ partial "github-edit.html" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!-- based on https://github.com/kubernetes/website/blob/master/layouts/shortcodes/caution.html -->
|
||||
|
||||
<blockquote class="caution callout">
|
||||
<div><strong>{{ T "caution" }}</strong> {{ trim .Inner " \n" | markdownify }}</div>
|
||||
</blockquote>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<!-- based on https://github.com/kubernetes/website/blob/master/layouts/shortcodes/kat-button -->
|
||||
|
||||
<div id="my-panel" data-katacoda-ondemand="true" data-katacoda-port="30000" data-katacoda-env="minikube" data-katacoda-command="start.sh" data-katacoda-ui="panel"></div>
|
||||
<script src="https://katacoda.com/embed.js"></script>
|
||||
<button class="button" onclick="window.katacoda.init(); ">Launch Terminal</button>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<!-- based on https://github.com/kubernetes/website/blob/master/layouts/shortcodes/note.html -->
|
||||
|
||||
<blockquote class="note callout">
|
||||
<div><strong>{{ T "note" }}</strong> {{ trim .Inner " \n" | markdownify }}</div>
|
||||
</blockquote>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<!-- based on https://github.com/kubernetes/website/blob/master/layouts/shortcodes/tab.html -->
|
||||
|
||||
{{ if .Parent }}
|
||||
{{ $name := trim (.Get "name") " " }}
|
||||
{{ $include := trim (.Get "include") " "}}
|
||||
{{ $codelang := .Get "codelang" }}
|
||||
{{ if not (.Parent.Scratch.Get "tabs") }}
|
||||
{{ .Parent.Scratch.Set "tabs" slice }}
|
||||
{{ end }}
|
||||
{{ with .Inner }}
|
||||
{{ if $codelang }}
|
||||
{{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" (highlight . $codelang "") ) }}
|
||||
{{ else }}
|
||||
{{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $.Parent.Scratch.Add "tabs" (dict "name" $name "include" $include "codelang" $codelang) }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}}
|
||||
{{ end}}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<!-- based on https://github.com/kubernetes/website/blob/master/layouts/shortcodes/tabs.html -->
|
||||
|
||||
{{- .Page.Scratch.Add "tabset-counter" 1 -}}
|
||||
{{- $tab_set_id := .Get "name" | default (printf "tabset-%s-%d" (.Page.RelPermalink) (.Page.Scratch.Get "tabset-counter") ) | anchorize -}}
|
||||
{{- $tabs := .Scratch.Get "tabs" -}}
|
||||
{{- if .Inner -}}{{- /* We don't use the inner content, but Hugo will complain if we don't reference it. */ -}}{{- end -}}
|
||||
<ul class="nav nav-tabs" id="{{ $tab_set_id }}" role="tablist">
|
||||
{{- range $i, $e := $tabs -}}
|
||||
{{- $id := printf "%s-%d" $tab_set_id $i -}}
|
||||
{{- if (eq $i 0) -}}
|
||||
<li class="nav-item"><a data-toggle="tab" class="nav-link active" href="#{{ $id }}" role="tab" aria-controls="{{ $id }}" aria-selected="true">{{- trim .name " " -}}</a></li>
|
||||
{{ else }}
|
||||
<li class="nav-item"><a data-toggle="tab" class="nav-link" href="#{{ $id }}" role="tab" aria-controls="{{ $id }}">{{- trim .name " " -}}</a></li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
<div class="tab-content" id="{{ $tab_set_id }}">
|
||||
{{- range $i, $e := $tabs -}}
|
||||
{{- $id := printf "%s-%d" $tab_set_id $i -}}
|
||||
{{- if (eq $i 0) -}}
|
||||
<div id="{{ $id }}" class="tab-pane show active" role="tabpanel" aria-labelledby="{{ $id }}">
|
||||
{{ else }}
|
||||
<div id="{{ $id }}" class="tab-pane" role="tabpanel" aria-labelledby="{{ $id }}">
|
||||
{{ end }}
|
||||
<p>
|
||||
{{- with .content -}}
|
||||
{{- . -}}
|
||||
{{- else -}}
|
||||
{{- if eq $.Page.BundleType "leaf" -}}
|
||||
{{- /* find the file somewhere inside the bundle. Note the use of double asterisk */ -}}
|
||||
{{- with $.Page.Resources.GetMatch (printf "**%s*" .include) -}}
|
||||
{{- if ne .ResourceType "page" -}}
|
||||
{{- /* Assume it is a file that needs code highlighting. */ -}}
|
||||
{{- $codelang := $e.codelang | default ( path.Ext .Name | strings.TrimPrefix ".") -}}
|
||||
{{- highlight .Content $codelang "" -}}
|
||||
{{- else -}}
|
||||
{{- .Content -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- $path := path.Join $.Page.File.Dir .include -}}
|
||||
{{- $page := site.GetPage "page" $path -}}
|
||||
{{- with $page -}}
|
||||
{{- .Content -}}
|
||||
{{- else -}}
|
||||
{{- errorf "[%s] tabs include not found for path %q" site.Language.Lang $path -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<!-- based on https://github.com/kubernetes/website/blob/master/layouts/shortcodes/warning.html -->
|
||||
|
||||
<blockquote class="warning callout">
|
||||
<div><strong>{{ T "warning" }}</strong> {{ trim .Inner " \n" | markdownify }}</div>
|
||||
</blockquote>
|
||||
|
|
@ -7,5 +7,7 @@
|
|||
"jquery": "^3.5.1",
|
||||
"popper.js": "^1.16.1"
|
||||
},
|
||||
"devDependencies": {}
|
||||
"devDependencies": {
|
||||
"hugo-extended": "^0.76.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 198.49 198.48"><defs><style>.cls-1{fill:#fff}</style></defs><title>icon-pencil</title><path class="cls-1" d="M49.43 184.42L0 198.48l14.06-49.41 35.37 35.35zM184.35 49.494L148.993 14.14 163.136-.004l35.355 35.355zM144.75 18.38l35.36 35.36L52.84 181.02l-35.37-35.37zM49.29 156.27l7.07 7.07L162.43 57.27l-7.07-7.07zm-14.14-14.14l7.07 7.07L148.29 43.13l-7.07-7.07z"/></svg>
|
After Width: | Height: | Size: 455 B |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in New Issue