mirror of https://github.com/istio/istio.io.git
Fixes for the archive site.
This commit is contained in:
parent
099a91ebdd
commit
d5013d3cd3
3
Makefile
3
Makefile
|
@ -41,8 +41,7 @@ netlify: install
|
|||
@scripts/build_site.sh
|
||||
@scripts/gen_site.sh "$(baseurl)"
|
||||
|
||||
netlify_archive: install
|
||||
@scripts/build_site.sh
|
||||
netlify_archive:
|
||||
@scripts/gen_archive_site.sh "$(baseurl)"
|
||||
|
||||
include Makefile.common.mk
|
||||
|
|
|
@ -25,32 +25,34 @@
|
|||
</div>
|
||||
|
||||
<div id="header-links">
|
||||
{{ with (.Site.GetPage "section" "docs") }}
|
||||
{{ if eq $section "docs" }}
|
||||
<span title="{{ .Description }}">{{ .LinkTitle }}</span>
|
||||
{{ else }}
|
||||
<a title="{{ .Description }}" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ if not .Site.Data.args.archive_landing }}
|
||||
{{ with (.Site.GetPage "section" "docs") }}
|
||||
{{ if eq $section "docs" }}
|
||||
<span title="{{ .Description }}">{{ .LinkTitle }}</span>
|
||||
{{ else }}
|
||||
<a title="{{ .Description }}" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with $latest_post }}
|
||||
{{ if eq $section "blog" }}
|
||||
<span title="{{ $blog_home.Description }}">{{ $blog_home.LinkTitle }}</span>
|
||||
{{ else }}
|
||||
<a title="{{ $blog_home.Description }}" href="{{ .Permalink }}">{{ $blog_home.LinkTitle }}</a>
|
||||
{{ with $latest_post }}
|
||||
{{ if eq $section "blog" }}
|
||||
<span title="{{ $blog_home.Description }}">{{ $blog_home.LinkTitle }}</span>
|
||||
{{ else }}
|
||||
<a title="{{ $blog_home.Description }}" href="{{ .Permalink }}">{{ $blog_home.LinkTitle }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with (.Site.GetPage "section" "faq") }}
|
||||
{{ if eq $section "faq" }}
|
||||
<span title="{{ .Description }}">{{ .LinkTitle }}</span>
|
||||
{{ else }}
|
||||
<a title="{{ .Description }}" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ with (.Site.GetPage "section" "faq") }}
|
||||
{{ if eq $section "faq" }}
|
||||
<span title="{{ .Description }}">{{ .LinkTitle }}</span>
|
||||
{{ else }}
|
||||
<a title="{{ .Description }}" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with (.Site.GetPage "section" "about") }}
|
||||
{{ if eq $section "about" }}
|
||||
<span title="{{ .Description }}">{{ .LinkTitle }}</span>
|
||||
{{ else }}
|
||||
<a title="{{ .Description }}" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ with (.Site.GetPage "section" "about") }}
|
||||
{{ if eq $section "about" }}
|
||||
<span title="{{ .Description }}">{{ .LinkTitle }}</span>
|
||||
{{ else }}
|
||||
<a title="{{ .Description }}" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -20,6 +20,10 @@ TOBUILD_JEKYLL=(
|
|||
v0.1:release-0.1
|
||||
)
|
||||
|
||||
# Prereqs
|
||||
npm install -g sass sass-lint typescript tslint @babel/cli @babel/core svgstore-cli html-minifier
|
||||
npm install babel-preset-minify --save-dev
|
||||
|
||||
# Prepare
|
||||
TMP=$(mktemp -d)
|
||||
mkdir ${TMP}/archive
|
||||
|
@ -29,23 +33,20 @@ rm -fr ${GITDIR}
|
|||
git clone https://github.com/istio/istio.io.git
|
||||
cd ${GITDIR}
|
||||
|
||||
# Grab the latest version info
|
||||
cp data/versions.yml ${TMP}
|
||||
|
||||
for rel in "${TOBUILD[@]}"
|
||||
do
|
||||
NAME=$(echo $rel | cut -d : -f 1)
|
||||
TAG=$(echo $rel | cut -d : -f 2)
|
||||
BASEURL=$(echo /$NAME)
|
||||
echo "### Building '$NAME' from $TAG for $BASEURL"
|
||||
git clean -f
|
||||
git checkout ${TAG}
|
||||
cp ${TMP}/versions.yml data
|
||||
|
||||
scripts/gen_site.sh ${BASEURL}
|
||||
|
||||
mv public ${TMP}/archive/${NAME}
|
||||
echo "- name: \"${NAME}\"" >> ${TMP}/archives.yml
|
||||
|
||||
git clean -f
|
||||
done
|
||||
|
||||
for rel in "${TOBUILD_JEKYLL[@]}"
|
||||
|
@ -53,21 +54,21 @@ do
|
|||
NAME=$(echo $rel | cut -d : -f 1)
|
||||
TAG=$(echo $rel | cut -d : -f 2)
|
||||
echo "### Building '$NAME' from $TAG"
|
||||
git clean -f
|
||||
git checkout ${TAG}
|
||||
echo "baseurl: /$NAME" > config_override.yml
|
||||
cp ${TMP}/versions.yml _data
|
||||
|
||||
bundle install
|
||||
bundle exec jekyll build --config _config.yml,config_override.yml
|
||||
|
||||
mv _site ${TMP}/archive/${NAME}
|
||||
echo "- name: \"${NAME}\"" >> ${TMP}/archives.yml
|
||||
|
||||
git clean -f
|
||||
done
|
||||
|
||||
echo "### Building landing page"
|
||||
git clean -f
|
||||
git checkout archive
|
||||
git checkout master
|
||||
|
||||
# Grab the state
|
||||
cp ${TMP}/archives.yml data
|
||||
|
@ -75,6 +76,7 @@ cp ${TMP}/archives.yml data
|
|||
# Adjust a few things for archive_landing
|
||||
rm -fr static/talks
|
||||
|
||||
scripts/build_site.sh
|
||||
scripts/gen_site.sh "https://archive.istio.io"
|
||||
|
||||
mv public/* ${TMP}/archive
|
||||
|
|
Loading…
Reference in New Issue