diff --git a/_index.html b/_index.html new file mode 100644 index 000000000..dac1b6fcf --- /dev/null +++ b/_index.html @@ -0,0 +1,125 @@ ++++ +title = "Knative" ++++ + + + +
+ +
+ {{< icon "logo.svg" >}} +
+
+

Welcome, Knative!

+

Kubernetes-based platform to deploy and manage modern serverless workloads.

+ +
+
+ +
+
+
+ +
+

Make your developers more productive

+

Knative components build on top of Kubernetes, abstracting away + the complex details and enabling developers to focus on what matters. + Built by codifying the best practices shared by successful real-world + implementations, Knative solves the "boring but difficult" parts of + deploying and managing cloud native services so you don't have to. +

+
 
+

Highlights

+
    +
  • + + Focused API with higher level abstractions for common app use-cases. +
  • +
  • Stand up a scalable, secure, stateless service in seconds.
  • +
  • Loosely coupled features let you use the pieces you need.
  • +
  • Pluggable components let you bring your own logging and monitoring, networking, and service mesh.
  • +
  • Knative is portable: run it anywhere Kubernetes runs, never worry about vendor lock-in.
  • +
  • Idiomatic developer experience, supporting common patterns such as + GitOps, DockerOps, ManualOps. +
  • +
  • Knative can be used with common tools and + frameworks such as Django, Ruby on Rails, Spring, and many more. +
  • +
+
 
+
+
+
+
+ +
+
+
+
+

Knative Features

+
+
+
+
+
+

Serving

+

Run serverless containers on Kubernetes with ease, Knative takes care of the details of networking, autoscaling (even to zero), and revision tracking. You just have to focus on your core logic.

+
+
+

Eventing

+

Universal subscription, delivery, and management of events. Build + modern apps by attaching compute to a data stream with declarative event + connectivity and developer-friendly object model.

+
+
+
+
+ +
+
+
+
+
+ +
+

Talk to us on Slack

+

+ + + +

+

Interested in learning more, speaking to other contributors, or finding answers?

+
+
+
+ +
+

Contributions welcome

+

+ + +

+

Want to join the fun on Github? New users are always welcome!

+
+
+
+ +
+

Follow us on Twitter

+

+ + +

+

For features announcements, interesting Knative news, and other great things.

+
+
+
+
+ diff --git a/community/samples/serving/helloworld-clojure/README.md b/community/samples/serving/helloworld-clojure/README.md index 16c7af06c..d4c1960db 100644 --- a/community/samples/serving/helloworld-clojure/README.md +++ b/community/samples/serving/helloworld-clojure/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Clojure" -linkTitle: "Clojure" -weight: 1 -type: "docs" ---- - A simple web app written in Clojure that you can use for testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not specified, it will use "World" as the TARGET. diff --git a/community/samples/serving/helloworld-clojure/index.md b/community/samples/serving/helloworld-clojure/index.md new file mode 100644 index 000000000..8704c38ed --- /dev/null +++ b/community/samples/serving/helloworld-clojure/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Clojure" +linkTitle: "Clojure" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-dart/README.md b/community/samples/serving/helloworld-dart/README.md index a71a2f586..a1a80a3fb 100644 --- a/community/samples/serving/helloworld-dart/README.md +++ b/community/samples/serving/helloworld-dart/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Dart" -linkTitle: "Dart" -weight: 1 -type: "docs" ---- - A simple web app written in the [Dart](https://www.dart.dev) programming language that you can use for testing. It reads in the env variable `TARGET` and prints `"Hello $TARGET"`. If `TARGET` is not specified, it will use `"World"` as diff --git a/community/samples/serving/helloworld-dart/index.md b/community/samples/serving/helloworld-dart/index.md new file mode 100644 index 000000000..c576dfc69 --- /dev/null +++ b/community/samples/serving/helloworld-dart/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Dart" +linkTitle: "Dart" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-deno/README.md b/community/samples/serving/helloworld-deno/README.md index d134d3d89..8a1ac729a 100644 --- a/community/samples/serving/helloworld-deno/README.md +++ b/community/samples/serving/helloworld-deno/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Deno" -linkTitle: "Deno" -weight: 1 -type: "docs" ---- - A simple web app written in Deno. Follow the steps below to create the sample code and then deploy the app to your diff --git a/community/samples/serving/helloworld-deno/index.md b/community/samples/serving/helloworld-deno/index.md new file mode 100644 index 000000000..8ccc08c90 --- /dev/null +++ b/community/samples/serving/helloworld-deno/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Deno" +linkTitle: "Deno" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-elixir/README.md b/community/samples/serving/helloworld-elixir/README.md index df9d95f7f..a191fb7ac 100644 --- a/community/samples/serving/helloworld-elixir/README.md +++ b/community/samples/serving/helloworld-elixir/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Elixir" -linkTitle: "Elixir" -weight: 1 -type: "docs" ---- - A simple web application written in [Elixir](https://elixir-lang.org/) using the [Phoenix Framework](https://phoenixframework.org/). The application prints all environment variables to the main page. diff --git a/community/samples/serving/helloworld-elixir/index.md b/community/samples/serving/helloworld-elixir/index.md new file mode 100644 index 000000000..fadaab7af --- /dev/null +++ b/community/samples/serving/helloworld-elixir/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Elixir" +linkTitle: "Elixir" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-haskell/README.md b/community/samples/serving/helloworld-haskell/README.md index bc4b88333..0eba47edc 100644 --- a/community/samples/serving/helloworld-haskell/README.md +++ b/community/samples/serving/helloworld-haskell/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Haskell" -linkTitle: "Haskell" -weight: 1 -type: "docs" ---- - A simple web app written in Haskell that you can use for testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not specified, it will use "World" as the TARGET. diff --git a/community/samples/serving/helloworld-haskell/index.md b/community/samples/serving/helloworld-haskell/index.md new file mode 100644 index 000000000..f96be3be2 --- /dev/null +++ b/community/samples/serving/helloworld-haskell/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Haskell" +linkTitle: "Haskell" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-java-micronaut/README.md b/community/samples/serving/helloworld-java-micronaut/README.md index 05a83a31d..d73fa85b1 100644 --- a/community/samples/serving/helloworld-java-micronaut/README.md +++ b/community/samples/serving/helloworld-java-micronaut/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Java (Micronaut)" -linkTitle: "Java (Micronaut)" -weight: 1 -type: "docs" ---- - Learn how to deploy a simple web app that is written in Java and uses Micronaut. This samples uses Docker to build locally. The app reads in a `TARGET` env diff --git a/community/samples/serving/helloworld-java-micronaut/index.md b/community/samples/serving/helloworld-java-micronaut/index.md new file mode 100644 index 000000000..32b6e63cd --- /dev/null +++ b/community/samples/serving/helloworld-java-micronaut/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Java (Micronaut)" +linkTitle: "Java (Micronaut)" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-java-quarkus/README.md b/community/samples/serving/helloworld-java-quarkus/README.md index 1a89728d8..d2b07d25e 100644 --- a/community/samples/serving/helloworld-java-quarkus/README.md +++ b/community/samples/serving/helloworld-java-quarkus/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Java (Quarkus)" -linkTitle: "Java (Quarkus)" -weight: 1 -type: "docs" ---- - A simple [JAX-RS REST API](https://github.com/jax-rs) application that is written in Java and uses [Quarkus](https://quarkus.io/). diff --git a/community/samples/serving/helloworld-java-quarkus/index.md b/community/samples/serving/helloworld-java-quarkus/index.md new file mode 100644 index 000000000..2f9ec732a --- /dev/null +++ b/community/samples/serving/helloworld-java-quarkus/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Java (Quarkus)" +linkTitle: "Java (Quarkus)" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-r/README.md b/community/samples/serving/helloworld-r/README.md index 688bd71ac..e426349de 100644 --- a/community/samples/serving/helloworld-r/README.md +++ b/community/samples/serving/helloworld-r/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - R" -linkTitle: "R" -weight: 1 -type: "docs" ---- - A simple web app that executes an R script. The R script reads an env variable `TARGET` and prints `Hello ${TARGET}!`. If the `TARGET` environment variable is not specified, the script uses `World`. diff --git a/community/samples/serving/helloworld-r/index.md b/community/samples/serving/helloworld-r/index.md new file mode 100644 index 000000000..7bc817a1f --- /dev/null +++ b/community/samples/serving/helloworld-r/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - R" +linkTitle: "R" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-rserver/README.md b/community/samples/serving/helloworld-rserver/README.md index 4c87f2a37..7bd5fbd42 100644 --- a/community/samples/serving/helloworld-rserver/README.md +++ b/community/samples/serving/helloworld-rserver/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - R server" -linkTitle: "R server" -weight: 1 -type: "docs" ---- - A simple web app created with R package, [plumber](https://www.rplumber.io). plumber creates a REST API by adding annotations to your R code. The R script reads an environment variable `TARGET` and prints `Hello ${TARGET}!`. If the diff --git a/community/samples/serving/helloworld-rserver/index.md b/community/samples/serving/helloworld-rserver/index.md new file mode 100644 index 000000000..51004ef04 --- /dev/null +++ b/community/samples/serving/helloworld-rserver/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - R server" +linkTitle: "R server" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-rust/README.md b/community/samples/serving/helloworld-rust/README.md index 0dd7ed040..78327ebcc 100644 --- a/community/samples/serving/helloworld-rust/README.md +++ b/community/samples/serving/helloworld-rust/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Rust" -linkTitle: "Rust" -weight: 1 -type: "docs" ---- - A simple web app written in Rust that you can use for testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If diff --git a/community/samples/serving/helloworld-rust/index.md b/community/samples/serving/helloworld-rust/index.md new file mode 100644 index 000000000..3f29b4cc4 --- /dev/null +++ b/community/samples/serving/helloworld-rust/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Rust" +linkTitle: "Rust" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-swift/README.md b/community/samples/serving/helloworld-swift/README.md index 5ea4b7c1d..af5a8516a 100644 --- a/community/samples/serving/helloworld-swift/README.md +++ b/community/samples/serving/helloworld-swift/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Swift" -linkTitle: "Swift" -weight: 1 -type: "docs" ---- - A simple web app written in Swift that you can use for testing. The app reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not specified, the app uses "World" as the TARGET. diff --git a/community/samples/serving/helloworld-swift/index.md b/community/samples/serving/helloworld-swift/index.md new file mode 100644 index 000000000..ba903a885 --- /dev/null +++ b/community/samples/serving/helloworld-swift/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Swift" +linkTitle: "Swift" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/helloworld-vertx/README.md b/community/samples/serving/helloworld-vertx/README.md index afe70544f..cadcbc9fe 100644 --- a/community/samples/serving/helloworld-vertx/README.md +++ b/community/samples/serving/helloworld-vertx/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Eclipse Vert.x" -linkTitle: "Eclipse Vert.x" -weight: 1 -type: "docs" ---- - Learn how to deploy a simple web app that is written in Java and uses Eclipse Vert.x. This samples uses Docker to build locally. The app reads in a `TARGET` env variable and then prints "Hello World: \${TARGET}!". If a value for `TARGET` diff --git a/community/samples/serving/helloworld-vertx/index.md b/community/samples/serving/helloworld-vertx/index.md new file mode 100644 index 000000000..a4affb750 --- /dev/null +++ b/community/samples/serving/helloworld-vertx/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Eclipse Vert.x" +linkTitle: "Eclipse Vert.x" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/community/samples/serving/machinelearning-python-bentoml/README.md b/community/samples/serving/machinelearning-python-bentoml/README.md index 6c867e0ab..183a24f9a 100644 --- a/community/samples/serving/machinelearning-python-bentoml/README.md +++ b/community/samples/serving/machinelearning-python-bentoml/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Python BentoML" -linkTitle: "Python Bentoml" -weight: 1 -type: "docs" ---- - A simple machine learning model with API serving that is written in python and using [BentoML](https://github.com/bentoml/BentoML). BentoML is an open source framework for high performance ML model serving, which supports all major machine diff --git a/community/samples/serving/machinelearning-python-bentoml/index.md b/community/samples/serving/machinelearning-python-bentoml/index.md new file mode 100644 index 000000000..e7ad73815 --- /dev/null +++ b/community/samples/serving/machinelearning-python-bentoml/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Python BentoML" +linkTitle: "Python Bentoml" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/debugging/README.md b/docs/eventing/debugging/README.md index a10589c8c..af8d1184c 100644 --- a/docs/eventing/debugging/README.md +++ b/docs/eventing/debugging/README.md @@ -1,10 +1,3 @@ ---- -title: "Debugging Knative Eventing" -linkTitle: "Debugging" -weight: 80 -type: "docs" ---- - This is an evolving document on how to debug a non-working Knative Eventing setup. diff --git a/docs/eventing/debugging/index.md b/docs/eventing/debugging/index.md new file mode 100644 index 000000000..ee1e82f3c --- /dev/null +++ b/docs/eventing/debugging/index.md @@ -0,0 +1,8 @@ +--- +title: "Debugging Knative Eventing" +linkTitle: "Debugging" +weight: 80 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/apache-camel-source/README.md b/docs/eventing/samples/apache-camel-source/README.md index a9f9b4fa3..964e2730e 100644 --- a/docs/eventing/samples/apache-camel-source/README.md +++ b/docs/eventing/samples/apache-camel-source/README.md @@ -1,10 +1,3 @@ ---- -title: "Apache Camel source" -linkTitle: "Camel source" -weight: 5 -type: "docs" ---- - These samples show how to configure Camel Sources. These event sources are highly dynamic and allow you to generate events from a variety of systems (cloud platforms, social networks, datastores, message brokers, legacy systems, etc.), leveraging all the [300+ components provided by Apache Camel](https://camel.apache.org/components/latest/). diff --git a/docs/eventing/samples/apache-camel-source/index.md b/docs/eventing/samples/apache-camel-source/index.md new file mode 100644 index 000000000..6c4d9947e --- /dev/null +++ b/docs/eventing/samples/apache-camel-source/index.md @@ -0,0 +1,8 @@ +--- +title: "Apache Camel source" +linkTitle: "Camel source" +weight: 5 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/cloud-audit-logs-source/README.md b/docs/eventing/samples/cloud-audit-logs-source/README.md index 756c1c120..d016cf9d7 100644 --- a/docs/eventing/samples/cloud-audit-logs-source/README.md +++ b/docs/eventing/samples/cloud-audit-logs-source/README.md @@ -1,8 +1 @@ ---- -title: "CloudAuditLogsSource" -linkTitle: "CloudAuditLogsSource" -weight: 20 -type: "docs" ---- - Please refer to the [example](https://github.com/google/knative-gcp/blob/master/docs/examples/cloudauditlogssource/README.md) in knative-gcp. diff --git a/docs/eventing/samples/cloud-audit-logs-source/index.md b/docs/eventing/samples/cloud-audit-logs-source/index.md new file mode 100644 index 000000000..044b26d85 --- /dev/null +++ b/docs/eventing/samples/cloud-audit-logs-source/index.md @@ -0,0 +1,8 @@ +--- +title: "CloudAuditLogsSource" +linkTitle: "CloudAuditLogsSource" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/cloud-pubsub-source/README.md b/docs/eventing/samples/cloud-pubsub-source/README.md index c95f5e5f4..471c3d56c 100644 --- a/docs/eventing/samples/cloud-pubsub-source/README.md +++ b/docs/eventing/samples/cloud-pubsub-source/README.md @@ -1,10 +1 @@ ---- -title: "CloudPubSubSource" -linkTitle: "CloudPubSubSource" -weight: 20 -type: "docs" -aliases: - - /docs/eventing/samples/gcp-pubsub-source/README.md ---- - Please refer to the [example](https://github.com/google/knative-gcp/blob/master/docs/examples/cloudpubsubsource/README.md) in knative-gcp. diff --git a/docs/eventing/samples/cloud-pubsub-source/index.md b/docs/eventing/samples/cloud-pubsub-source/index.md new file mode 100644 index 000000000..d0806a466 --- /dev/null +++ b/docs/eventing/samples/cloud-pubsub-source/index.md @@ -0,0 +1,10 @@ +--- +title: "CloudPubSubSource" +linkTitle: "CloudPubSubSource" +weight: 20 +type: "docs" +aliases: + - /docs/eventing/samples/gcp-pubsub-source/README.md +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/cloud-scheduler-source/README.md b/docs/eventing/samples/cloud-scheduler-source/README.md index cf0096ea6..4adfe737d 100644 --- a/docs/eventing/samples/cloud-scheduler-source/README.md +++ b/docs/eventing/samples/cloud-scheduler-source/README.md @@ -1,8 +1 @@ ---- -title: "CloudSchedulerSource" -linkTitle: "CloudSchedulerSource" -weight: 20 -type: "docs" ---- - Please refer to the [example](https://github.com/google/knative-gcp/blob/master/docs/examples/cloudschedulersource/README.md) in knative-gcp. diff --git a/docs/eventing/samples/cloud-scheduler-source/index.md b/docs/eventing/samples/cloud-scheduler-source/index.md new file mode 100644 index 000000000..5d44a69ef --- /dev/null +++ b/docs/eventing/samples/cloud-scheduler-source/index.md @@ -0,0 +1,8 @@ +--- +title: "CloudSchedulerSource" +linkTitle: "CloudSchedulerSource" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/cloud-storage-source/README.md b/docs/eventing/samples/cloud-storage-source/README.md index f69c977e1..15a524b5a 100644 --- a/docs/eventing/samples/cloud-storage-source/README.md +++ b/docs/eventing/samples/cloud-storage-source/README.md @@ -1,8 +1 @@ ---- -title: "CloudStorageSource" -linkTitle: "CloudStorageSource" -weight: 20 -type: "docs" ---- - Please refer to the [example](https://github.com/google/knative-gcp/blob/master/docs/examples/cloudstoragesource/README.md) in knative-gcp. diff --git a/docs/eventing/samples/cloud-storage-source/index.md b/docs/eventing/samples/cloud-storage-source/index.md new file mode 100644 index 000000000..5e6dbe4c8 --- /dev/null +++ b/docs/eventing/samples/cloud-storage-source/index.md @@ -0,0 +1,8 @@ +--- +title: "CloudStorageSource" +linkTitle: "CloudStorageSource" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/container-source/README.md b/docs/eventing/samples/container-source/README.md index 1999dfde7..9377e0734 100644 --- a/docs/eventing/samples/container-source/README.md +++ b/docs/eventing/samples/container-source/README.md @@ -1,10 +1,3 @@ ---- -title: "Container Source Example" -linkTitle: "Container source" -weight: 10 -type: "docs" ---- - ContainerSource will start a container image which will generate events under certain situations and send messages to a sink URI. It also can be an easy way to support your own event sources in Knative. This guide shows how to configure diff --git a/docs/eventing/samples/container-source/index.md b/docs/eventing/samples/container-source/index.md new file mode 100644 index 000000000..45f91706f --- /dev/null +++ b/docs/eventing/samples/container-source/index.md @@ -0,0 +1,8 @@ +--- +title: "Container Source Example" +linkTitle: "Container source" +weight: 10 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/github-source/README.md b/docs/eventing/samples/github-source/README.md index 874bf0f91..46a14edcc 100644 --- a/docs/eventing/samples/github-source/README.md +++ b/docs/eventing/samples/github-source/README.md @@ -1,10 +1,3 @@ ---- -title: "GitHub source" -linkTitle: "GitHub source" -weight: 30 -type: "docs" ---- - GitHub Source example shows how to wire GitHub events for consumption by a Knative Service. diff --git a/docs/eventing/samples/github-source/index.md b/docs/eventing/samples/github-source/index.md new file mode 100644 index 000000000..532c401e7 --- /dev/null +++ b/docs/eventing/samples/github-source/index.md @@ -0,0 +1,8 @@ +--- +title: "GitHub source" +linkTitle: "GitHub source" +weight: 30 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/gitlab-source/README.md b/docs/eventing/samples/gitlab-source/README.md index 6e5b470b8..da365c320 100644 --- a/docs/eventing/samples/gitlab-source/README.md +++ b/docs/eventing/samples/gitlab-source/README.md @@ -1,10 +1,3 @@ ---- -title: "GitLab source" -linkTitle: "GitLab source" -weight: 30 -type: "docs" ---- - GitLab Source example shows how to wire GitLab events for consumption by a Knative Service. diff --git a/docs/eventing/samples/gitlab-source/index.md b/docs/eventing/samples/gitlab-source/index.md new file mode 100644 index 000000000..252622027 --- /dev/null +++ b/docs/eventing/samples/gitlab-source/index.md @@ -0,0 +1,8 @@ +--- +title: "GitLab source" +linkTitle: "GitLab source" +weight: 30 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/iot-core/README.md b/docs/eventing/samples/iot-core/README.md index e57985f6f..a9ed89c45 100644 --- a/docs/eventing/samples/iot-core/README.md +++ b/docs/eventing/samples/iot-core/README.md @@ -1,10 +1,3 @@ ---- -title: "Binding running services to an IoT core" -linkTitle: "IoT core" -weight: 40 -type: "docs" ---- - This sample shows how to bind a running service to an [IoT core](https://cloud.google.com/iot-core/) using [GCP PubSub](https://cloud.google.com/pubsub/) as the event source. With minor diff --git a/docs/eventing/samples/iot-core/index.md b/docs/eventing/samples/iot-core/index.md new file mode 100644 index 000000000..1730a67f1 --- /dev/null +++ b/docs/eventing/samples/iot-core/index.md @@ -0,0 +1,8 @@ +--- +title: "Binding running services to an IoT core" +linkTitle: "IoT core" +weight: 40 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/kafka/channel/README.md b/docs/eventing/samples/kafka/channel/README.md index 6ed2c224c..7553229af 100644 --- a/docs/eventing/samples/kafka/channel/README.md +++ b/docs/eventing/samples/kafka/channel/README.md @@ -1,10 +1,3 @@ ---- -title: "Apache Kafka Channel Example" -linkTitle: "Channel Example" -weight: 20 -type: "docs" ---- - You can install and configure the Apache Kafka CRD (`KafkaChannel`) as the default channel configuration in Knative Eventing. ## Prerequisites diff --git a/docs/eventing/samples/kafka/channel/index.md b/docs/eventing/samples/kafka/channel/index.md new file mode 100644 index 000000000..dc2f1683d --- /dev/null +++ b/docs/eventing/samples/kafka/channel/index.md @@ -0,0 +1,8 @@ +--- +title: "Apache Kafka Channel Example" +linkTitle: "Channel Example" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/kafka/source/README.md b/docs/eventing/samples/kafka/source/README.md index ee3912b8c..703a9ceec 100644 --- a/docs/eventing/samples/kafka/source/README.md +++ b/docs/eventing/samples/kafka/source/README.md @@ -1,10 +1,3 @@ ---- -title: "Apache Kafka Source Example" -linkTitle: "Source Example" -weight: 20 -type: "docs" ---- - Tutorial on how to build and deploy a `KafkaSource` [Eventing source](../../../sources/README.md) using a Knative Serving `Service`. ## Prerequisites diff --git a/docs/eventing/samples/kafka/source/index.md b/docs/eventing/samples/kafka/source/index.md new file mode 100644 index 000000000..b5b8a8888 --- /dev/null +++ b/docs/eventing/samples/kafka/source/index.md @@ -0,0 +1,8 @@ +--- +title: "Apache Kafka Source Example" +linkTitle: "Source Example" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/kubernetes-event-source/README.md b/docs/eventing/samples/kubernetes-event-source/README.md index 07952ed91..6071f42db 100644 --- a/docs/eventing/samples/kubernetes-event-source/README.md +++ b/docs/eventing/samples/kubernetes-event-source/README.md @@ -1,10 +1,3 @@ ---- -title: "Kubernetes event using the API Server Source" -linkTitle: "Kubernetes event" -weight: 50 -type: "docs" ---- - This example shows how to wire [Kubernetes cluster events](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#event-v1-core), using the API Server Source, for consumption by a function that has been implemented as a Knative Service. diff --git a/docs/eventing/samples/kubernetes-event-source/index.md b/docs/eventing/samples/kubernetes-event-source/index.md new file mode 100644 index 000000000..2aadfa039 --- /dev/null +++ b/docs/eventing/samples/kubernetes-event-source/index.md @@ -0,0 +1,8 @@ +--- +title: "Kubernetes event using the API Server Source" +linkTitle: "Kubernetes event" +weight: 50 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/ping-source/README.md b/docs/eventing/samples/ping-source/README.md index fbdada257..4ecd98b11 100644 --- a/docs/eventing/samples/ping-source/README.md +++ b/docs/eventing/samples/ping-source/README.md @@ -1,12 +1,3 @@ ---- -title: "PingSource example" -linkTitle: "PingSource" -weight: 10 -type: "docs" -aliases: - - ../cronjob-source ---- - This example shows how to configure PingSource as an event source for functions. diff --git a/docs/eventing/samples/ping-source/index.md b/docs/eventing/samples/ping-source/index.md new file mode 100644 index 000000000..c5d64f2e0 --- /dev/null +++ b/docs/eventing/samples/ping-source/index.md @@ -0,0 +1,10 @@ +--- +title: "PingSource example" +linkTitle: "PingSource" +weight: 10 +type: "docs" +aliases: + - ../cronjob-source +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/sequence/sequence-reply-to-event-display/README.md b/docs/eventing/samples/sequence/sequence-reply-to-event-display/README.md index 5d45e3435..7cc043b03 100644 --- a/docs/eventing/samples/sequence/sequence-reply-to-event-display/README.md +++ b/docs/eventing/samples/sequence/sequence-reply-to-event-display/README.md @@ -1,10 +1,3 @@ ---- -title: "Sequence wired to event-display" -linkTitle: "Displaying sequence output" -weight: 20 -type: "docs" ---- - We are going to create the following logical configuration. We create a PingSource, feeding events to a [`Sequence`](../../../flows/sequence.md), then taking the output of that `Sequence` and displaying the resulting output. diff --git a/docs/eventing/samples/sequence/sequence-reply-to-event-display/index.md b/docs/eventing/samples/sequence/sequence-reply-to-event-display/index.md new file mode 100644 index 000000000..0de60ff97 --- /dev/null +++ b/docs/eventing/samples/sequence/sequence-reply-to-event-display/index.md @@ -0,0 +1,8 @@ +--- +title: "Sequence wired to event-display" +linkTitle: "Displaying sequence output" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/sequence/sequence-reply-to-sequence/README.md b/docs/eventing/samples/sequence/sequence-reply-to-sequence/README.md index 24ec54ada..742878ce5 100644 --- a/docs/eventing/samples/sequence/sequence-reply-to-sequence/README.md +++ b/docs/eventing/samples/sequence/sequence-reply-to-sequence/README.md @@ -1,10 +1,3 @@ ---- -title: "Sequence wired to another Sequence" -linkTitle: "Using Sequences in series" -weight: 20 -type: "docs" ---- - We are going to create the following logical configuration. We create a PingSource, feeding events to a [`Sequence`](../../../flows/sequence.md), then taking the output of that `Sequence` and sending it to a second `Sequence` and diff --git a/docs/eventing/samples/sequence/sequence-reply-to-sequence/index.md b/docs/eventing/samples/sequence/sequence-reply-to-sequence/index.md new file mode 100644 index 000000000..7d5164e03 --- /dev/null +++ b/docs/eventing/samples/sequence/sequence-reply-to-sequence/index.md @@ -0,0 +1,8 @@ +--- +title: "Sequence wired to another Sequence" +linkTitle: "Using Sequences in series" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/sequence/sequence-terminal/README.md b/docs/eventing/samples/sequence/sequence-terminal/README.md index 94e2e8621..64359bfa1 100644 --- a/docs/eventing/samples/sequence/sequence-terminal/README.md +++ b/docs/eventing/samples/sequence/sequence-terminal/README.md @@ -1,10 +1,3 @@ ---- -title: "Sequence terminal" -linkTitle: "Create additional events" -weight: 20 -type: "docs" ---- - We are going to create the following logical configuration. We create a CronJobSource, feeding events to a [`Sequence`](../../../flows/sequence.md). Sequence can then do either external work, or out of band create additional events. diff --git a/docs/eventing/samples/sequence/sequence-terminal/index.md b/docs/eventing/samples/sequence/sequence-terminal/index.md new file mode 100644 index 000000000..e2e106925 --- /dev/null +++ b/docs/eventing/samples/sequence/sequence-terminal/index.md @@ -0,0 +1,8 @@ +--- +title: "Sequence terminal" +linkTitle: "Create additional events" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/sequence/sequence-with-broker-trigger/README.md b/docs/eventing/samples/sequence/sequence-with-broker-trigger/README.md index f62d54515..d6c88bbd2 100644 --- a/docs/eventing/samples/sequence/sequence-with-broker-trigger/README.md +++ b/docs/eventing/samples/sequence/sequence-with-broker-trigger/README.md @@ -1,10 +1,3 @@ ---- -title: "Using Sequence with Broker and Trigger" -linkTitle: "Using with Broker and Trigger" -weight: 20 -type: "docs" ---- - We are going to create the following logical configuration. We create a PingSource, feeding events into the Broker, then we create a `Filter` that wires those events into a [`Sequence`](../../../flows/sequence.md) consisting of 3 diff --git a/docs/eventing/samples/sequence/sequence-with-broker-trigger/index.md b/docs/eventing/samples/sequence/sequence-with-broker-trigger/index.md new file mode 100644 index 000000000..5af313c79 --- /dev/null +++ b/docs/eventing/samples/sequence/sequence-with-broker-trigger/index.md @@ -0,0 +1,8 @@ +--- +title: "Using Sequence with Broker and Trigger" +linkTitle: "Using with Broker and Trigger" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/samples/sinkbinding/README.md b/docs/eventing/samples/sinkbinding/README.md index 5788b2a35..f86a5cd72 100644 --- a/docs/eventing/samples/sinkbinding/README.md +++ b/docs/eventing/samples/sinkbinding/README.md @@ -1,10 +1,3 @@ ---- -title: "Sink Binding Example" -linkTitle: "Sink Binding" -weight: 10 -type: "docs" ---- - A SinkBinding is responsible for linking together "addressable" Kubernetes resources that may receive events (aka the event "sink") with Kubernetes resources that embed a PodSpec (as `spec.template.spec`) and want to produce diff --git a/docs/eventing/samples/sinkbinding/index.md b/docs/eventing/samples/sinkbinding/index.md new file mode 100644 index 000000000..28d9e57ff --- /dev/null +++ b/docs/eventing/samples/sinkbinding/index.md @@ -0,0 +1,8 @@ +--- +title: "Sink Binding Example" +linkTitle: "Sink Binding" +weight: 10 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/eventing/sources/README.md b/docs/eventing/sources/README.md index b507b42bb..1c4c0f667 100644 --- a/docs/eventing/sources/README.md +++ b/docs/eventing/sources/README.md @@ -1,10 +1,3 @@ ---- -title: "Knative Eventing sources" -linkTitle: "Eventing sources" -weight: 20 -type: "docs" ---- - diff --git a/docs/eventing/sources/generator/ReadmeTemplate.gomd b/docs/eventing/sources/generator/ReadmeTemplate.gomd index 3de863f7a..2f4aca11e 100644 --- a/docs/eventing/sources/generator/ReadmeTemplate.gomd +++ b/docs/eventing/sources/generator/ReadmeTemplate.gomd @@ -1,10 +1,3 @@ ---- -title: "Knative Eventing sources" -linkTitle: "Eventing sources" -weight: 20 -type: "docs" ---- - {{ "" }} {{- /* This will be interpreted given a yamlSources object. */ -}} @@ -18,7 +11,7 @@ procedure: 2. Run the generator tool: ```shell - go run eventing/sources/generator/main.go + go run docs/eventing/sources/generator/main.go ``` --> diff --git a/docs/eventing/sources/index.md b/docs/eventing/sources/index.md new file mode 100644 index 000000000..b2231f3f8 --- /dev/null +++ b/docs/eventing/sources/index.md @@ -0,0 +1,8 @@ +--- +title: "Knative Eventing sources" +linkTitle: "Eventing sources" +weight: 20 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/autoscale-go/README.md b/docs/serving/samples/autoscale-go/README.md index 8fb3f47b1..b31f094e7 100644 --- a/docs/serving/samples/autoscale-go/README.md +++ b/docs/serving/samples/autoscale-go/README.md @@ -1,10 +1,3 @@ ---- -title: "Autoscale Sample App - Go" -linkTitle: "Autoscaling - Go" -weight: 1 -type: "docs" ---- - A demonstration of the autoscaling capabilities of a Knative Serving Revision. ## Prerequisites diff --git a/docs/serving/samples/autoscale-go/index.md b/docs/serving/samples/autoscale-go/index.md new file mode 100644 index 000000000..e47c47680 --- /dev/null +++ b/docs/serving/samples/autoscale-go/index.md @@ -0,0 +1,8 @@ +--- +title: "Autoscale Sample App - Go" +linkTitle: "Autoscaling - Go" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/cloudevents/cloudevents-go/README.md b/docs/serving/samples/cloudevents/cloudevents-go/README.md index c8d8fbc74..40976996f 100644 --- a/docs/serving/samples/cloudevents/cloudevents-go/README.md +++ b/docs/serving/samples/cloudevents/cloudevents-go/README.md @@ -1,10 +1,3 @@ ---- -title: "Cloud Events - Go" -linkTitle: "Go" -weight: 1 -type: "docs" ---- - A simple web app written in Go that can receive and send Cloud Events that you can use for testing. It supports running in two modes: diff --git a/docs/serving/samples/cloudevents/cloudevents-go/index.md b/docs/serving/samples/cloudevents/cloudevents-go/index.md new file mode 100644 index 000000000..7e92a14d5 --- /dev/null +++ b/docs/serving/samples/cloudevents/cloudevents-go/index.md @@ -0,0 +1,8 @@ +--- +title: "Cloud Events - Go" +linkTitle: "Go" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/gitwebhook-go/README.md b/docs/serving/samples/gitwebhook-go/README.md index 03779fce5..871c47bff 100644 --- a/docs/serving/samples/gitwebhook-go/README.md +++ b/docs/serving/samples/gitwebhook-go/README.md @@ -1,10 +1,3 @@ ---- -title: "GitHub webhook sample - Go" -linkTitle: "GitHub Webhook - Go" -weight: 1 -type: "docs" ---- - A handler written in Go that demonstrates interacting with GitHub through a webhook. diff --git a/docs/serving/samples/gitwebhook-go/index.md b/docs/serving/samples/gitwebhook-go/index.md new file mode 100644 index 000000000..625512ea0 --- /dev/null +++ b/docs/serving/samples/gitwebhook-go/index.md @@ -0,0 +1,8 @@ +--- +title: "GitHub webhook sample - Go" +linkTitle: "GitHub Webhook - Go" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/grpc-ping-go/README.md b/docs/serving/samples/grpc-ping-go/README.md index 32dfe08b5..a05e76b34 100644 --- a/docs/serving/samples/grpc-ping-go/README.md +++ b/docs/serving/samples/grpc-ping-go/README.md @@ -1,10 +1,3 @@ ---- -title: "gRPC Server - Go" -#linkTitle: "" -weight: 1 -type: "docs" ---- - A [gRPC](https://grpc.io) server written in Go. This sample can be used to try out gRPC, HTTP/2, and custom port configuration diff --git a/docs/serving/samples/grpc-ping-go/index.md b/docs/serving/samples/grpc-ping-go/index.md new file mode 100644 index 000000000..e8900fbfc --- /dev/null +++ b/docs/serving/samples/grpc-ping-go/index.md @@ -0,0 +1,8 @@ +--- +title: "gRPC Server - Go" +#linkTitle: "" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-csharp/README.md b/docs/serving/samples/hello-world/helloworld-csharp/README.md index 6ea5392ab..49560586d 100644 --- a/docs/serving/samples/hello-world/helloworld-csharp/README.md +++ b/docs/serving/samples/hello-world/helloworld-csharp/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello world - .NET Core" -linkTitle: ".NET" -weight: 1 -type: "docs" ---- - A simple web app written in C# using .NET Core 3.1 that you can use for testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not specified, it will use "World" as the TARGET. @@ -192,4 +185,4 @@ To remove the sample app from your cluster, delete the service record: ```shell kubectl delete --filename service.yaml -``` \ No newline at end of file +``` diff --git a/docs/serving/samples/hello-world/helloworld-csharp/index.md b/docs/serving/samples/hello-world/helloworld-csharp/index.md new file mode 100644 index 000000000..343e572dd --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-csharp/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello world - .NET Core" +linkTitle: ".NET" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-go/README.md b/docs/serving/samples/hello-world/helloworld-go/README.md index 74c9cf99e..f9f4cb71a 100644 --- a/docs/serving/samples/hello-world/helloworld-go/README.md +++ b/docs/serving/samples/hello-world/helloworld-go/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Go" -linkTitle: "Go" -weight: 1 -type: "docs" ---- - A simple web app written in Go that you can use for testing. It reads in an env variable `TARGET` and prints `Hello ${TARGET}!`. If `TARGET` is not specified, it will use `World` as the `TARGET`. diff --git a/docs/serving/samples/hello-world/helloworld-go/index.md b/docs/serving/samples/hello-world/helloworld-go/index.md new file mode 100644 index 000000000..64864f340 --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-go/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Go" +linkTitle: "Go" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-java-spark/README.md b/docs/serving/samples/hello-world/helloworld-java-spark/README.md index f65bbe720..965fda2eb 100644 --- a/docs/serving/samples/hello-world/helloworld-java-spark/README.md +++ b/docs/serving/samples/hello-world/helloworld-java-spark/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Spark Java Framework" -linkTitle: "Java (Spark)" -weight: 1 -type: "docs" ---- - A simple web app written in Java using Spark Java Framework that you can use for testing. diff --git a/docs/serving/samples/hello-world/helloworld-java-spark/index.md b/docs/serving/samples/hello-world/helloworld-java-spark/index.md new file mode 100644 index 000000000..6032382fb --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-java-spark/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Spark Java Framework" +linkTitle: "Java (Spark)" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-java-spring/README.md b/docs/serving/samples/hello-world/helloworld-java-spring/README.md index 12e556917..557179618 100644 --- a/docs/serving/samples/hello-world/helloworld-java-spring/README.md +++ b/docs/serving/samples/hello-world/helloworld-java-spring/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Spring Boot Java" -linkTitle: "Java (Spring)" -weight: 1 -type: "docs" ---- - A simple web app written in Java using Spring Boot 2.0 that you can use for testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not specified, it will use "World" as the TARGET. diff --git a/docs/serving/samples/hello-world/helloworld-java-spring/index.md b/docs/serving/samples/hello-world/helloworld-java-spring/index.md new file mode 100644 index 000000000..718513d47 --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-java-spring/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Spring Boot Java" +linkTitle: "Java (Spring)" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-kotlin/README.md b/docs/serving/samples/hello-world/helloworld-kotlin/README.md index 053449bc6..1dbd44a03 100644 --- a/docs/serving/samples/hello-world/helloworld-kotlin/README.md +++ b/docs/serving/samples/hello-world/helloworld-kotlin/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Kotlin" -linkTitle: "Kotlin" -weight: 1 -type: "docs" ---- - A simple web app written in Kotlin using [Ktor](https://ktor.io/) that you can use for testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}". If TARGET is not specified, it will use "World" as the TARGET. diff --git a/docs/serving/samples/hello-world/helloworld-kotlin/index.md b/docs/serving/samples/hello-world/helloworld-kotlin/index.md new file mode 100644 index 000000000..1448a8282 --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-kotlin/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Kotlin" +linkTitle: "Kotlin" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-nodejs/README.md b/docs/serving/samples/hello-world/helloworld-nodejs/README.md index c09773d7e..1219fec19 100644 --- a/docs/serving/samples/hello-world/helloworld-nodejs/README.md +++ b/docs/serving/samples/hello-world/helloworld-nodejs/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Node.js" -linkTitle: "Node.js" -weight: 1 -type: "docs" ---- - A simple web app written in Node.js that you can use for testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not specified, it will use "World" as the TARGET. diff --git a/docs/serving/samples/hello-world/helloworld-nodejs/index.md b/docs/serving/samples/hello-world/helloworld-nodejs/index.md new file mode 100644 index 000000000..b4c0b8895 --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-nodejs/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Node.js" +linkTitle: "Node.js" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-php/README.md b/docs/serving/samples/hello-world/helloworld-php/README.md index 9e86476aa..4669aa2a7 100644 --- a/docs/serving/samples/hello-world/helloworld-php/README.md +++ b/docs/serving/samples/hello-world/helloworld-php/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - PHP" -linkTitle: "PHP" -weight: 1 -type: "docs" ---- - A simple web app written in PHP that you can use for testing. It reads in an env variable `TARGET` and prints `Hello ${TARGET}!`. If `TARGET` is not specified, it will use `World` as the `TARGET`. diff --git a/docs/serving/samples/hello-world/helloworld-php/index.md b/docs/serving/samples/hello-world/helloworld-php/index.md new file mode 100644 index 000000000..914b8f53e --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-php/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - PHP" +linkTitle: "PHP" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-python/README.md b/docs/serving/samples/hello-world/helloworld-python/README.md index ce425efab..04ee061ba 100644 --- a/docs/serving/samples/hello-world/helloworld-python/README.md +++ b/docs/serving/samples/hello-world/helloworld-python/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Python" -linkTitle: "Python" -weight: 1 -type: "docs" ---- - A simple web app written in Python that you can use for testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not specified, it will use "World" as the TARGET. diff --git a/docs/serving/samples/hello-world/helloworld-python/index.md b/docs/serving/samples/hello-world/helloworld-python/index.md new file mode 100644 index 000000000..0cda57ca5 --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-python/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Python" +linkTitle: "Python" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-ruby/README.md b/docs/serving/samples/hello-world/helloworld-ruby/README.md index cbaeca5ba..429aa5ba4 100644 --- a/docs/serving/samples/hello-world/helloworld-ruby/README.md +++ b/docs/serving/samples/hello-world/helloworld-ruby/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Ruby" -linkTitle: "Ruby" -weight: 1 -type: "docs" ---- - A simple web app written in Ruby that you can use for testing. It reads in an env variable `TARGET` and prints "Hello \${TARGET}!". If TARGET is not specified, it will use "World" as the TARGET. diff --git a/docs/serving/samples/hello-world/helloworld-ruby/index.md b/docs/serving/samples/hello-world/helloworld-ruby/index.md new file mode 100644 index 000000000..448738db5 --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-ruby/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Ruby" +linkTitle: "Ruby" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-scala/README.md b/docs/serving/samples/hello-world/helloworld-scala/README.md index 730d914d9..2cb0dc009 100644 --- a/docs/serving/samples/hello-world/helloworld-scala/README.md +++ b/docs/serving/samples/hello-world/helloworld-scala/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Scala using Akka HTTP" -linkTitle: "Scala" -weight: 1 -type: "docs" ---- - A microservice which demonstrates how to get set up and running with Knative Serving when using [Scala](https://scala-lang.org/) and [Akka](https://akka.io/) [HTTP](https://doc.akka.io/docs/akka-http/current/). It will respond to a HTTP diff --git a/docs/serving/samples/hello-world/helloworld-scala/index.md b/docs/serving/samples/hello-world/helloworld-scala/index.md new file mode 100644 index 000000000..3eea5159f --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-scala/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Scala using Akka HTTP" +linkTitle: "Scala" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/hello-world/helloworld-shell/README.md b/docs/serving/samples/hello-world/helloworld-shell/README.md index e9dbfc014..b45b33a53 100644 --- a/docs/serving/samples/hello-world/helloworld-shell/README.md +++ b/docs/serving/samples/hello-world/helloworld-shell/README.md @@ -1,10 +1,3 @@ ---- -title: "Hello World - Shell" -linkTitle: "Shell" -weight: 1 -type: "docs" ---- - A simple web app that executes a shell script. The shell script reads an env variable `TARGET` and prints `Hello ${TARGET}!`. If the `TARGET` environment variable is not specified, the script uses `World`. diff --git a/docs/serving/samples/hello-world/helloworld-shell/index.md b/docs/serving/samples/hello-world/helloworld-shell/index.md new file mode 100644 index 000000000..cc3bc0d79 --- /dev/null +++ b/docs/serving/samples/hello-world/helloworld-shell/index.md @@ -0,0 +1,8 @@ +--- +title: "Hello World - Shell" +linkTitle: "Shell" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/knative-routing-go/README.md b/docs/serving/samples/knative-routing-go/README.md index 4152ebbf6..dca09531e 100644 --- a/docs/serving/samples/knative-routing-go/README.md +++ b/docs/serving/samples/knative-routing-go/README.md @@ -1,10 +1,3 @@ ---- -title: "Routing across multiple Knative services - Go" -linkTitle: "Routing services - Go" -weight: 1 -type: "docs" ---- - This example shows how to map multiple Knative services to different paths under a single domain name using the Istio VirtualService concept. Istio is a general-purpose reverse proxy, therefore these directions can also be used to diff --git a/docs/serving/samples/knative-routing-go/index.md b/docs/serving/samples/knative-routing-go/index.md new file mode 100644 index 000000000..4ab7d2aa9 --- /dev/null +++ b/docs/serving/samples/knative-routing-go/index.md @@ -0,0 +1,8 @@ +--- +title: "Routing across multiple Knative services - Go" +linkTitle: "Routing services - Go" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/rest-api-go/README.md b/docs/serving/samples/rest-api-go/README.md index cc8481c5b..3405d55dd 100644 --- a/docs/serving/samples/rest-api-go/README.md +++ b/docs/serving/samples/rest-api-go/README.md @@ -1,10 +1,3 @@ ---- -title: "Creating a RESTful Service - Go" -linkTitle: "RESTful service - Go" -weight: 1 -type: "docs" ---- - This "stock ticker" sample demonstrates how to create and run a simple RESTful service on Knative Serving. The exposed endpoint outputs the stock price for a given "[stock symbol](https://www.marketwatch.com/tools/quotes/lookup.asp)", diff --git a/docs/serving/samples/rest-api-go/index.md b/docs/serving/samples/rest-api-go/index.md new file mode 100644 index 000000000..f9e69b79e --- /dev/null +++ b/docs/serving/samples/rest-api-go/index.md @@ -0,0 +1,8 @@ +--- +title: "Creating a RESTful Service - Go" +linkTitle: "RESTful service - Go" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/secrets-go/README.md b/docs/serving/samples/secrets-go/README.md index b64d1cb32..9a700c560 100644 --- a/docs/serving/samples/secrets-go/README.md +++ b/docs/serving/samples/secrets-go/README.md @@ -1,10 +1,3 @@ ---- -title: "Knative Secrets - Go" -linkTitle: "Secrets - Go" -weight: 1 -type: "docs" ---- - A simple web app written in Go that you can use for testing. It demonstrates how to use a Kubernetes secret as a Volume with Knative. We will create a new Google Service Account and place it into a Kubernetes secret, then we will mount it diff --git a/docs/serving/samples/secrets-go/index.md b/docs/serving/samples/secrets-go/index.md new file mode 100644 index 000000000..21c186b13 --- /dev/null +++ b/docs/serving/samples/secrets-go/index.md @@ -0,0 +1,8 @@ +--- +title: "Knative Secrets - Go" +linkTitle: "Secrets - Go" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/telemetry-go/README.md b/docs/serving/samples/telemetry-go/README.md index c73974814..63ab69838 100644 --- a/docs/serving/samples/telemetry-go/README.md +++ b/docs/serving/samples/telemetry-go/README.md @@ -1,10 +1,3 @@ ---- -title: "Observability: Monitoring, logging, and tracing sample - Go" -linkTitle: "Observability - Go" -weight: 1 -type: "docs" ---- - This sample runs a simple web server that makes calls to other in-cluster services and responds to requests with "Hello World!". The purpose of this sample is to show generating [metrics](../../accessing-metrics.md), diff --git a/docs/serving/samples/telemetry-go/index.md b/docs/serving/samples/telemetry-go/index.md new file mode 100644 index 000000000..fc43a4055 --- /dev/null +++ b/docs/serving/samples/telemetry-go/index.md @@ -0,0 +1,8 @@ +--- +title: "Observability: Monitoring, logging, and tracing sample - Go" +linkTitle: "Observability - Go" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/docs/serving/samples/traffic-splitting/README.md b/docs/serving/samples/traffic-splitting/README.md index e9fa78772..394436533 100644 --- a/docs/serving/samples/traffic-splitting/README.md +++ b/docs/serving/samples/traffic-splitting/README.md @@ -1,10 +1,3 @@ ---- -title: "Simple Traffic Splitting Between Revisions" -linkTitle: "Traffic splitting" -weight: 1 -type: "docs" ---- - This samples builds off of the [Creating a RESTful Service](../rest-api-go) sample to illustrate updating a Service to create a new Revision as well as splitting traffic between the two created Revisions. diff --git a/docs/serving/samples/traffic-splitting/index.md b/docs/serving/samples/traffic-splitting/index.md new file mode 100644 index 000000000..a3d7e7e7b --- /dev/null +++ b/docs/serving/samples/traffic-splitting/index.md @@ -0,0 +1,8 @@ +--- +title: "Simple Traffic Splitting Between Revisions" +linkTitle: "Traffic splitting" +weight: 1 +type: "docs" +--- + +{{% readfile file="README.md" %}} diff --git a/test/site/index_test.go b/test/site/index_test.go new file mode 100644 index 000000000..388d50e8d --- /dev/null +++ b/test/site/index_test.go @@ -0,0 +1,83 @@ +/* +Copyright 2020 The Knative Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package contains tests for the layout of the site. + +package site + +import ( + "fmt" + "os" + "path/filepath" + "testing" +) + +// TestHugoBundles ensures that all directories with a `README.md` file have +// an appropriate `_index.md` (if a "branch bundle") or `index.md` (if a +// "leaf bundle"). See https://gohugo.io/content-management/page-bundles for +// details on branch and leaf bundles. + +func TestHugoBundles(t *testing.T) { + // We walk the tree relative to the root, not the directory of the test. + // TODO(evankanderson): find a better way than hard-coding the directory depth. + err := os.Chdir(filepath.Join("..", "..")) + if err != nil { + t.Errorf("Unable to switch to top-level docs directory: %w", err) + } + + skipNames := []string{"hack", "test", "vendor"} + skipped := make([]os.FileInfo, len(skipNames)) + for i, s := range skipNames { + fi, err := os.Stat(s) + if err != nil { + t.Errorf("Unable to stat %q: %w", s, err) + } + skipped[i] = fi + } + + err = filepath.Walk(".", func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + for _, fi := range skipped { + if os.SameFile(info, fi) { + return filepath.SkipDir + } + } + if !info.IsDir() { + return nil + } + _, err = os.Stat(filepath.Join(path, "README.md")) + if os.IsNotExist(err) { + return nil + } + if err != nil { + return err // unable to open + } + bundleFiles := []string{"_index.md", "index.md", "index.html", "_index.html"} + for _, name := range bundleFiles { + _, err = os.Stat(filepath.Join(path, name)) + if err == nil { + return nil + } + } + return fmt.Errorf("README.md missing bundle (you need an 'index.md' or '_index.md') in %q", path) + }) + + if err != nil { + t.Errorf("Could not verify docs: %+v", err) + } +}