diff --git a/_index.html b/_index.html new file mode 100644 index 0000000000..dac1b6fcf0 --- /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 16c7af06c9..d4c1960db7 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 0000000000..8704c38ed8 --- /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 a71a2f5860..a1a80a3fba 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 0000000000..c576dfc691 --- /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 d134d3d89a..8a1ac729a4 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 0000000000..8ccc08c90e --- /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 df9d95f7fb..a191fb7ace 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 0000000000..fadaab7af6 --- /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 bc4b883331..0eba47edc8 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 0000000000..f96be3be29 --- /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 05a83a31d3..d73fa85b1f 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 0000000000..32b6e63cd0 --- /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 1a89728d8f..d2b07d25e4 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 0000000000..2f9ec732a3 --- /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 688bd71ace..e426349def 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 0000000000..7bc817a1fe --- /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 4c87f2a371..7bd5fbd42c 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 0000000000..51004ef043 --- /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 0dd7ed040b..78327ebcce 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 0000000000..3f29b4cc4f --- /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 5ea4b7c1dc..af5a8516ac 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 0000000000..ba903a8859 --- /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 afe70544fc..cadcbc9fe7 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 0000000000..a4affb750d --- /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 6c867e0ab7..183a24f9a1 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 0000000000..e7ad738154 --- /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 a10589c8ce..af8d1184c6 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 0000000000..ee1e82f3c9 --- /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 a9f9b4fa3c..964e2730e9 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 0000000000..6c4d9947e9 --- /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 756c1c120d..d016cf9d7c 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 0000000000..044b26d85e --- /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 c95f5e5f4b..471c3d56c6 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 0000000000..d0806a4667 --- /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 cf0096ea6c..4adfe737d2 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 0000000000..5d44a69ef9 --- /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 f69c977e13..15a524b5a5 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 0000000000..5e6dbe4c8f --- /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 1999dfde77..9377e0734f 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 0000000000..45f91706f7 --- /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 874bf0f910..46a14edccd 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 0000000000..532c401e7a --- /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 6e5b470b8f..da365c3208 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 0000000000..2526220278 --- /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 e57985f6f6..a9ed89c457 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 0000000000..1730a67f10 --- /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 6ed2c224c1..7553229af8 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 0000000000..dc2f1683de --- /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 c9f81049d3..585eac47fc 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`. diff --git a/docs/eventing/samples/kafka/source/index.md b/docs/eventing/samples/kafka/source/index.md new file mode 100644 index 0000000000..b5b8a88884 --- /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 07952ed91c..6071f42dbd 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 0000000000..2aadfa039a --- /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 fbdada2576..4ecd98b113 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 0000000000..c5d64f2e06 --- /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 5d45e3435d..7cc043b031 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 0000000000..0de60ff978 --- /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 24ec54ada7..742878ce5d 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 0000000000..7d5164e034 --- /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 94e2e8621a..64359bfa17 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 0000000000..e2e106925d --- /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 f62d545156..d6c88bbd2f 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 0000000000..5af313c798 --- /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 5788b2a351..f86a5cd724 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 0000000000..28d9e57ff8 --- /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 b507b42bb2..1c4c0f6672 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 3de863f7a6..2f4aca11e8 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 0000000000..b2231f3f89 --- /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 8fb3f47b1c..b31f094e73 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 0000000000..e47c47680a --- /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 c8d8fbc741..40976996f2 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 0000000000..7e92a14d53 --- /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 03779fce5c..871c47bff8 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 0000000000..625512ea0c --- /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 32dfe08b54..a05e76b340 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 0000000000..e8900fbfc0 --- /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 6ea5392ab1..49560586dc 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 0000000000..343e572ddd --- /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 74c9cf99ea..f9f4cb71aa 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 0000000000..64864f3407 --- /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 f65bbe7206..965fda2eb5 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 0000000000..6032382fb0 --- /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 12e5569177..5571796188 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 0000000000..718513d479 --- /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 053449bc60..1dbd44a033 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 0000000000..1448a82827 --- /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 c09773d7e0..1219fec19b 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 0000000000..b4c0b88956 --- /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 9e86476aac..4669aa2a78 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 0000000000..914b8f53ef --- /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 ce425efab8..04ee061ba1 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 0000000000..0cda57ca58 --- /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 cbaeca5bab..429aa5ba42 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 0000000000..448738db59 --- /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 730d914d97..2cb0dc0095 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 0000000000..3eea5159fa --- /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 e9dbfc0142..b45b33a53c 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 0000000000..cc3bc0d795 --- /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 4152ebbf60..dca09531ea 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 0000000000..4ab7d2aa92 --- /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 cc8481c5bd..3405d55dd7 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 0000000000..f9e69b79ed --- /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 b64d1cb323..9a700c5606 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 0000000000..21c186b13f --- /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 c739748143..63ab69838b 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 0000000000..fc43a40557 --- /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 e9fa787723..394436533b 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 0000000000..a3d7e7e7bd --- /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 0000000000..388d50e8d9 --- /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) + } +}