Initial commit

This commit is contained in:
Casey Callendrello 2020-10-14 17:11:26 +02:00
commit b97bbbb8b2
43 changed files with 884 additions and 0 deletions

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
[Makefile]
indent_style = tab
[*.{html,js,json,md,sass,yaml}]
indent_style = space
indent_size = 2

10
.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
# Hugo-generated assets
public/
resources/
# npm assets
node_modules/
# files
package-lock.json
yarn.lock

22
Makefile Normal file
View File

@ -0,0 +1,22 @@
yarn:
yarn
serve: yarn
hugo server \
--buildDrafts \
--buildFuture \
--disableFastRender
production-build:
hugo \
--minify
preview-build:
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture \
--minify
open:
open https://cncf-hugo-starter.netlify.com

46
README.md Normal file
View File

@ -0,0 +1,46 @@
# CNCF Hugo Starter
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
* **[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
## Running locally
Make sure you have [npm](https://www.npmjs.com/) and [yarn](https://yarnpkg.com/) installed. Clone this repository and run the following two commands in its directory:
```shell
# Install npm assets (just Bulma for Sass/CSS)
yarn
# Run the server locally
make serve
```
## Running on Netlify
Netlify is a CI/CD build tool and hosting solution for (among other things) static sites. We **strongly** recommend using Netlify unless you have a good reason not to.
This repository comes with a pre-configured [`netlify.toml`](https://github.com/cncf/hugo-netlify-starter/blob/master/netlify.toml) file. To build to Netlify:
1. Go to [netlify.com](https://netlify.com) and sign up. We recommend signing up using a GitHub account.
2. Click **New Site from Git**, and give Netlify access to your GitHub account.
> **Note:** For projects with lots of contributors, it can be handy to create a general/bot account instead of granting access with a personal account.
3. Install Netlify with access to your documentation site repository.
4. Leave all other settings as default and click **Deploy Site**.
# What's included
This repository has two layouts with minimal styling, all stored under `/layouts/_default`:
* A **homepage** template, a basic homepage which uses the following:
* The `index.html` file and partials in the `/partials/home` directory
* Some helpers in the `/assets/sass/helpers.sass` file
* A **docs** template, a basic content page with submenu which uses the following:
* The `single.html` file and partials in the `/partials/docs` directory
* Classes in the `/assets/sass/helpers.sass` and `/assets/sass/_docs.sass` files
Both use default components and styling from the Bootstrap CSS framework. No menus are structured, because menu structure is highly dependent on the nature of the project.

16
assets/js/app.js Normal file
View File

@ -0,0 +1,16 @@
const navbarBurger = () => {
const burger = $(".navbar-burger"),
menu = $(".navbar-menu");
burger.click(() => {
[burger, menu].forEach((el) => el.toggleClass('is-active'));
});
}
$(() => {
console.log("Welcome to the CNCF's Hugo + Netlify starter");
navbarBurger();
});

100
assets/sass/custom.sass Normal file
View File

@ -0,0 +1,100 @@
// Custom.scss
@charset "utf-8"
{{ $extraColors := site.Params.colors.extra }}
{{ $fontAwesomeVersion := site.Params.font_awesome_version }}
{{ $fonts := site.Params.fonts }}
{{ with $fontAwesomeVersion }}
{{ $fontAwesomeUrl := printf "https://use.fontawesome.com/releases/v%s/css/all.css" . }}
@import url("{{ $fontAwesomeUrl }}")
{{ end }}
{{ if $fonts }}
{{ $fontSlice := (slice) }}
{{ range $fonts }}
{{ $fontSlice = $fontSlice | append (printf "%s:%s" (replace .name " " "+") (delimit .sizes ",")) }}
{{ end }}
{{ $fontsUrl := printf "https://fonts.googleapis.com/css?family=%s" (delimit $fontSlice "|") }}
@import url("{{ $fontsUrl }}")
{{ end }}
// Required
@import "bootstrap/scss/functions"
@import "bootstrap/scss/variables"
@import "bootstrap/scss/mixins"
@import "bootstrap/scss/root"
//Optional
@import "bootstrap/scss/reboot"
@import "bootstrap/scss/type"
@import "bootstrap/scss/images"
@import "bootstrap/scss/code"
@import "bootstrap/scss/grid"
@import "bootstrap/scss/tables"
@import "bootstrap/scss/forms"
@import "bootstrap/scss/buttons"
@import "bootstrap/scss/transitions"
@import "bootstrap/scss/dropdown"
//@import "bootstrap/scss/button-group"
//@import "bootstrap/scss/input-group"
//@import "bootstrap/scss/custom-forms"
@import "bootstrap/scss/nav"
@import "bootstrap/scss/navbar"
//@import "bootstrap/scss/card"
//@import "bootstrap/scss/breadcrumb"
//@import "bootstrap/scss/pagination"
//@import "bootstrap/scss/badge"
@import "bootstrap/scss/jumbotron"
//@import "bootstrap/scss/alert"
//@import "bootstrap/scss/progress"
//@import "bootstrap/scss/media"
//@import "bootstrap/scss/list-group"
//@import "bootstrap/scss/close"
//@import "bootstrap/scss/toasts"
//@import "bootstrap/scss/modal"
//@import "bootstrap/scss/tooltip"
//@import "bootstrap/scss/popover"
//@import "bootstrap/scss/carousel"
//@import "bootstrap/scss/spinners"
@import "bootstrap/scss/utilities"
//@import "bootstrap/scss/print"
// Custom
$font-family-headers: "Fira Sans"
.breadcrumb
li
list-style: none
display: inline
ul
padding-left: 0
.hashlink
font-size: smaller !important
.highlight pre
padding: 0.5rem
border-radius: 5px
.content
table
@extend .table
img
@extend .img-fluid
h1, h2, h3, h4, h5, h6
font-family: $font-family-headers
scroll-margin-top: 5rem
margin-top: 1.8rem
nav
ul
list-style-type: none
padding-left: 0
ul
padding-left: 1.5rem

54
config.toml Normal file
View File

@ -0,0 +1,54 @@
title = "Hugo Netlify Starter"
disableKinds = ["taxonomy", "taxonomyTerm"]
copyright = "Cloud Native Computing Foundation"
enableGitInfo = true
[markup.highlight]
style = "paraiso-dark"
[params]
font_awesome_version = "5.12.0"
description = "Boilerplate for building beautiful websites"
favicon = "favicon.png"
repositoryUrl = "https://github.com/cncf/hugo-netlify-starter"
contentDir = "/content/"
[params.logos]
navbar = "cncf-color.png"
[[params.social]]
name = "Twitter"
color = "#00aced"
url = "https://twitter.com/CloudNativeFdn"
icon = "fab fa-twitter"
[[params.fonts]]
name = "Fira Sans"
sizes = [300, 400, 600, 700]
type = "sans_serif"
[[params.fonts]]
name = "Fira Mono"
sizes = [300, 400, 600, 700]
type = "monospace"
[[params.fonts]]
name = "Fire Sans"
sizes = [100, 200, 300, 400, 500, 600, 700]
type = "heading_font"
[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "Test Content"
url = "/test-content/"
weight = 2
[[menu.main]]
name = "Theme Documentation"
url = "#"
weight = 3

29
content/_index.md Normal file
View File

@ -0,0 +1,29 @@
---
title: "Home"
---
[This is a blatantly broken link](https://kubernetes.io/hl)
This is *not* a full-fledged Hugo theme! It's just a convenient way to get started with a brand new site that's wired with:
* A [Netlify](https://netlify.com) configuration for easy deployment, plus deploy previews
* Some baseline [Hugo](https://gohugo.io) scaffolding
* The [Bootstrap 4.5.x](https://getbootstrap.com/docs/4.5/getting-started/introduction/) CSS framework
* An example Hugo configuration with:
* A main menu
* Specified sans-serif and monospace fonts
* Some extra colors
* A Twitter button
* Some copyright text for the footer
To get started, you need to have Hugo and [Yarn](https://yarnpkg.com) installed. Once those are installed:
```shell
git clone https://github.com/cncf/hugo-netlify-starter && cd hugo-netlify-starter
# Install npm assets (just Bulma for Sass/CSS)
yarn
# Run the server locally
make serve
```

0
content/docs Normal file
View File

View File

@ -0,0 +1,8 @@
---
title: "Docs Index"
description: "index of the docs section"
date: 2020-01-07T14:59:38+01:00
toc: true
---
This is index content

View File

@ -0,0 +1,37 @@
---
title: "Section 1 index"
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
```

View File

@ -0,0 +1,37 @@
---
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
```

View File

@ -0,0 +1,37 @@
---
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
```

View File

@ -0,0 +1,4 @@
---
Title: "Section 2 index"
weight: 20
---

View File

@ -0,0 +1,3 @@
---
Title: "Section 3 index"
---

View File

@ -0,0 +1,37 @@
---
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
```

View File

@ -0,0 +1,118 @@
---
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
![Architecture Diagram](/img/test/architecture.png)
#### 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

View File

@ -0,0 +1,8 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
{{ .Text | safeHTML }}
<a href="#{{ .Anchor | safeURL }}">
<span class="icon hashlink">
<i class="fas fa-link"></i>
</span>
</a>
</h{{ .Level }}>

View File

@ -0,0 +1,10 @@
{{ $link := .Destination }}
{{ $isRemote := strings.HasPrefix $link "http" }}
{{- if not $isRemote -}}
{{ $url := urls.Parse .Destination }}
{{- if $url.Path -}}
{{ $fragment := "" }}
{{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
{{- if .Page.GetPage $url.Path }}{{ $link = printf "%s%s" (.Page.GetPage $url.Path).RelPermalink $fragment }}{{ end }}{{ end -}}
{{- end -}}
<a href="{{ $link | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if $isRemote }} target="_blank"{{ end }}>{{- .Text | safeHTML -}}{{ if $isRemote }} <sup><i class="fas fa-external-link-alt"></i></sup>{{ end }}</a>

View File

@ -0,0 +1,23 @@
{{ $lang := site.LanguageCode }}
<!DOCTYPE html>
<html{{ with $lang }} lang="{{ . }}"{{ end }}>
<head>
<title>
{{ block "title" . }}
{{ site.Title }}
{{ end }}
</title>
{{ partial "css.html" . }}
{{ partial "favicon.html" . }}
</head>
<body>
{{ partial "navbar.html" . }}
<main>
{{ block "main" . }}
{{ end }}
</main>
{{ partial "footer.html" . }}
{{ partial "javascript.html" }}
</body>
</html>

View File

@ -0,0 +1,21 @@
{{ define "main" }}
<header>
<div>
{{ partial "single-header.html" . }}
</div>
</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>
</div>
{{ end }}

View File

@ -0,0 +1,21 @@
{{ define "main" }}
<header>
<div>
{{ partial "single-header.html" . }}
</div>
</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>
</div>
{{ end }}

4
layouts/index.html Normal file
View File

@ -0,0 +1,4 @@
{{ define "main" }}
{{ partial "home/hero.html" . }}
{{ partial "home/content.html" . }}
{{ end }}

View File

@ -0,0 +1,20 @@
{{ define "breadcrumb" }}
{{ if .p1.Parent }}
{{ template "breadcrumb" (dict "p1" .p1.Parent "p2" .p2) }}
{{ else if not .p1.IsHome }}
{{ template "breadcrumb" (dict "p1" .p1.Site.Home "p2" .p2) }}
{{ end }}
{{ $isHere := eq .p1 .p2 }}
<li {{ if $isHere }} class="is-active"{{ end }}>
/ <a href="{{ .p1.RelPermalink }}">
{{ .p1.Title | markdownify }}
</a>
</li>
{{ end }}
<div class="col col-8 breadcrumb" aria-label="breadcrumbs">
<ul class="mb-0 pt-2" style="vertical-align: middle">
{{ template "breadcrumb" (dict "p1" . "p2" .) }}
</ul>
</div>

14
layouts/partials/css.html Normal file
View File

@ -0,0 +1,14 @@
{{- $inServerMode := site.IsServer }}
{{- $includePaths := (slice "node_modules") }}
{{- $sass := "sass/custom.sass" }}
{{- $cssOutput := "css/style.css" }}
{{- $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) }}
{{- $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") }}
{{- $cssOpts := cond $inServerMode $devOpts $prodOpts }}
{{- $css := resources.Get $sass | resources.ExecuteAsTemplate "blah.sass" . | toCSS $cssOpts }}
{{- if $inServerMode }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{- else }}
{{- $prodCss := $css | fingerprint }}
<link rel="stylesheet" href="{{ $prodCss.RelPermalink }}" integrity="{{ $prodCss.Data.Integrity }}">
{{- end }}

View File

@ -0,0 +1,5 @@
{{ with .Content }}
<div class="content">
{{ . }}
</div>
{{ end }}

View File

@ -0,0 +1,7 @@
{{ $hastoc := .Params.toc }}
{{ $toc := .TableOfContents }}
<p> On this page:</p>
{{ if ($hastoc) }}
{{ $toc }}
{{ end }}

View File

@ -0,0 +1,5 @@
{{ $favicon := site.Params.favicon }}
{{ with $favicon }}
{{ $url := . | relURL }}
<link rel="shortcut icon" href="{{ $url }}">
{{ end }}

View File

@ -0,0 +1,10 @@
{{ with site.Copyright }}
{{ $year := now.Year }}
<footer class="footer">
<div class="container">
<p>
&copy; {{ $year }} {{ . }}
</p>
</div>
</footer>
{{ end }}

View File

@ -0,0 +1,8 @@
<div class="col col-4">
{{ $repoUrl := .Site.Params.repositoryUrl }}
{{ $filePath := .File.Path }}
{{ $editUrl := print $repoUrl "/content/" $filePath }}
<a href="{{ $editUrl }}" class="btn btn-primary" target="_blank">
<span class="fas fa-pen"></span> &nbsp; Edit on GitHub
</a>
</div>

View File

@ -0,0 +1,9 @@
{{ with .Content }}
<section class="container-xl">
<div class="row">
<div class="col-12">
{{ . }}
</div>
</div>
</section>
{{ end }}

View File

@ -0,0 +1,15 @@
{{ $title := site.Title }}
{{ $desc := site.Params.description | markdownify }}
<section class="jumbotron">
<div class="container">
<h1>
{{ $title }}
</h1>
{{ with $desc }}
<p class="lead">
{{ . }}
</p>
{{ end }}
</div>
</section>

View File

@ -0,0 +1,5 @@
{{ $app := resources.Get "js/app.js" | fingerprint }}
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
<script src="{{ $app.RelPermalink }}" type="module" integrity="{{ $app.Data.Integrity }}"></script>

View File

@ -0,0 +1,50 @@
{{ $home := site.BaseURL }}
{{ $here := .RelPermalink }}
{{ $title := site.Title }}
{{ $logo := site.Params.logos.navbar }}
{{ $menu := site.Menus.main }}
{{ $social := site.Params.social }}
<div class="navbar navbar-expand-lg navbar-light bg-light sticky-top" role="navigation" aria-label="main navigation">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item" href="{{ $home }}">
{{ if $logo }}
{{ $url := printf "img/logos/%s" $logo | relURL }}
<img src="{{ $url }}" width="200">
{{ else }}
{{ $title }}
{{ end }}
</a>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-nav" aria-controls="main-nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main-nav">
<ul class="navbar-nav mr-auto">
{{ with $menu }}
{{ range . }}
{{ $isHere := eq .URL $here }}
<li class="navbar-start navbar-item{{ if $isHere }} is-active{{ end }}">
{{ $isExternal := hasPrefix .URL "http" }}
<a class="nav-link" href="{{ .URL }}"{{ if $isExternal }} target="_blank"{{ end }}>
{{ .Name }}
</a>
{{ end }}
</li>
{{ end }}
</ul>
<ul class="navbar-nav float-right">
{{ with $social }}
<li class="navbar-item">
{{ partial "social-buttons.html" . }}
</li>
{{ end }}
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,33 @@
{{ $allSections := site.Sections }} <!-- "blog" and "docs" -->
{{ $docsSections := where $allSections "Section" "test-content" }} <!-- "getting-started" and "deployment" -->
{{ $thisUrl := .RelPermalink }} <!-- the URL of the current page -->
{{ range $docsSections }}
{{ $isThisPage := eq .RelPermalink $thisUrl }}
<nav class="section-nav">
<p class="menu-label">Documentation:</p>
<ul class="menu-list">
<li><a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">{{ .CurrentSection.Title | markdownify }}</a>
{{ range .RegularPages }}
<ul>
<li>
<a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">
{{ .Title | markdownify }}
</a>
</li>
</ul>
{{ end }}
</li>
{{ range .Sections }}
<li><a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">{{ .CurrentSection.Title | markdownify }}</a>
<ul>
{{ range .CurrentSection.RegularPages }}
<li>
<a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">{{ .Page.Title | markdownify }}</a>
</li>
{{ end }}
</ul>
</li>
{{ end }}
{{ end }}
</nav>

View File

@ -0,0 +1,9 @@
<div class="container mt-4 mb-4 pb-2 border-bottom">
<section class="row">
{{ if ne .Kind "section" }}
{{ partial "breadcrumb.html" . }}
{{ partial "github-edit.html" . }}
{{ end }}
</section>
</section>
</div>

View File

@ -0,0 +1,14 @@
{{ range . }}
{{ $color := .color | default "white" }}
<a class="btn text-light" style="background-color: {{ .color }}">
{{ with .icon }}
<span class="icon">
<i class="{{ . }}"></i>
</span>
{{ end }}
{{ with .name }}
{{ . }}
{{ end }}
</a>
{{ end }}

12
netlify.toml Normal file
View File

@ -0,0 +1,12 @@
[build]
publish = "public"
command = "make production-build"
[build.environment]
HUGO_VERSION = "0.75.1"
[context.deploy-preview]
command = "make preview-build"
[context.branch-deploy]
command = "make preview-build"

11
package.json Normal file
View File

@ -0,0 +1,11 @@
{
"dependencies": {
"3": "^2.1.0",
"-": "^0.0.1",
"@fortawesome/fontawesome-free": "^5.14.0",
"bootstrap": "^4.5.2",
"jquery": "^3.5.1",
"popper.js": "^1.16.1"
},
"devDependencies": {}
}

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
static/img/logos/cncf-color.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
static/img/logos/cncf-white.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB