mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-05 09:06:58 +02:00
mkdocs on root level
This commit is contained in:
parent
a69bb161a9
commit
233c46e83e
5
.github/workflows/docs.yaml
vendored
5
.github/workflows/docs.yaml
vendored
@ -32,11 +32,6 @@ jobs:
|
||||
- run: |
|
||||
pip install -r docs/scripts/requirements.txt
|
||||
|
||||
- name: setup
|
||||
run: |
|
||||
./docs/scripts/copy_docs.sh
|
||||
go run ./docs/scripts/docs.go
|
||||
|
||||
- name: Configure Git user
|
||||
run: |
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
cp CONTRIBUTING.md code-of-conduct.md ./docs/
|
||||
|
||||
cp LICENSE ./docs/LICENSE.md
|
||||
|
||||
cp README.md ./docs/index.md
|
||||
|
||||
sed -i -e 's#docs/##g' ./docs/index.md
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 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.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func removeLinkPrefixInIndex() {
|
||||
content, err := os.ReadFile("./docs/index.md")
|
||||
if err != nil {
|
||||
log.Fatalf("Could not read index.md file. Make sure to run copy_docs.sh script first. Original error: %s", err)
|
||||
}
|
||||
|
||||
updatedContent := strings.ReplaceAll(string(content), "](./docs/", "](")
|
||||
updatedContent = strings.ReplaceAll(updatedContent, "](docs/", "](")
|
||||
updatedContent = strings.ReplaceAll(updatedContent, "docs/img/external-dns.png", "img/external-dns.png")
|
||||
|
||||
f, err := os.OpenFile("./docs/index.md", os.O_RDWR, 0o644)
|
||||
if err != nil {
|
||||
log.Fatalf("Could not open index.md file to update content. Original error: %s", err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
if _, err := f.WriteString(updatedContent); err != nil {
|
||||
log.Fatalf("Failed writing links update to index.md. Original error: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
removeLinkPrefixInIndex()
|
||||
}
|
@ -2,4 +2,5 @@ mkdocs-git-revision-date-localized-plugin == 1.2.4
|
||||
mkdocs == 1.5.3
|
||||
mkdocs-material == 9.5.17
|
||||
mkdocs-literate-nav == 0.6.1
|
||||
mkdocs-same-dir == 0.1.3
|
||||
mike == 2.0.0
|
||||
|
42
mkdocs.yml
42
mkdocs.yml
@ -1,38 +1,41 @@
|
||||
site_name: external-dns
|
||||
site_author: external-dns maintainers
|
||||
|
||||
repo_name: kubernetes-sigs/external-dns
|
||||
repo_url: https://github.com/kubernetes-sigs/external-dns/
|
||||
|
||||
trademark: https://www.linuxfoundation.org/legal/trademark-usage
|
||||
|
||||
docs_dir: .
|
||||
|
||||
nav:
|
||||
- index.md
|
||||
- README.md
|
||||
- Chart:
|
||||
- About: charts/external-dns/README.md
|
||||
- Changelog: charts/external-dns/CHANGELOG.md
|
||||
- About:
|
||||
- FAQ: faq.md
|
||||
- Out of Incubator: 20190708-external-dns-incubator.md
|
||||
- FAQ: docs/faq.md
|
||||
- Out of Incubator: docs/20190708-external-dns-incubator.md
|
||||
- Code of Conduct: code-of-conduct.md
|
||||
- License: LICENSE.md
|
||||
- Tutorials: tutorials/
|
||||
- Tutorials: docs/tutorials/*
|
||||
- Annotations:
|
||||
- About: annotations/annotations.md
|
||||
- About: docs/annotations/annotations.md
|
||||
- Sources:
|
||||
- About: sources/sources.md
|
||||
- Gateway: sources/gateway.md
|
||||
- Ingress: sources/ingress.md
|
||||
- Service: sources/service.md
|
||||
- About: docs/sources/sources.md
|
||||
- Gateway: docs/sources/gateway.md
|
||||
- Ingress: docs/sources/ingress.md
|
||||
- Service: docs/sources/service.md
|
||||
- Registries:
|
||||
- About: registry/registry.md
|
||||
- TXT: registry/txt.md
|
||||
- DynamoDB: registry/dynamodb.md
|
||||
- About: docs/registry/registry.md
|
||||
- TXT: docs/registry/txt.md
|
||||
- DynamoDB: docs/registry/dynamodb.md
|
||||
- Advanced Topics:
|
||||
- Initial Design: initial-design.md
|
||||
- TTL: ttl.md
|
||||
- MultiTarget: proposal/multi-target.md
|
||||
- Initial Design: docs/initial-design.md
|
||||
- TTL: docs/ttl.md
|
||||
- MultiTarget: docs/proposal/multi-target.md
|
||||
- Contributing:
|
||||
- Kubernetes Contributions: CONTRIBUTING.md
|
||||
- Release: release.md
|
||||
- contributing/*
|
||||
- Release: docs/release.md
|
||||
- docs/contributing/*
|
||||
|
||||
theme:
|
||||
name: material
|
||||
@ -94,6 +97,7 @@ markdown_extensions:
|
||||
custom_checkbox: true
|
||||
|
||||
plugins:
|
||||
- same-dir
|
||||
- search
|
||||
- literate-nav
|
||||
- git-revision-date-localized:
|
||||
|
Loading…
Reference in New Issue
Block a user