kubes 0.7.3 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +3 -1
- data/docs/_docs/config/reference.md +1 -0
- data/docs/_docs/dsl.md +1 -1
- data/docs/_docs/intro/how-kubes-works.md +2 -0
- data/docs/_docs/intro/structure.md +2 -2
- data/docs/_docs/layering/{merge.md → merge-dsl.md} +0 -0
- data/docs/_docs/layering/merge-options.md +76 -0
- data/docs/_docs/layering.md +1 -1
- data/docs/_docs/vs/helm.md +3 -3
- data/docs/_includes/header.html +7 -0
- data/docs/_includes/layering/layers.md +12 -10
- data/docs/_includes/reference.md +1 -1
- data/docs/_includes/sidebar.html +2 -1
- data/docs/_sass/theme.scss +92 -0
- data/docs/index.html +2 -2
- data/docs/search/data.json +44 -0
- data/docs/search/index.html +30 -0
- data/docs/search/lunr.js +3475 -0
- data/docs/search/search.js +247 -0
- data/docs/search/tips.md +48 -0
- data/lib/kubes/cli/init.rb +2 -1
- data/lib/kubes/compiler/decorator/base.rb +2 -2
- data/lib/kubes/compiler/decorator/hashable/field.rb +1 -0
- data/lib/kubes/compiler/dsl/core/fields.rb +1 -1
- data/lib/kubes/compiler/dsl/syntax/resource.rb +2 -2
- data/lib/kubes/compiler/layering.rb +17 -15
- data/lib/kubes/compiler/strategy/dispatcher.rb +2 -2
- data/lib/kubes/compiler.rb +2 -1
- data/lib/kubes/config.rb +3 -0
- data/lib/kubes/core.rb +6 -0
- data/lib/kubes/docker/args/default.rb +0 -4
- data/lib/kubes/util/consider.rb +2 -2
- data/lib/kubes/version.rb +1 -1
- data/lib/templates/yaml/.kubes/resources/base/deployment.yaml.tt +0 -3
- data/lib/templates/yaml/.kubes/resources/shared/namespace.yaml.tt +0 -2
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f8112935cf2c796869c81fb0ede6a5b6b9589ba5daf981aab7ca2a806217e4c
|
4
|
+
data.tar.gz: d84869a02096b266edc9e0c51ea2ec344f97f96afb0ce1dcc74d80ef71cb7567
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11e5302088c91d06c41c3f1b3c6774b2361d7a1537d9e9c609152b2de215b35d0dd1f792d54788a557a6d39dcc3816aa7caaa1191c888aed135b2290d72d6355
|
7
|
+
data.tar.gz: 0a47dee57d4ccb4ccd1e9877830328d60ba1a0a49b2d3592a7994f63cbe01cb84ee29ca646d057662a1dba0fafb94bc61c0a4ee84547ed951942d9c35cecf2ed
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,22 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.7.7] - 2021-10-21
|
7
|
+
- [#51](https://github.com/boltops-tools/kubes/pull/51) add hash checksum for tls secretName
|
8
|
+
- [#52](https://github.com/boltops-tools/kubes/pull/52) add role all layer to pre_layers
|
9
|
+
- [#53](https://github.com/boltops-tools/kubes/pull/53) Merger options
|
10
|
+
|
11
|
+
## [0.7.6] - 2021-10-12
|
12
|
+
- remove init yaml templates, removed duplication
|
13
|
+
- write full.yaml to .kubes/tmp instead
|
14
|
+
|
15
|
+
## [0.7.5] - 2021-06-03
|
16
|
+
- [#47](https://github.com/boltops-tools/kubes/pull/47) add search
|
17
|
+
- [#48](https://github.com/boltops-tools/kubes/pull/48) use deep_merge overwrite_arrays option fixes #45
|
18
|
+
|
19
|
+
## [0.7.4] - 2021-03-02
|
20
|
+
- [#46](https://github.com/boltops-tools/kubes/pull/46) call run method to respect config.suffix_hash
|
21
|
+
|
6
22
|
## [0.7.3] - 2020-12-24
|
7
23
|
- [#44](https://github.com/boltops-tools/kubes/pull/44) require singleton
|
8
24
|
|
data/README.md
CHANGED
@@ -8,7 +8,9 @@
|
|
8
8
|
|
9
9
|
[![BoltOps Badge](https://img.boltops.com/boltops/badges/boltops-badge.png)](https://www.boltops.com)
|
10
10
|
|
11
|
-
Kubernetes
|
11
|
+
Kubernetes App Deploy Tool: build docker image, compile Kubernetes YAML files, and apply them.
|
12
|
+
|
13
|
+
Please **watch/star** this repo to help grow and support the project.
|
12
14
|
|
13
15
|
Official Docs Site: [kubes.guru](https://kubes.guru)
|
14
16
|
|
@@ -20,3 +20,4 @@ repo_auto_auth | Whether or not to try to auth authorize docker repo registry if
|
|
20
20
|
skip | List of resources to skip. Can also be set with the `KUBES_SKIP` env var. `KUBES_SKIP` should be a list of strings separated by spaces. It adds onto the `config.skip` option. | []
|
21
21
|
state.path | Where to store the state file with the last build Docker image. | .kubes/state/KUBES_ENV/data.json
|
22
22
|
suffix_hash | Whether or not to append suffix hash to ConfigMap and Secret | true
|
23
|
+
merger.options | Merger options that control how Hashes are merged. More info: [Merger Options]({% link _docs/layering/merge-options.md %}) | `{overwrite_arrays: true}`
|
data/docs/_docs/dsl.md
CHANGED
@@ -63,4 +63,4 @@ In general:
|
|
63
63
|
|
64
64
|
## Merge Behavior
|
65
65
|
|
66
|
-
Generally, the merge should behave as expected. For example, map or Hash fields are merged together from multiple layers. Strings are simply replaced. See more details at [Layering Merge Behavior]({% link _docs/layering/merge.md %})
|
66
|
+
Generally, the merge should behave as expected. For example, map or Hash fields are merged together from multiple layers. Strings are simply replaced. See more details at [Layering Merge Behavior]({% link _docs/layering/merge-dsl.md %})
|
@@ -20,6 +20,8 @@ The deploy command simpifily does all 3 steps: build, compile, and apply.
|
|
20
20
|
|
21
21
|
kubes deploy
|
22
22
|
|
23
|
+
Kubes is very transparent about it does. It prints out the `kubectl` commands as they are being called.
|
24
|
+
|
23
25
|
You can also run the `kubectl apply` only. The `kube apply` command compiles but will skip the docker build stage if it's already been built.
|
24
26
|
|
25
27
|
kubes apply
|
@@ -34,10 +34,10 @@ Here's what a .kubes folder structure can look like this:
|
|
34
34
|
|
35
35
|
Name | Description
|
36
36
|
--- | ---
|
37
|
-
base | The base folder is processed first and can be used to define common fields and resources. Learn more on the [Layering Docs]({% link _docs/layering.md %}).
|
38
37
|
config | The config folder can be used to configure behavior of Kubes. The [docker]({% link _docs/config/docker.md %}) config is used to customize the docker command. The [env]({% link _docs/config/env.md %}) config is used to override `config.rb` settings on a `KUBES_ENV` basis. The [kubectl]({% link _docs/config/kubectl.md %}) config is used to customize the kubectl command.
|
39
38
|
config.rb | The main thing to configure here is the repo to push the docker image to.
|
40
39
|
output | Where kubes builds and writes the Kubernetes YAML to.
|
41
40
|
resources | Where you define your Kubernetes resources.
|
42
|
-
|
41
|
+
resources/base | The base folder is processed first and can be used to define common fields and resources. Learn more on the [Layering Docs]({% link _docs/layering.md %}).
|
42
|
+
resources/shared | The shared folder is where you can put shared resources. This folder gets applied first. More info: [Ordering]({% link _docs/intro/ordering.md %}).
|
43
43
|
state | Temporary state info that stores the built Docker image name.
|
File without changes
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
title: Merge Options
|
3
|
+
---
|
4
|
+
|
5
|
+
Underneath the hood, Kubes uses the [danielsdeleo/deep_merge](https://github.com/danielsdeleo/deep_merge) library to merge layers together. You can control the merge behavior options with [config.merger.options]({% link _docs/config/reference.md %}).
|
6
|
+
|
7
|
+
The default merge options is:
|
8
|
+
|
9
|
+
{overwrite_arrays: true}
|
10
|
+
|
11
|
+
You can control the merge behavior by setting:
|
12
|
+
|
13
|
+
.kubes/config.rb
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
Kubes.configure do |config|
|
17
|
+
# ...
|
18
|
+
config.merger.options = {overwrite_arrays: false}
|
19
|
+
end
|
20
|
+
```
|
21
|
+
|
22
|
+
See the [danielsdeleo/deep_merge](https://github.com/danielsdeleo/deep_merge) docs for the different options.
|
23
|
+
|
24
|
+
## Example of overwrite_arrays false
|
25
|
+
|
26
|
+
An example of where you might want to use `{overwrite_arrays: false}` is if you are using YAML and want a base sidecar container in all of your deployments.
|
27
|
+
|
28
|
+
.kubes/resources/base/deployment.yaml
|
29
|
+
|
30
|
+
```yaml
|
31
|
+
spec:
|
32
|
+
template:
|
33
|
+
spec:
|
34
|
+
containers:
|
35
|
+
- name: sidecar
|
36
|
+
image: sidecar-image
|
37
|
+
```
|
38
|
+
|
39
|
+
.kubes/resources/web/deployment.yaml
|
40
|
+
|
41
|
+
```yaml
|
42
|
+
spec:
|
43
|
+
template:
|
44
|
+
metadata:
|
45
|
+
labels:
|
46
|
+
role: web
|
47
|
+
spec:
|
48
|
+
containers:
|
49
|
+
- name: web
|
50
|
+
image: <%= docker_image %>
|
51
|
+
```
|
52
|
+
|
53
|
+
Produces:
|
54
|
+
|
55
|
+
```yaml
|
56
|
+
# ...
|
57
|
+
spec:
|
58
|
+
template:
|
59
|
+
metadata:
|
60
|
+
labels:
|
61
|
+
role: web
|
62
|
+
spec:
|
63
|
+
containers:
|
64
|
+
- name: sidecar
|
65
|
+
image: sidecar-image
|
66
|
+
- name: web
|
67
|
+
image: gcr.io/boltops-learn/demo:kubes-2021-10-21T18-06-48
|
68
|
+
# ...
|
69
|
+
```
|
70
|
+
|
71
|
+
However, using this merge behavior will also add additional ports if you are assigning a `targetPort` in the DSL. See:
|
72
|
+
|
73
|
+
* [DSL in service creates always default port 80 #45](https://github.com/boltops-tools/kubes/issues/45)
|
74
|
+
* [use deep_merge overwrite_arrays option #48](https://github.com/boltops-tools/kubes/pull/48)
|
75
|
+
|
76
|
+
Will welcome PRs for improvements.
|
data/docs/_docs/layering.md
CHANGED
@@ -7,4 +7,4 @@ Kubes supports layering files together so you can use the same Kubernetes files
|
|
7
7
|
* [YAML Layering]({% link _docs/layering/yaml.md %})
|
8
8
|
* [DSL Layering]({% link _docs/layering/dsl.md %})
|
9
9
|
* [Mix Layering]({% link _docs/layering/mix.md %})
|
10
|
-
* [Merge Behavior]({% link _docs/layering/merge.md %})
|
10
|
+
* [Merge Behavior]({% link _docs/layering/merge-dsl.md %})
|
data/docs/_docs/vs/helm.md
CHANGED
@@ -4,7 +4,7 @@ nav_text: Helm
|
|
4
4
|
categories: vs
|
5
5
|
---
|
6
6
|
|
7
|
-
|
7
|
+
Kubes and Helm are quite different. Helm is a package manager tool. In contrast, Kubernetes is focused on deploying your application. While you can use package manager tools like Helm to deploy your application, application-focused deploy tools are better for the job. For example, apt-get and yum are also package manager tools. But few companies use `apt-get install` or `yum install` to deploy their application code. Instead, people usually use application-specific tools to deploy their web app.
|
8
8
|
|
9
9
|
{% include vs/article.md %}
|
10
10
|
|
@@ -168,7 +168,7 @@ Helm supports a wide variety of hooks for the install, delete, upgrade, and roll
|
|
168
168
|
|
169
169
|
Kubes also supports hook as the kubes-level; this is similar to the helm-level. Kubes also provide finer-grain control hooks at the kubectl-level.
|
170
170
|
|
171
|
-
|
171
|
+
Overall, Helm and Kubes hooks work quite differently. We'll take a look at **some** examples:
|
172
172
|
|
173
173
|
### Helm Hook Example
|
174
174
|
|
@@ -240,4 +240,4 @@ Kubes supports the deployment workflow. It can build the docker image from your
|
|
240
240
|
|
241
241
|
## Summary
|
242
242
|
|
243
|
-
Helm and Kubes are quite different. Helm is a full-fledge package management. Kubes is
|
243
|
+
Helm and Kubes are quite different. Helm is a full-fledge package management tool. In contrast, Kubes is more focused on app deployment. Both tools support templating logic to help keep your code DRY. Additionally, Kubes supports layering to merge YAML files together for DRYness. Kubes also helps you build your Docker images.
|
data/docs/_includes/header.html
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
|
3
3
|
<a class="navbar-brand" href="/"><img class="navbar-logo" src="/img/logos/kubes-black.png" /></a>
|
4
4
|
|
5
|
+
{% if page.url != '/' %}
|
6
|
+
<form class="search-form form-group has-search" method="get" action="/search" data-search-form>
|
7
|
+
<span class="fa fa-search form-control-feedback"></span>
|
8
|
+
<input type="text" class="form-control" name="q" id="q" placeholder="Search docs" data-search-input />
|
9
|
+
</form>
|
10
|
+
{% endif %}
|
11
|
+
|
5
12
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
6
13
|
<span class="navbar-toggler-icon"></span>
|
7
14
|
</button>
|
@@ -11,6 +11,7 @@ Here's an example structure, so we can understand how layering works.
|
|
11
11
|
├── clock
|
12
12
|
│ └── deployment.{{ include.ext }}
|
13
13
|
└── web
|
14
|
+
├── all.{{ include.ext }}
|
14
15
|
├── deployment
|
15
16
|
│ ├── dev.{{ include.ext }}
|
16
17
|
│ └── prod.{{ include.ext }}
|
@@ -34,16 +35,17 @@ Notes
|
|
34
35
|
|
35
36
|
Here's a table showing the the full layering.
|
36
37
|
|
37
|
-
Folder/Pattern
|
38
|
-
|
39
|
-
base/all.{{ include.ext }}
|
40
|
-
base/all/ENV.{{ include.ext }}
|
41
|
-
base/KIND.{{ include.ext }}
|
42
|
-
base/KIND/base.{{ include.ext }}
|
43
|
-
base/KIND/ENV.{{ include.ext }}
|
44
|
-
ROLE/
|
45
|
-
ROLE/KIND
|
46
|
-
ROLE/KIND/
|
38
|
+
Type | Folder/Pattern | Example
|
39
|
+
---|---|---
|
40
|
+
pre | base/all.{{ include.ext }} | base/all.{{ include.ext }}
|
41
|
+
pre | base/all/ENV.{{ include.ext }} | base/all/dev.{{ include.ext }}
|
42
|
+
pre | base/KIND.{{ include.ext }} | base/deployment.{{ include.ext }}
|
43
|
+
pre | base/KIND/base.{{ include.ext }} | base/deployment/base.{{ include.ext }}
|
44
|
+
pre | base/KIND/ENV.{{ include.ext }} | base/deployment/dev.{{ include.ext }}
|
45
|
+
pre | ROLE/all.{{ include.ext }} | web/all.{{ include.ext }}
|
46
|
+
main | ROLE/KIND.{{ include.ext }} | web/deployment.{{ include.ext }}
|
47
|
+
post | ROLE/KIND/base.{{ include.ext }} | web/deployment/base.{{ include.ext }}
|
48
|
+
post | ROLE/KIND/ENV.{{ include.ext }} | web/deployment/dev.{{ include.ext }}
|
47
49
|
|
48
50
|
## Real-World Uses
|
49
51
|
|
data/docs/_includes/reference.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
Kubes is a Kubernetes deployment tool. It
|
1
|
+
Kubes is a Kubernetes deployment tool. It focuses on deploying your specific application. It is very good at automating the deployment process. Kubes will:
|
2
2
|
|
3
3
|
{% include kubes-steps.md %}
|
data/docs/_includes/sidebar.html
CHANGED
@@ -97,7 +97,8 @@
|
|
97
97
|
<li><a href="{% link _docs/layering/yaml.md %}">YAML</a></li>
|
98
98
|
<li><a href="{% link _docs/layering/dsl.md %}">DSL</a></li>
|
99
99
|
<li><a href="{% link _docs/layering/mix.md %}">Mix</a></li>
|
100
|
-
<li><a href="{% link _docs/layering/merge.md %}">Merge
|
100
|
+
<li><a href="{% link _docs/layering/merge-dsl.md %}">Merge DSL</a></li>
|
101
|
+
<li><a href="{% link _docs/layering/merge-options.md %}">Merge Options</a></li>
|
101
102
|
</ul>
|
102
103
|
</li>
|
103
104
|
<li><a href="{% link _docs/dsl.md %}">DSL</a>
|
data/docs/_sass/theme.scss
CHANGED
@@ -315,3 +315,95 @@ ul.toc {
|
|
315
315
|
height:100%;
|
316
316
|
}
|
317
317
|
}
|
318
|
+
|
319
|
+
|
320
|
+
#search-field {
|
321
|
+
// background-color: purple;
|
322
|
+
|
323
|
+
td {
|
324
|
+
padding: 0;
|
325
|
+
margin: 0;
|
326
|
+
border: none;
|
327
|
+
}
|
328
|
+
|
329
|
+
table {
|
330
|
+
// background-color: orange;
|
331
|
+
border: none;
|
332
|
+
margin: 0;
|
333
|
+
}
|
334
|
+
|
335
|
+
.gsc-input-box td {
|
336
|
+
vertical-align: top;
|
337
|
+
// padding-top: 15px;
|
338
|
+
}
|
339
|
+
}
|
340
|
+
|
341
|
+
.search-result {
|
342
|
+
padding-bottom: 24px;
|
343
|
+
}
|
344
|
+
|
345
|
+
.search-tips {
|
346
|
+
border: 1px solid gray;
|
347
|
+
// background-color: red;
|
348
|
+
font-size: 0.9em;
|
349
|
+
padding: 10px;
|
350
|
+
margin-bottom: 15px;
|
351
|
+
p {
|
352
|
+
margin: 0;
|
353
|
+
}
|
354
|
+
}
|
355
|
+
|
356
|
+
.search-terms {
|
357
|
+
background-color: #ffffcb;
|
358
|
+
padding: 0.25em;
|
359
|
+
}
|
360
|
+
|
361
|
+
.search-count {
|
362
|
+
font-weight: bold;
|
363
|
+
}
|
364
|
+
|
365
|
+
|
366
|
+
.top-bar {
|
367
|
+
.has-search {
|
368
|
+
// mobile
|
369
|
+
// without padding-left its centered
|
370
|
+
margin: 0;
|
371
|
+
padding: 0;
|
372
|
+
width: 200px;
|
373
|
+
// desktop
|
374
|
+
@media (min-width: 500px) {
|
375
|
+
// without padding-left its centered
|
376
|
+
width: 320px;
|
377
|
+
}
|
378
|
+
@media (min-width: 600px) {
|
379
|
+
// without padding-left its centered
|
380
|
+
width: 400px;
|
381
|
+
}
|
382
|
+
@media (min-width: 768px) {
|
383
|
+
padding-left: 64px;
|
384
|
+
width: 512px;
|
385
|
+
}
|
386
|
+
|
387
|
+
|
388
|
+
.form-control-feedback {
|
389
|
+
position: absolute;
|
390
|
+
z-index: 2;
|
391
|
+
width: 2.375rem;
|
392
|
+
height: 2.375rem;
|
393
|
+
line-height: 2.375rem;
|
394
|
+
text-align: center;
|
395
|
+
pointer-events: none;
|
396
|
+
color: #aaa;
|
397
|
+
}
|
398
|
+
|
399
|
+
.form-control {
|
400
|
+
padding-left: 2.375rem;
|
401
|
+
width: 100%;
|
402
|
+
display: inline;
|
403
|
+
}
|
404
|
+
|
405
|
+
input {
|
406
|
+
width: auto;
|
407
|
+
}
|
408
|
+
}
|
409
|
+
}
|
data/docs/index.html
CHANGED
@@ -9,8 +9,8 @@ sidebar: false
|
|
9
9
|
<div class="col-sm-8 col-sm-offset-2">
|
10
10
|
<div class="header-content">
|
11
11
|
<div class="header-content-inner">
|
12
|
-
<h1>Kubes: Kubernetes
|
13
|
-
<h2>Kubes is a Kubernetes Deployment Tool. It builds the docker image, creates the Kubernetes YAML, and runs kubectl apply. It automates the deployment process and saves you precious finger-typing energy.</h2>
|
12
|
+
<h1>Kubes: Kubernetes App Deploy Tool</h1>
|
13
|
+
<h2>Kubes is a Kubernetes App Deployment Tool. It focuses on deploying your specific application. It builds the docker image, creates the Kubernetes YAML, and runs kubectl apply. It automates the deployment process and saves you precious finger-typing energy.</h2>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
</div>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
layout: null
|
3
|
+
---
|
4
|
+
{% assign first = true %}
|
5
|
+
[
|
6
|
+
{% for doc in site.docs %}
|
7
|
+
{% if doc.title != null and doc.title != empty %}
|
8
|
+
{% unless first %},{% endunless %}{
|
9
|
+
"title": {{doc.title | jsonify}},
|
10
|
+
"search_title": {{doc.search_title | jsonify}},
|
11
|
+
"content": {{doc.content | markdownify | strip_html | replace:'├','' | replace:'└','' | replace:'─','' | replace:'│','' | jsonify}},
|
12
|
+
"link": "{{ site.baseurl }}{{ doc.url }}",
|
13
|
+
"search_omit": "{{ doc.search_omit }}"
|
14
|
+
}
|
15
|
+
{% assign first = false %}
|
16
|
+
{% endif %}
|
17
|
+
{% endfor %}
|
18
|
+
|
19
|
+
{% for post in site.posts %}
|
20
|
+
{% if post.title != null and post.title != empty %}
|
21
|
+
{% unless first %},{% endunless %}{
|
22
|
+
"title": {{post.title | jsonify}},
|
23
|
+
"search_title": {{doc.search_title | jsonify}},
|
24
|
+
"content": {{post.content | markdownify | strip_html | jsonify}},
|
25
|
+
"link": "{{ site.baseurl }}{{ post.url }}",
|
26
|
+
"search_omit": "{{ post.search_omit }}"
|
27
|
+
}
|
28
|
+
{% assign first = false %}
|
29
|
+
{% endif %}
|
30
|
+
{% endfor %}
|
31
|
+
|
32
|
+
{% for page in site.pages %}
|
33
|
+
{% if page.title != null and page.title != empty %}
|
34
|
+
{% unless first %},{% endunless %}{
|
35
|
+
"title": {{page.title | jsonify}},
|
36
|
+
"search_title": {{doc.search_title | jsonify}},
|
37
|
+
"content": {{page.content | markdownify | strip_html | jsonify}},
|
38
|
+
"link": "{{ site.baseurl }}{{ page.url | replace: 'index.html', '' }}",
|
39
|
+
"search_omit": "{{ page.search_omit }}"
|
40
|
+
}
|
41
|
+
{% assign first = false %}
|
42
|
+
{% endif %}
|
43
|
+
{% endfor %}
|
44
|
+
]
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
title: Search
|
3
|
+
search_omit: true
|
4
|
+
---
|
5
|
+
|
6
|
+
<div class="search-tips">
|
7
|
+
<h3>Search Tips:</h3>
|
8
|
+
<p>To OR search terms: "install aws"</p>
|
9
|
+
<p>To AND search terms: "+install +aws"</p>
|
10
|
+
<p>To filter or reject search terms: "-aws"</p>
|
11
|
+
<p>More: <a href="{% link search/tips.md %}">Search Tips</a></p>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<!-- Search results placeholder -->
|
15
|
+
<p class="search-summary" data-search-found>
|
16
|
+
<span class="search-count" data-search-found-count></span> <span data-search-found-word>results</span> found for: <span class="search-terms" data-search-found-term></span>
|
17
|
+
</p>
|
18
|
+
<div data-search-results></div>
|
19
|
+
|
20
|
+
<!-- Search result template -->
|
21
|
+
<script type="text/x-template" id="search-result">
|
22
|
+
<div class="search-result">
|
23
|
+
<h3><a href="##Url##">##Title##</a></h3>
|
24
|
+
<div class="content">##Content##</div>
|
25
|
+
</div>
|
26
|
+
</script>
|
27
|
+
|
28
|
+
<!-- Search script - Must appear after template -->
|
29
|
+
<script src="/search/lunr.js"></script>
|
30
|
+
<script src="/search/search.js"></script>
|