mirror of https://github.com/knative/docs.git
Removes `_index.md` (#4205)
* Removes `_index.md` * Reverts `hack/build.sh` changes and removes `index_test.go`
This commit is contained in:
parent
690469e264
commit
a43ebe205a
|
@ -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
|
||||
|
|
|
@ -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)
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue