Skip to content

Commit

Permalink
Merge pull request #7591 from mikesplain/fix_mkdics
Browse files Browse the repository at this point in the history
Fix mkdocs
  • Loading branch information
k8s-ci-robot authored Sep 13, 2019
2 parents b20e355 + 7df8242 commit aa162e8
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 11 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -847,11 +847,13 @@ prow-postsubmit: bazel-version-dist

.PHONY: live-docs
live-docs:
@docker run --rm -it -p 3000:3000 -v ${PWD}:/docs aledbf/mkdocs:0.1
@docker build --pull -t kops/mkdocs images/mkdocs
@docker run --rm -it -p 3000:3000 -v ${PWD}:/docs kops/mkdocs

.PHONY: build-docs
build-docs:
@docker run --rm -it -v ${PWD}:/docs aledbf/mkdocs:0.1 build
@docker build --pull -t kops/mkdocs images/mkdocs
@docker run --rm -v ${PWD}:/docs kops/mkdocs build

# Update machine_types.go
.PHONY: update-machine-types
Expand Down
2 changes: 1 addition & 1 deletion docs/apireference/build/node_modules/jquery/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions images/mkdocs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright 2019 The Kubernetes 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.

FROM alpine:3.10

RUN apk update && apk add --no-cache \
bash \
git \
git-fast-import \
openssh \
python3 \
python3-dev \
curl \
&& python3 -m ensurepip \
&& rm -r /usr/lib/python*/ensurepip \
&& pip3 install --upgrade pip setuptools \
&& rm -r /root/.cache \
&& rm -rf /var/cache/apk/*

COPY requirements.txt /requirements.txt
RUN pip install -U -r /requirements.txt

WORKDIR /docs

EXPOSE 3000

COPY entrypoint.sh /

ENTRYPOINT ["/entrypoint.sh"]
28 changes: 28 additions & 0 deletions images/mkdocs/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Copyright 2019 The Kubernetes 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.

set -o errexit
set -o pipefail

CMD=$1

if [ "$CMD" == "build" ];
then
mkdocs build
exit 0;
fi

mkdocs serve --dev-addr=0.0.0.0:3000 --livereload
5 changes: 5 additions & 0 deletions images/mkdocs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mkdocs-material~=4.4.0
mkdocs~=1.0.4
# mkdocs-awesome-pages-plugin~=1.2.0
pymdown-extensions~=6.1
pygments~=2.3.1
7 changes: 4 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ markdown_extensions:
- admonition
- codehilite
- pymdownx.inlinehilite
- pymdownx.tasklist(custom_checkbox=true)
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.superfences
- toc:
permalink: true
theme:
Expand All @@ -20,7 +22,6 @@ theme:
accent: 'green'
plugins:
- search
- awesome-pages:
collapse_single_pages: true

extra_css: [extra.css]
#google_analytics: ['UA-XXXXXXX-X', 'kubernetes.github.io']
5 changes: 0 additions & 5 deletions requirements-docs.txt

This file was deleted.

0 comments on commit aa162e8

Please sign in to comment.