mirror of https://github.com/knative/docs.git
Upgrade material-mkdocs to major version 8 (#4705)
* update from mkdocs 7.3.1 to 8.1.10 Signed-off-by: Carlos Santana <csantana23@gmail.com> * add GIT_SLUG to make easier to test with user forks Signed-off-by: Carlos Santana <csantana23@gmail.com> * fix warning banner Signed-off-by: Carlos Santana <csantana23@gmail.com>
This commit is contained in:
parent
7d94819226
commit
a64978b55d
|
|
@ -32,7 +32,8 @@ markdown_extensions:
|
||||||
- attr_list
|
- attr_list
|
||||||
- meta
|
- meta
|
||||||
- pymdownx.superfences
|
- pymdownx.superfences
|
||||||
- pymdownx.tabbed
|
- pymdownx.tabbed:
|
||||||
|
alternate_style: true
|
||||||
- pymdownx.details
|
- pymdownx.details
|
||||||
- pymdownx.snippets:
|
- pymdownx.snippets:
|
||||||
base_path: docs/snippets
|
base_path: docs/snippets
|
||||||
|
|
|
||||||
|
|
@ -65,20 +65,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* bit of a hack to stop the banner taking space when empty */
|
/* bit of a hack to stop the banner taking space when empty */
|
||||||
.md-announce .md-announce__inner {
|
.md-banner .md-banner__inner {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.md-announce {
|
.md-banner {
|
||||||
background: #fff5b5;
|
background: #fff5b5;
|
||||||
}
|
}
|
||||||
.md-announce .versionwarning h1 {
|
.md-banner .versionwarning h1 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.md-announce .versionwarning p {
|
.md-banner .versionwarning p {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
.md-announce a {
|
.md-banner a {
|
||||||
color: blue;
|
color: blue;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ RELEASE_BRANCHES=("knative-v1.2.0" "knative-v1.1.0" "knative-v1.0.0" "v0.26.0")
|
||||||
DOCS_BRANCHES=("release-${VERSIONS[0]}" "release-${VERSIONS[1]}" "release-${VERSIONS[2]}" "release-${VERSIONS[3]}")
|
DOCS_BRANCHES=("release-${VERSIONS[0]}" "release-${VERSIONS[1]}" "release-${VERSIONS[2]}" "release-${VERSIONS[3]}")
|
||||||
latest=${VERSIONS[0]}
|
latest=${VERSIONS[0]}
|
||||||
previous=("${VERSIONS[@]:1}")
|
previous=("${VERSIONS[@]:1}")
|
||||||
|
GIT_SLUG="knative/docs"
|
||||||
|
|
||||||
readonly TEMP="$(mktemp -d)"
|
readonly TEMP="$(mktemp -d)"
|
||||||
readonly SITE=$PWD/site
|
readonly SITE=$PWD/site
|
||||||
|
|
@ -37,7 +38,7 @@ else
|
||||||
pushd "$TEMP/docs-main"; mkdocs build -f mkdocs.yml -d $SITE/development; popd
|
pushd "$TEMP/docs-main"; mkdocs build -f mkdocs.yml -d $SITE/development; popd
|
||||||
|
|
||||||
# Latest release branch to /docs
|
# Latest release branch to /docs
|
||||||
git clone --depth 1 -b ${DOCS_BRANCHES[0]} https://github.com/knative/docs "$TEMP/docs-$latest"
|
git clone --depth 1 -b ${DOCS_BRANCHES[0]} https://github.com/${GIT_SLUG} "$TEMP/docs-$latest"
|
||||||
curl -f -L --show-error https://raw.githubusercontent.com/knative/serving/${RELEASE_BRANCHES[0]}/docs/serving-api.md -s > "$TEMP/docs-$latest/docs/reference/api/serving-api.md"
|
curl -f -L --show-error https://raw.githubusercontent.com/knative/serving/${RELEASE_BRANCHES[0]}/docs/serving-api.md -s > "$TEMP/docs-$latest/docs/reference/api/serving-api.md"
|
||||||
curl -f -L --show-error https://raw.githubusercontent.com/knative/eventing/${RELEASE_BRANCHES[0]}/docs/eventing-api.md -s > "$TEMP/docs-$latest/docs/reference/api/eventing-api.md"
|
curl -f -L --show-error https://raw.githubusercontent.com/knative/eventing/${RELEASE_BRANCHES[0]}/docs/eventing-api.md -s > "$TEMP/docs-$latest/docs/reference/api/eventing-api.md"
|
||||||
pushd "$TEMP/docs-$latest"; KNATIVE_VERSION=${RELEASE_BRANCHES[0]} SAMPLES_BRANCH="${DOCS_BRANCHES[0]}" mkdocs build -d $SITE/docs; popd
|
pushd "$TEMP/docs-$latest"; KNATIVE_VERSION=${RELEASE_BRANCHES[0]} SAMPLES_BRANCH="${DOCS_BRANCHES[0]}" mkdocs build -d $SITE/docs; popd
|
||||||
|
|
@ -49,7 +50,7 @@ else
|
||||||
versionjson+="{\"version\": \"v$version-docs\", \"title\": \"v$version\", \"aliases\": [\"\"]},"
|
versionjson+="{\"version\": \"v$version-docs\", \"title\": \"v$version\", \"aliases\": [\"\"]},"
|
||||||
|
|
||||||
echo "Building for previous version $version"
|
echo "Building for previous version $version"
|
||||||
git clone --depth 1 -b ${DOCS_BRANCHES[$i+1]} https://github.com/knative/docs "$TEMP/docs-$version"
|
git clone --depth 1 -b ${DOCS_BRANCHES[$i+1]} https://github.com/${GIT_SLUG} "$TEMP/docs-$version"
|
||||||
curl -f -L --show-error https://raw.githubusercontent.com/knative/serving/${RELEASE_BRANCHES[i+1]}/docs/serving-api.md -s > "$TEMP/docs-$version/docs/reference/api/serving-api.md"
|
curl -f -L --show-error https://raw.githubusercontent.com/knative/serving/${RELEASE_BRANCHES[i+1]}/docs/serving-api.md -s > "$TEMP/docs-$version/docs/reference/api/serving-api.md"
|
||||||
curl -f -L --show-error https://raw.githubusercontent.com/knative/eventing/${RELEASE_BRANCHES[i+1]}/docs/eventing-api.md -s > "$TEMP/docs-$version/docs/reference/api/eventing-api.md"
|
curl -f -L --show-error https://raw.githubusercontent.com/knative/eventing/${RELEASE_BRANCHES[i+1]}/docs/eventing-api.md -s > "$TEMP/docs-$version/docs/reference/api/eventing-api.md"
|
||||||
pushd "$TEMP/docs-$version"; KNATIVE_VERSION=${RELEASE_BRANCHES[i+1]//knative-} SAMPLES_BRANCH="${DOCS_BRANCHES[i+1]}" VERSION_WARNING=true mkdocs build -d "$SITE/v$version-docs"; popd
|
pushd "$TEMP/docs-$version"; KNATIVE_VERSION=${RELEASE_BRANCHES[i+1]//knative-} SAMPLES_BRANCH="${DOCS_BRANCHES[i+1]}" VERSION_WARNING=true mkdocs build -d "$SITE/v$version-docs"; popd
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ markdown_extensions:
|
||||||
- attr_list
|
- attr_list
|
||||||
- meta
|
- meta
|
||||||
- pymdownx.superfences
|
- pymdownx.superfences
|
||||||
- pymdownx.tabbed
|
- pymdownx.tabbed:
|
||||||
|
alternate_style: true
|
||||||
- pymdownx.details
|
- pymdownx.details
|
||||||
- pymdownx.snippets:
|
- pymdownx.snippets:
|
||||||
base_path: docs/snippets
|
base_path: docs/snippets
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
mkdocs-material==7.3.1
|
mkdocs-material==8.1.10
|
||||||
mkdocs-exclude>=1.0
|
mkdocs-exclude>=1.0
|
||||||
mkdocs-macros-plugin>=0.5.12
|
mkdocs-macros-plugin>=0.5.12
|
||||||
mkdocs-awesome-pages-plugin>=2.5
|
mkdocs-awesome-pages-plugin>=2.5
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue