Skip to content

Commit a7f5458

Browse files
Moving the documentation to Hugo (#1177)
* Moving to Hugo based documentation Adding semi static documentation based on Hugo Signed-off-by: Gergely Csatari <[email protected]> * Adding versions and examples to the function pages Every function page has now a drop down for the versions of that function and a drop down for the examples. Note: The same examples are shown for all the versions even if the given version of the function does not fully supports the example. Examples are copied from the examples folder of the repo. Signed-off-by: Gergely Csatari <[email protected]> --------- Signed-off-by: Gergely Csatari <[email protected]>
1 parent cad5476 commit a7f5458

File tree

242 files changed

+83971
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+83971
-0
lines changed

documentation/Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
serve: copy-examples
2+
hugo server \
3+
--disableFastRender \
4+
--buildDrafts \
5+
--buildFuture \
6+
--ignoreCache
7+
--printI18nWarnings \
8+
--printMemoryUsage \
9+
--printPathWarnings \
10+
--printUnusedTemplates \
11+
--templateMetrics \
12+
--templateMetricsHints \
13+
--gc
14+
15+
production-build: copy-examples
16+
git submodule update --init --recursive
17+
hugo version
18+
hugo \
19+
--minify
20+
npx -y pagefind --site public
21+
22+
preview-build: copy-examples
23+
git submodule update --init --recursive
24+
hugo \
25+
--baseURL $(DEPLOY_PRIME_URL) \
26+
--buildDrafts \
27+
--buildFuture \
28+
--minify
29+
npx -y pagefind --site public
30+
31+
copy-examples:
32+
# mkdir -p public/examples
33+
# cp -R ../examples public/examples
34+
35+
mkdir -p content/en/
36+
cp -R ../examples content/en/examples

documentation/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# kpt Documentation Site
2+
3+
[![UPDATE ME](https://api.netlify.com/api/v1/badges/61012e8d-a38d-457e-b1e4-6dc9dbb87934/deploy-status)](https://app.netlify.com/sites/cloud-native-finland/deploys)
4+
5+
This directory contains a [Hugo](https://gohugo.io) web site published via [Netlify](https://www.netlify.com/) to
6+
<https://update-me/>.
7+
8+
When the `main` branch of this repo is updated a fresh build and deploy of the website is executed. Recent Netlify
9+
builds and deployments are listed at <https://app.netlify.com/sites/update-me>.
10+
11+
Add content by adding Markdown files to directories in [./content](./content).
12+
13+
Update layouts for each content type in [./layouts](./layouts/).
14+
15+
Configuration is set in [config.toml](./config.toml).
16+
17+
## Setting up a local dev instance
18+
19+
To set up a local dev environment make sure you have [npm](https://www.npmjs.com/) installed, then run the following
20+
from this folder:
21+
22+
```sh
23+
npm install
24+
```
25+
26+
Then run the site using `npm run serve`. To have the site run locally with a functioning local search, run
27+
`npm run serve:with-pagefind`.
28+
29+
## License
30+
31+
Licensed under the [Creative Commons Attribution 4.0 International license](LICENSE-documentation)

documentation/assets/icons/logo.svg

Lines changed: 1407 additions & 0 deletions
Loading

documentation/assets/js/search.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
Copyright 2018 Google LLC
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
(function($) {
18+
19+
'use strict';
20+
21+
var Search = {
22+
init: function() {
23+
$(document).ready(function() {
24+
$(document).on('keypress', '.td-search-input', function(e) {
25+
if (e.keyCode !== 13) {
26+
return
27+
}
28+
29+
var query = $(this).val();
30+
var searchPage = $(this).data('search-page') + "?q=" + query;
31+
document.location = searchPage;
32+
33+
return false;
34+
});
35+
36+
});
37+
},
38+
};
39+
40+
Search.init();
41+
42+
43+
}(jQuery));
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.td-box--primary .td-arrow-down::before {
2+
border: none;
3+
}
4+
5+
.section-group {
6+
@media (max-width: 767px) {
7+
}
8+
@media (min-width: 768px) {
9+
margin-right: 25px;
10+
section {
11+
padding-left: 25px;
12+
padding-right: 25px;
13+
}
14+
}
15+
}
16+
17+
.td-box--primary p > a,
18+
.td-box--secondary p > a,
19+
.td-box--light p > a {
20+
color: $link-color;
21+
}
22+
23+
.td-box--secondary {
24+
background-color: #ffb24c;
25+
color: #464646;
26+
}
27+
28+
.td-box--primary,
29+
.td-box--white {
30+
background-color: #fdfdfd;
31+
color: $body-color;
32+
33+
span.lead p {
34+
font-weight: 300;
35+
}
36+
}
37+
38+
@media (min-width: 768px) {
39+
.td-box--primary h2[id]:before {
40+
margin-top: 0;
41+
height: 0;
42+
}
43+
}
44+
45+
.td-content > table {
46+
margin-bottom: 2rem;
47+
th {
48+
text-transform: uppercase;
49+
border-top: none;
50+
}
51+
tbody tr:nth-of-type(odd) {
52+
background-color: unset;
53+
}
54+
td {
55+
padding: 1rem;
56+
border-bottom: 1px solid #dee2e6;
57+
}
58+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.article-teaser {
2+
h3 {
3+
margin-top: 34px;
4+
a {
5+
color: $black;
6+
}
7+
}
8+
}
9+
10+
.articles-of-tag hr {
11+
background: linear-gradient(180deg, #c4c4c4, hsla(0, 0%, 77%, 0));
12+
border-bottom: 0;
13+
height: 10px;
14+
opacity: 0.15;
15+
width: 100%;
16+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// buttons.
2+
.button-reset {
3+
background: none;
4+
border: none;
5+
box-sizing: border-box;
6+
cursor: pointer;
7+
display: block;
8+
margin-left: 0;
9+
margin-right: 0;
10+
padding: 0;
11+
width: unset;
12+
}
13+
14+
.cncf-button {
15+
color: $white;
16+
background-color: $black;
17+
border: 0;
18+
border-radius: 3px;
19+
box-shadow: none;
20+
box-sizing: border-box;
21+
cursor: pointer;
22+
font-size: 16px;
23+
font-weight: 700;
24+
letter-spacing: 0.02em;
25+
line-height: 105%;
26+
margin: 0;
27+
max-width: 100%;
28+
padding: 12px 40px;
29+
text-align: center;
30+
text-decoration: none;
31+
text-transform: uppercase;
32+
transition: all 0.25s ease-out;
33+
word-break: break-word;
34+
&:hover {
35+
background-color: $gray-700;
36+
}
37+
}

0 commit comments

Comments
 (0)