Skip to content

Commit fe2b1d4

Browse files
committed
Initial docs infra
1 parent 46cfbf0 commit fe2b1d4

File tree

7 files changed

+200
-0
lines changed

7 files changed

+200
-0
lines changed

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
bin/*
8+
Dockerfile.cross
9+
# Test binary, built with `go test -c`
10+
*.test
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
# Go workspace file
14+
go.work
15+
go.work.sum
16+
# Kubernetes Generated files - skip generated files, except for vendored files
17+
!vendor/**/zz_generated.*
18+
# editor and IDE paraphernalia
19+
.idea
20+
.vscode
21+
*.swp
22+
*.swo
23+
*~
24+
25+
# generated docs
26+
site

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
##@Docs
3+
4+
.PHONY: build-docs
5+
build-docs:
6+
docker build --pull -t kube-agentic-net/mkdocs hack/mkdocs/image
7+
docker run --rm -v ${PWD}:/docs kube-agentic-net/mkdocs build
8+
9+
.PHONY: build-docs-netlify
10+
build-docs-netlify:
11+
pip install -r hack/mkdocs/image/requirements.txt
12+
mkdocs build
13+
14+
.PHONY: live-docs
15+
live-docs:
16+
docker build -t kube-agentic-net/mkdocs hack/mkdocs/image
17+
docker run --rm -it -p 3000:3000 -v ${PWD}:/docs kube-agentic-net/mkdocs

hack/mkdocs/image/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
FROM python:3.13-alpine
16+
17+
COPY requirements.txt /requirements.txt
18+
RUN pip install -r /requirements.txt
19+
20+
WORKDIR /docs
21+
22+
EXPOSE 3000
23+
24+
COPY entrypoint.sh /
25+
26+
ENTRYPOINT ["/entrypoint.sh"]

hack/mkdocs/image/entrypoint.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
# Copyright 2019 The Kubernetes Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -o errexit
18+
set -o pipefail
19+
20+
CMD=$1
21+
22+
if [ "$CMD" == "build" ];
23+
then
24+
mkdocs build
25+
exit 0;
26+
fi
27+
28+
mkdocs serve --dev-addr=0.0.0.0:3000 --livereload#!/bin/bash

hack/mkdocs/image/requirements.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# required for mkdocs-core
2+
jinja2~=3.0
3+
# mkdocs 2.4.1 requires Markdown < 3.4.0
4+
# https://github.com/kubernetes-sigs/gateway-api/pull/1671#issuecomment-1400586465
5+
markdown~=3.7
6+
mkdocs~=1.6
7+
mkdocs-material-extensions~=1.3
8+
pygments~=2.16
9+
pymdown-extensions~=10.2
10+
11+
# Requirements for plugins
12+
babel~=2.10
13+
colorama~=0.4
14+
paginate~=0.5
15+
regex>=2022.4
16+
requests~=2.26
17+
18+
# mkdocs + mkdocs plugins
19+
mkdocs==1.6.1
20+
mkdocs-awesome-pages-plugin==2.9.3
21+
mkdocs-macros-plugin==1.2.0
22+
mkdocs-material==9.5.36
23+
mkdocs-material-extensions==1.3.1
24+
mkdocs-redirects==1.2.1
25+
mkdocs-mermaid2-plugin==1.1.1

mkdocs.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
site_name: Kubernetes Gateway API Inference Extension
2+
repo_url: https://github.com/kubernetes-sigs/gateway-api-inference-extension
3+
repo_name: kubernetes-sigs/gateway-api-inference-extension
4+
site_dir: site
5+
docs_dir: site-src
6+
extra_css:
7+
- stylesheets/extra.css
8+
theme:
9+
name: material
10+
icon:
11+
repo: fontawesome/brands/git-alt
12+
logo: images/logo/logo-text-large-horizontal-white.png
13+
favicon: images/k8s-favicon.png
14+
features:
15+
- search.highlight
16+
- navigation.tabs
17+
- navigation.top
18+
- navigation.expand
19+
palette:
20+
primary: custom
21+
custom_dir: site-src/overrides
22+
edit_uri: edit/main/site-src/
23+
plugins:
24+
- search
25+
- awesome-pages
26+
- macros:
27+
include_dir: examples
28+
j2_line_comment_prefix: "#$"
29+
- mermaid2
30+
markdown_extensions:
31+
- admonition
32+
- meta
33+
- pymdownx.emoji:
34+
emoji_index: !!python/name:material.extensions.emoji.twemoji
35+
emoji_generator: !!python/name:materialx.emoji.to_svg
36+
- pymdownx.details
37+
- pymdownx.highlight
38+
- pymdownx.inlinehilite
39+
- pymdownx.superfences:
40+
custom_fences:
41+
- name: mermaid
42+
class: mermaid
43+
format: !!python/name:pymdownx.superfences.fence_code_format
44+
- pymdownx.snippets
45+
- toc:
46+
permalink: true
47+
- tables
48+
nav:
49+
- Overview:
50+
- Introduction: index.md
51+
- Concepts:
52+
API Overview: concepts/api-overview.md
53+
Conformance: concepts/conformance.md
54+
Roles and Personas: concepts/roles-and-personas.md
55+
Use Cases: concepts/use-cases.md
56+
- Implementations: implementations.md
57+
- FAQ: faq.md
58+
- Glossary: concepts/glossary.md
59+
- Guides:
60+
- User Guides:
61+
- Getting started: guides/index.md
62+
- Implementer's Guide: guides/implementers.md
63+
- Reference:
64+
- API Types:
65+
- InferencePool: api-types/inferencepool.md
66+
- InferenceModel: api-types/inferencemodel.md
67+
- API specification: reference/spec.md
68+
- Enhancements:
69+
- Overview: gieps/overview.md
70+
- Contributing:
71+
- How to Get Involved: contributing/index.md
72+
- Developer Guide: contributing/devguide.md

netlify.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# netlify configuration
2+
[build]
3+
publish = "site"
4+
command = "make build-docs-netlify"
5+
# available here https://github.com/netlify/build-image/blob/focal/included_software.md#languages
6+
environment = { PYTHON_VERSION = "3.8" }

0 commit comments

Comments
 (0)