Merge pull request #97 from vincent99/master

Fix single layout
This commit is contained in:
Vincent Fiduccia
2018-05-08 12:00:17 -07:00
committed by GitHub
4 changed files with 35 additions and 14 deletions
@@ -9,8 +9,8 @@ weight: 200
The images can be found on [DockerHub](https://hub.docker.com/r/rancher/rancher/tags/).
- `rancher/rancher:latest`: Our latest development builds. These builds are validated through our CI automation framework. These releases aren't for production environments.
- `rancher/rancher:latest`: Our latest development release. These builds are validated through our CI automation framework. These releases are not recommended for production environments.
<!-- - `rancher/rancher:stable`: Our latest stable release builds. This tag is recommended for production. -->
<!-- - `rancher/rancher:stable`: Our newest stable release. This tag is recommended for production. -->
Please don't use the `master` tag or any release with a `rc{n}` suffix. These builds are meant for the {{< product >}} team to test out builds.
Any tag with a `-rc` or other suffix is meant for the {{< product >}} testing team to validate. You should not use these tags, and upgrading from or to a `rc` build is not supported.
+3 -3
View File
@@ -34,19 +34,19 @@ gulp.task('dev', ['build-dev'], () => {
});
gulp.task('build', (cb) => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo' /*, 'hugo-search-index'*/, () => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo' , 'hugo-search-index', () => {
cb();
});
});
gulp.task('build-staging', (cb) => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo-staging' /*, 'hugo-search-index'*/, () => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo-staging' , 'hugo-search-index', () => {
cb();
});
});
gulp.task('build-dev', (cb) => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo-dev' /*, 'hugo-search-index'*/, () => {
runSequence('pub-delete', 'sass', 'build:vendor', 'build:app', 'fonts', 'img', 'hugo-dev' , 'hugo-search-index', () => {
cb();
});
});
+9 -3
View File
@@ -17,16 +17,22 @@
{{ define "main" }}
<div class="wrapper">
{{ partial "docs-nav.html" . }}
{{ $showSidebar := (gt (len ($.Scratch.Get "secondLevel").Sections) 0) }}
{{ $secondLevel := ($.Scratch.Get "secondLevel") }}
{{ $.Scratch.Set "showSidebar" false }}
{{ with $secondLevel }}
{{ if (gt (len .Sections) 0) }}
{{ $.Scratch.Set "showSidebar" true }}
{{end}}
{{end}}
<div class="row m-t-sm">
{{ if $showSidebar }}
{{ if ($.Scratch.Get "showSidebar") }}
<aside class="col-sm-3 col-xs-12 p-l-0">
{{ partial "docs-side-nav.html" . }}
</aside>
{{end}}
<article class="{{ if $showSidebar }} col-sm-6 {{else}} col-md-9 p-r-lg {{end}} col-xs-12">
<article class="{{ if ($.Scratch.Get "showSidebar") }} col-sm-6 {{else}} col-md-9 p-r-lg {{end}} col-xs-12">
<div class="main-content ">
+20 -5
View File
@@ -1,7 +1,11 @@
#!/bin/bash
set -e
PORT=9001
IMAGE=rancher/docs
TAG=dev
THEME=
BUILD=
# cd to app root
CWD=$(dirname $0)
@@ -16,8 +20,9 @@ print_help()
cat 1>&2 <<EOF
Usage:
[-p PORT] [-t]
[-n] [-p PORT] [-t]
-b - Build the image instead of pulling from the registry
-p PORT - Port to listen on
-t DIR - Use DIR to for the theme, to devlop the theme at the same time
@@ -35,8 +40,11 @@ absolute() {
}
while getopts ":p:t:" opt;do
while getopts ":bp:t:" opt;do
case $opt in
b)
BUILD="true"
;;
p)
PORT="${OPTARG}"
;;
@@ -57,12 +65,19 @@ while getopts ":p:t:" opt;do
done
THEMEVOLUME=""
echo "Starting server on http://localhost:${PORT}"
if [[ "$THEME" ]]; then
echo "Using theme from ${THEME}"
ABSOLUTE=$(absolute $THEME)
THEMEVOLUME="-v ${ABSOLUTE}:/run/node_modules/rancher-website-theme"
fi
docker pull rancher/docs:dev
docker run --rm -p ${PORT}:${PORT} -it -v $(pwd):/site ${THEMEVOLUME} rancher/docs:dev dev --port=${PORT}
if [ -z "$BUILD" ]; then
docker pull ${IMAGE}:${TAG}
else
echo "Building ${IMAGE}:${TAG}"
TAG=local
docker build -f Dockerfile.dev -t ${IMAGE}:${TAG} .
fi
echo "Starting server on http://localhost:${PORT}"
docker run --rm -p ${PORT}:${PORT} -it -v $(pwd):/site ${THEMEVOLUME} ${IMAGE}:${TAG} dev --port=${PORT}