Widget for code includes + sass
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
{% capture samplecode %}{% include_relative {{include.file}} %}{% endcapture %}
|
||||||
|
{% capture mysample %}
|
||||||
|
```{{include.language}}
|
||||||
|
{{ samplecode | raw | strip }}
|
||||||
|
```
|
||||||
|
{% endcapture %}
|
||||||
|
<p> </p>
|
||||||
|
<table class="includecode"><thead><tr><th><a href="{{include.ghlink}}"><code>{{include.file}}</code></a></th></tr></thead>
|
||||||
|
<tr><td>{{ mysample | markdownify }}</td></tr></table>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<a href="/v1.1/">Version 1.1</a>
|
<a href="/v1.1/">Version 1.1</a>
|
||||||
<a href="/v1.2/">Version 1.2</a>
|
<a href="/v1.2/">Version 1.2</a>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" id="search" placeholder="Search" onkeydown="if (event.keyCode==13) window.location.replace('/search/?q=' + this.value)">
|
<input type="text" id="search" placeholder="Search" onkeydown="if (event.keyCode==13) window.location.replace('/docs/search/?q=' + this.value)">
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -699,12 +699,25 @@ section
|
|||||||
padding: 15px
|
padding: 15px
|
||||||
overflow-x: scroll
|
overflow-x: scroll
|
||||||
|
|
||||||
|
|
||||||
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code
|
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code
|
||||||
font-family: inherit
|
font-family: inherit
|
||||||
font-size: inherit
|
font-size: inherit
|
||||||
background-color: transparent
|
background-color: transparent
|
||||||
|
|
||||||
|
.includecode, .includecode th, .includecode td
|
||||||
|
padding: 0px !important
|
||||||
|
|
||||||
|
.includecode th
|
||||||
|
text-align: right !important
|
||||||
|
padding: 10px !important
|
||||||
|
|
||||||
|
.includecode th a, .includecode th a code
|
||||||
|
color: white !important
|
||||||
|
background-color: transparent !important
|
||||||
|
|
||||||
|
.includecode pre
|
||||||
|
margin: 0px !important
|
||||||
|
|
||||||
ul li
|
ul li
|
||||||
list-style: disc
|
list-style: disc
|
||||||
|
|
||||||
|
|||||||
@@ -51,23 +51,7 @@ Let's create two new namespaces to hold our work.
|
|||||||
|
|
||||||
Use the file [`namespace-dev.json`](/docs/admin/namespacesnamespace-dev.json) which describes a development namespace:
|
Use the file [`namespace-dev.json`](/docs/admin/namespacesnamespace-dev.json) which describes a development namespace:
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: EXAMPLE namespace-dev.json -->
|
{% include code.html language="json" file="namespace-dev.json" ghlink="https://github.com/kubernetes/kubernetes.github.io/blob/master/docs/admin/namespaces/namespace-dev.json" %}
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"kind": "Namespace",
|
|
||||||
"apiVersion": "v1",
|
|
||||||
"metadata": {
|
|
||||||
"name": "development",
|
|
||||||
"labels": {
|
|
||||||
"name": "development"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
[Download example](/docs/admin/namespacesnamespace-dev.json)
|
|
||||||
<!-- END MUNGE: EXAMPLE namespace-dev.json -->
|
|
||||||
|
|
||||||
Create the development namespace using kubectl.
|
Create the development namespace using kubectl.
|
||||||
|
|
||||||
|
|||||||
@@ -102,27 +102,7 @@ volumeMounts:
|
|||||||
|
|
||||||
Example Redis pod definition with a persistent storage volume ([pod-redis.yaml](/docs/user-guide/walkthrough/pod-redis.yaml)):
|
Example Redis pod definition with a persistent storage volume ([pod-redis.yaml](/docs/user-guide/walkthrough/pod-redis.yaml)):
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: EXAMPLE pod-redis.yaml -->
|
{% include code.html language="yaml" file="pod-redis.yaml" ghlink="https://github.com/kubernetes/kubernetes.github.io/blob/master/docs/user-guide/walkthrough/pod-redis.yaml" %}
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: redis
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: redis
|
|
||||||
image: redis
|
|
||||||
volumeMounts:
|
|
||||||
- name: redis-persistent-storage
|
|
||||||
mountPath: /data/redis
|
|
||||||
volumes:
|
|
||||||
- name: redis-persistent-storage
|
|
||||||
emptyDir: {}
|
|
||||||
```
|
|
||||||
|
|
||||||
[Download example](/docs/user-guide/walkthrough/pod-redis.yaml)
|
|
||||||
<!-- END MUNGE: EXAMPLE pod-redis.yaml -->
|
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user