add-include-file

This commit is contained in:
zhangqx2010
2017-09-08 22:10:43 +08:00
parent dce409f734
commit a388fe7b5b
5 changed files with 185 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
{% capture samplecode %}{% include_relative {{include.file}} %}{% endcapture %}
{% if include.k8slink %}{% capture ghlink %}https://raw.githubusercontent.com/kubernetes/kubernetes/blob/{{page.githubbranch}}{{include.k8slink}}{% endcapture %}{% endif %}
{% if include.ghlink %}{% capture ghlink %}https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/{{page.docsbranch}}{{include.ghlink}}{% endcapture %}{% endif %}
{% capture mysample %}
```{{include.language}}
{{ samplecode | raw | strip }}
```
{: id="{{include.file | handleize}}"}
{% endcapture %}
<table class="includecode">
<thead>
<tr>
<th>
{% if ghlink %}<a href="{{ghlink}}" download="{{include.file}}">{% endif %}
<code>{{include.file}}</code>
{% if ghlink %}</a>{% endif %}
<img src="/images/copycode.svg" style="max-height:24px" onclick="copyCode('{{include.file | handleize}}')" title="Copy {{include.file}} to clipboard">
</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ mysample | markdownify }}</td>
</tr>
</tbody>
</table>
+4
View File
@@ -0,0 +1,4 @@
You need to have a Kubernetes cluster, and the kubectl command-line tool must
be configured to communicate with your cluster. If you do not already have a
cluster, you can create one by using
[Minikube](/docs/getting-started-guides/minikube).
+32
View File
@@ -0,0 +1,32 @@
{% if overview %}
{{ overview }}
{% else %}
{% include templates/_errorthrower.md missing_block='overview' purpose='provides an overview of this concept.' %}
{% endif %}
* TOC
{:toc}
{% if body %}
{{ body }}
{% else %}
{% include templates/_errorthrower.md missing_block='body' purpose='supplies the body of the page content.' %}
{% endif %}
{% if whatsnext %}
## What's next
{{ whatsnext }}
{% endif %}
+55
View File
@@ -0,0 +1,55 @@
{% if overview %}
{{ overview }}
{% else %}
{% include templates/_errorthrower.md missing_block='overview' purpose='states, in one or two sentences, the purpose of this document' %}
{% endif %}
* TOC
{: toc}
{% if prerequisites %}
## Before you begin
{{ prerequisites }}
{% else %}
{% include templates/_errorthrower.md missing_block='prerequisites' heading='Before you begin' purpose='lists action prerequisites and knowledge prerequisites' %}
{% endif %}
{% if steps %}
{{ steps }}
{% else %}
{% include templates/_errorthrower.md missing_block='steps' purpose='lists a sequence of numbered steps that accomplish the task.' %}
{% endif %}
{% if discussion %}
{{ discussion }}
{% else %}
{% endif %}
{% if whatsnext %}
## What's next
{{ whatsnext }}
{% endif %}
+68
View File
@@ -0,0 +1,68 @@
{% if overview %}
{{ overview }}
{% else %}
{% include templates/_errorthrower.md missing_block='overview' purpose='states, in one or two sentences, the purpose of this document' %}
{% endif %}
* TOC
{: toc}
{% if objectives %}
## Objectives
{{ objectives }}
{% else %}
{% include templates/_errorthrower.md missing_block='objectives' heading='Objectives' purpose='lists the objectives for this tutorial.' %}
{% endif %}
{% if prerequisites %}
## Before you begin
{{ prerequisites }}
{% else %}
{% include templates/_errorthrower.md missing_block='prerequisites' heading='Before you begin' purpose='lists action prerequisites and knowledge prerequisites' %}
{% endif %}
{% if lessoncontent %}
{{ lessoncontent }}
{% else %}
{% include templates/_errorthrower.md missing_block='lessoncontent' purpose='provides the lesson content for this tutorial.' %}
{% endif %}
{% if cleanup %}
## Cleaning up
{{ cleanup }}
{% endif %}
{% if whatsnext %}
## What's next
{{ whatsnext }}
{% endif %}