From a43ebe205ae53c0a903cdc24fb25c661f1df1713 Mon Sep 17 00:00:00 2001 From: Jeff <60796676+JeffNeff@users.noreply.github.com> Date: Mon, 18 Oct 2021 03:08:27 -0700 Subject: [PATCH] Removes `_index.md` (#4205) * Removes `_index.md` * Reverts `hack/build.sh` changes and removes `index_test.go` --- config/redirects.yml | 2 +- docs/_index.md | 50 ------------------------ mkdocs.yml | 1 - test/site/index_test.go | 85 ----------------------------------------- 4 files changed, 1 insertion(+), 137 deletions(-) delete mode 100755 docs/_index.md delete mode 100644 test/site/index_test.go diff --git a/config/redirects.yml b/config/redirects.yml index 13f72b554..a16fa4d73 100644 --- a/config/redirects.yml +++ b/config/redirects.yml @@ -27,7 +27,7 @@ plugins: admin/install/install-eventing-with-yaml.md: admin/install/eventing/install-eventing-with-yaml.md admin/install/install-serving-with-yaml.md: admin/install/serving/install-serving-with-yaml.md client/connecting-kn-to-your-cluster/index.md: client/README.md - concepts/overview.md: _index.md + concepts/overview.md: index.md eventing/broker/alternate/index.md: eventing/broker/README.md eventing/broker/broker-event-delivery.md: developer/eventing/event-delivery.md eventing/broker/configmaps/README.md: admin/eventing/broker-configuration.md diff --git a/docs/_index.md b/docs/_index.md deleted file mode 100755 index 4d9ac2217..000000000 --- a/docs/_index.md +++ /dev/null @@ -1,50 +0,0 @@ -# Welcome to Knative - -The Knative project provides a set of [Kubernetes](https://kubernetes.io) components that introduce event-driven and serverless capabilities for Kubernetes clusters. - -Knative APIs build on existing Kubernetes APIs, so that Knative resources are compatible with other Kubernetes-native resources, and can be managed by cluster administrators using existing Kubernetes tools. - -Common languages and frameworks that include Kubernetes-friendly tooling work smoothly with Knative to reduce the time spent solving common deployment issues, such as: - -- [Routing and managing traffic with blue/green deployment](developer/serving/traffic-management.md#routing-and-managing-traffic-with-blue-green-deployment) -- [Scaling automatically and sizing workloads based on demand](serving/autoscaling/README.md) -- [Binding running services to eventing ecosystems](eventing/getting-started.md) - -There are two core Knative components that can be installed and used together or independently to provide different functions: - -* [Knative Serving](serving/README.md): Easily manage stateless services on Kubernetes by reducing the developer effort required for autoscaling, networking, and rollouts. - -* [Knative Eventing](eventing/README.md): Easily route events between on-cluster and off-cluster components by exposing event routing as configuration rather than embedded in code. - -These components are delivered as Kubernetes custom resource definitions (CRDs), which can be configured by a cluster administrator to provide default settings for developer-created applications and event workflow components. - -**Note**: Earlier versions of Knative included a build component. That component has since evolved into the separate [Tekton Pipelines](https://tekton.dev/) project. - -### Getting started - -- [Installing Knative](admin/install/README.md) -- [Getting started with serving](serving/README.md) -- [Getting started with eventing](eventing/README.md) - -### Configuration and networking - -- [Using a custom domain](serving/using-a-custom-domain.md) -- [Configuring HTTPS with a custom certificate](serving/using-a-tls-cert.md) -- [Configuring high availability](serving/config-ha.md) - -### Samples and demos - -- [Autoscaling](serving/autoscaling/autoscale-go/README.md) -- [REST API sample](serving/samples/rest-api-go/README.md) -- [All samples for serving](serving/samples/README.md) -- [All samples for eventing](eventing/samples/README.md) - -### Observability - -- [Serving Metrics](admin/collecting-metrics/serving-metrics/metrics.md) -- [Eventing Metrics](admin/collecting-metrics/eventing-metrics/metrics.md) -- [Collecting metrics](admin/collecting-metrics/README.md) - -### Debugging - -- [Debugging application issues](developer/serving/troubleshooting/debugging-application-issues.md) diff --git a/mkdocs.yml b/mkdocs.yml index 2992b6a2f..566479616 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -58,7 +58,6 @@ plugins: # (either the include shortcode or not-converted-yet tabs). - snippets/* - smoketest.md - - "*/_index.md" # pretty much all shortcodes awesome-pages: filename: ".index" collapse_single_pages: true diff --git a/test/site/index_test.go b/test/site/index_test.go deleted file mode 100644 index fcbf723ae..000000000 --- a/test/site/index_test.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -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) { - t.Skip("Mkdocs mode - _index.md not needed!") - - // 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", "third_party"} - 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) - } -}