Skip to content

Commit d2a1a5e

Browse files
committed
Add initial scaffolding for netlify site build.
Signed-off-by: James Blair <[email protected]>
1 parent 97335ed commit d2a1a5e

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
venv/
2+
/site

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2019 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Build the documentation.
16+
.PHONY: docs
17+
docs:
18+
# Ensure site dir exists
19+
mkdir -p site
20+
21+
# Generate docs with mkdocs
22+
mkdocs build

netlify.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Netlify build instructions
2+
[build]
3+
command = "make docs"
4+
publish = "site"
5+
environment = { PYTHON_VERSION = "3.8" }
6+
7+
# Standard Netlify redirects
8+
[[redirects]]
9+
from = "https://main--kubernetes-sigs-multicluster.netlify.com/*"
10+
to = "https://main.multicluster.sigs.k8s.io/:splat"
11+
status = 301
12+
force = true
13+
14+
# HTTP-to-HTTPS rules
15+
[[redirects]]
16+
from = "http://main.multicluster.sigs.k8s.io/*"
17+
to = "https://main.multicluster.sigs.k8s.io/:splat"
18+
status = 301
19+
force = true
20+
21+
[[redirects]]
22+
from = "http://main--kubernetes-sigs-multicluster.netlify.com/*"
23+
to = "http://main.multicluster.sigs.k8s.io/:splat"
24+
status = 301
25+
force = true

0 commit comments

Comments
 (0)