mirror of https://github.com/istio/istio.io.git
Fix a bunch of lint-related errors. (#3897)
This commit is contained in:
parent
3d81246311
commit
0880b7450d
|
@ -2,7 +2,7 @@ version: 2
|
|||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: gcr.io/istio-testing/website-builder:2019-03-03
|
||||
- image: gcr.io/istio-testing/website-builder:2019-03-29
|
||||
|
||||
working_directory: ~/site
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
ISTIO_SERVE_DOMAIN ?= localhost
|
||||
export ISTIO_SERVE_DOMAIN
|
||||
|
||||
img := gcr.io/istio-testing/website-builder:2019-03-03
|
||||
img := gcr.io/istio-testing/website-builder:2019-03-29
|
||||
docker := docker run -e INTERNAL_ONLY=true -t -i --sig-proxy=true --rm -v $(shell pwd):/site -w /site $(img)
|
||||
|
||||
ifeq ($(INTERNAL_ONLY),)
|
||||
|
|
|
@ -31,8 +31,8 @@ your specific needs. The following built-in configuration profiles are currently
|
|||
|
||||
The components marked as **X** are installed within each profile:
|
||||
|
||||
| | default | demo | minimal | sds |
|
||||
| --- | :---: | :---: | :---: | :---: |
|
||||
| | default | demo | minimal | sds |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Profile filename | `values.yaml` | `values-istio-demo.yaml` | `values-istio-minimal.yaml` | `values-istio-sds-auth.yaml` |
|
||||
| Core components | | | | | |
|
||||
| `istio-citadel` | X | X | | X |
|
||||
|
@ -54,7 +54,7 @@ Some profiles have an authentication variant, with `-auth` appended to the name,
|
|||
security features to the profile:
|
||||
|
||||
| | default | demo | minimal | sds |
|
||||
| --- | :---: | :---: | :---: | :---: |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Control Plane Security | | X | | |
|
||||
| Strict Mutual TLS | | X | | X |
|
||||
| SDS | | | | X |
|
||||
|
|
|
@ -48,10 +48,10 @@ Then add the `Kubernetes Engine Admin` role:
|
|||
|
||||
Refer to the [Istio on GKE documentation](https://cloud.google.com/istio/docs/istio-on-gke/overview) for instructions on creating a cluster with Istio installed.
|
||||
|
||||
Once the cluster is ready, acquire the credentials for this cluster.
|
||||
Once the cluster is ready, acquire its credentials:
|
||||
|
||||
{{< text bash >}}
|
||||
$ gcloud container clusters get-credentials <your_cluster> --zone=<your_zone>
|
||||
{{< /text >}}
|
||||
{{< text bash >}}
|
||||
$ gcloud container clusters get-credentials <your_cluster> --zone=<your_zone>
|
||||
{{< /text >}}
|
||||
|
||||
You can now try out one of the Istio examples like [Bookinfo](/docs/examples/bookinfo/).
|
||||
|
|
|
@ -448,13 +448,13 @@ the credentials of the ingress gateway by deleting its secret and creating a new
|
|||
The server uses the CA certificate to verify
|
||||
its clients, and we must use the name `cacert` to hold the CA certificate.
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl -n istio-system delete secret httpbin-credential
|
||||
$ kubectl create -n istio-system secret generic httpbin-credential \
|
||||
--from-file=key=httpbin.example.com/3_application/private/httpbin.example.com.key.pem \
|
||||
--from-file=cert=httpbin.example.com/3_application/certs/httpbin.example.com.cert.pem \
|
||||
--from-file=cacert=httpbin.example.com/2_intermediate/certs/ca-chain.cert.pem
|
||||
{{< /text >}}
|
||||
{{< text bash >}}
|
||||
$ kubectl -n istio-system delete secret httpbin-credential
|
||||
$ kubectl create -n istio-system secret generic httpbin-credential \
|
||||
--from-file=key=httpbin.example.com/3_application/private/httpbin.example.com.key.pem \
|
||||
--from-file=cert=httpbin.example.com/3_application/certs/httpbin.example.com.cert.pem \
|
||||
--from-file=cacert=httpbin.example.com/2_intermediate/certs/ca-chain.cert.pem
|
||||
{{< /text >}}
|
||||
|
||||
1. Change the gateway's definition to set the TLS mode to `MUTUAL`.
|
||||
|
||||
|
|
|
@ -99,10 +99,14 @@ URL-based text block with redirects
|
|||
|
||||
{{< text_import url="https://raw.githubusercontent.com/istio/istio.io/master/test/command_example.txt" syntax="bash" >}}
|
||||
|
||||
Very wide text block
|
||||
|
||||
{{< text plain >}}
|
||||
Reeeeeaaaaaalllllllllly lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllong
|
||||
{{< /text >}}
|
||||
|
||||
Very tall text block
|
||||
|
||||
{{< text plain >}}
|
||||
Really tall
|
||||
Really tall
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
|
||||
<div class="entries">
|
||||
{{ $previous := "-" }}
|
||||
{{ $previous = "-" }}
|
||||
{{ range $w := $words }}
|
||||
{{ $first := upper (slicestr $w.Title 0 1) }}
|
||||
|
||||
|
|
|
@ -40,7 +40,9 @@
|
|||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
window.setTimeout(() => {
|
||||
queryAll(document, '.call-to-action').forEach(el => el.style.opacity = "1");
|
||||
queryAll(document, '.call-to-action').forEach(el => {
|
||||
el.style.opacity = "1";
|
||||
});
|
||||
}, 250);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -30,12 +30,18 @@
|
|||
|
||||
<script>
|
||||
function getParameterByName(name, url) {
|
||||
if (!url) url = window.location.href;
|
||||
if (!url) {
|
||||
url = window.location.href;
|
||||
}
|
||||
name = name.replace(/[\[\]]/g, "\\$&");
|
||||
const regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
|
||||
results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
if (!results) {
|
||||
return null;
|
||||
}
|
||||
if (!results[2]) {
|
||||
return '';
|
||||
}
|
||||
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
||||
}
|
||||
const q = getParameterByName('q', window.location.href);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Redirecting…</title>
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{{ $page := .page }}
|
||||
{{ $adapters := .adapters }}
|
||||
|
||||
{{ $adapters := split $adapters "," }}
|
||||
{{ $adapters := sort $adapters }}
|
||||
{{ $adapters = split $adapters "," }}
|
||||
{{ $adapters = sort $adapters }}
|
||||
{{ $last := trim (index (last 1 $adapters) 0) " " }}
|
||||
{{ range $i, $a := $adapters }}
|
||||
{{ $adap := trim $a " " }}
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
{{ if .Site.Data.args.archive }}
|
||||
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://istio.io/{{.Dir}}');return false;">{{ printf (i18n "current_release") $current.name }}</a>
|
||||
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://preliminary.istio.io/{{.Dir}}');return false;">{{ printf (i18n "next_release") $next.name }}</a>
|
||||
<a tabidnex="-1" role="menuitem" href="https://archive.istio.io">{{ i18n "archived_releases" }}</a>
|
||||
<a tabindex="-1" role="menuitem" href="https://archive.istio.io">{{ i18n "archived_releases" }}</a>
|
||||
{{ else if .Site.Data.args.preliminary }}
|
||||
<a tabindex="-1" role="menuitem" onclick="navigateToUrlOrRoot('https://istio.io/{{.Dir}}');return false;">{{ printf (i18n "current_release") $current.name }}</a>
|
||||
<a tabindex="-1" role="menuitem" href="https://archive.istio.io">{{ i18n "archived_releases" }}</a>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{{ $page := .page }}
|
||||
{{ $templates := .templates }}
|
||||
|
||||
{{ $templates := split $templates "," }}
|
||||
{{ $templates := sort $templates }}
|
||||
{{ $templates = split $templates "," }}
|
||||
{{ $templates = sort $templates }}
|
||||
{{ $last := trim (index (last 1 $templates) 0) " " }}
|
||||
{{ range $i, $t := $templates }}
|
||||
{{ $temp := trim $t " " }}
|
||||
|
|
|
@ -28,7 +28,9 @@
|
|||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
window.setTimeout(() => {
|
||||
queryAll(document, '.call-to-action').forEach(el => el.style.opacity = "1");
|
||||
queryAll(document, '.call-to-action').forEach(el => {
|
||||
el.style.opacity = "1";
|
||||
});
|
||||
}, 250);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -28,7 +28,9 @@
|
|||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
window.setTimeout(() => {
|
||||
queryAll(document, '.call-to-action').forEach(el => el.style.opacity = "1");
|
||||
queryAll(document, '.call-to-action').forEach(el => {
|
||||
el.style.opacity = "1";
|
||||
});
|
||||
}, 250);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
{{ $adapter_name := path.Base $a.Dir }}
|
||||
|
||||
{{ $templates := split .Params.supported_templates "," }}
|
||||
{{ $templates := sort $templates }}
|
||||
{{ $templates = sort $templates }}
|
||||
|
||||
{{ range $templates }}
|
||||
{{ $temp := trim . " "}}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
FROM ruby:2.4-alpine
|
||||
FROM ruby:2.6.2-alpine
|
||||
|
||||
RUN echo 'gem: --no-document' >> /etc/gemrc
|
||||
|
||||
RUN apk add --no-cache \
|
||||
nodejs \
|
||||
nodejs-current-npm \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
build-base \
|
||||
|
@ -15,7 +15,7 @@ RUN apk add --no-cache \
|
|||
libcurl \
|
||||
git \
|
||||
bash \
|
||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted gnu-libiconv
|
||||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
|
||||
|
||||
ENV HUGO_VERSION=0.54.0
|
||||
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz /tmp
|
||||
|
@ -29,6 +29,7 @@ RUN tar -xf /tmp/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -C /tmp \
|
|||
|
||||
RUN npm install -g \
|
||||
sass \
|
||||
sass-lint \
|
||||
markdown-spellcheck \
|
||||
svgstore-cli \
|
||||
svgo \
|
||||
|
@ -41,5 +42,4 @@ RUN gem install html-proofer -v 3.9.2
|
|||
|
||||
ENV PATH /usr/bin:$PATH
|
||||
|
||||
# TODO: replace with your ENTRYPOINT or CMD.
|
||||
CMD [ "/usr/bin/ruby", "-v"]
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
HUB=gcr.io/istio-testing
|
||||
VERSION=$(date +%Y-%m-%d)
|
||||
|
||||
docker build --no-cache -t $HUB/website-builder:$VERSION .
|
||||
docker push $HUB/website-builder:$VERSION
|
||||
docker build --no-cache -t ${HUB}/website-builder:${VERSION} .
|
||||
docker push ${HUB}/website-builder:${VERSION}
|
||||
|
|
|
@ -4,9 +4,9 @@ let syntaxColoring = true;
|
|||
|
||||
// All the voodoo needed to support our fancy code blocks
|
||||
function handleCodeBlocks() {
|
||||
const toolbarShow = 'toolbar-show';
|
||||
const syntaxColoringCookie = 'syntax-coloring';
|
||||
const syntaxColoringItem = 'syntax-coloring-item';
|
||||
const toolbarShow = "toolbar-show";
|
||||
const syntaxColoringCookie = "syntax-coloring";
|
||||
const syntaxColoringItem = "syntax-coloring-item";
|
||||
|
||||
// Add a toolbar to all PRE blocks
|
||||
function attachToolbar(pre) {
|
||||
|
@ -118,7 +118,7 @@ function handleCodeBlocks() {
|
|||
}
|
||||
|
||||
if (cmd !== "") {
|
||||
cmd = cmd + "\n";
|
||||
cmd += "\n";
|
||||
}
|
||||
|
||||
cmd += lines[i];
|
||||
|
@ -251,7 +251,7 @@ function handleCodeBlocks() {
|
|||
return "Unable to access " + url + ": " + response.statusText;
|
||||
}
|
||||
|
||||
return response.text()
|
||||
return response.text();
|
||||
})
|
||||
.catch(e => {
|
||||
return "Unable to access " + url + ": " + e;
|
||||
|
@ -259,11 +259,11 @@ function handleCodeBlocks() {
|
|||
.then(data => {
|
||||
if (code.dataset.snippet) {
|
||||
const pattern = "\\n.*?\\$snippet " + code.dataset.snippet + "\\n(.+?)\\n.*?\\$endsnippet";
|
||||
const regex = new RegExp(pattern, 'gms');
|
||||
const regex = new RegExp(pattern, "gms");
|
||||
|
||||
let buf = "";
|
||||
let match = regex.exec(data);
|
||||
while (match != null) {
|
||||
while (match !== null) {
|
||||
if (buf !== "") {
|
||||
buf += "\n";
|
||||
}
|
||||
|
@ -287,9 +287,9 @@ function handleCodeBlocks() {
|
|||
|
||||
function handleSyntaxColoring() {
|
||||
const cookieValue = readCookie(syntaxColoringCookie);
|
||||
if (cookieValue === 'true') {
|
||||
if (cookieValue === "true") {
|
||||
syntaxColoring = true;
|
||||
} else if (cookieValue === 'false') {
|
||||
} else if (cookieValue === "false") {
|
||||
syntaxColoring = false;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ function handleCodeBlocks() {
|
|||
|
||||
handleSyntaxColoring();
|
||||
|
||||
queryAll(document, 'pre').forEach(pre => {
|
||||
queryAll(document, "pre").forEach(pre => {
|
||||
attachToolbar(pre);
|
||||
applySyntaxColoring(pre);
|
||||
loadExternal(pre);
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
const click = 'click';
|
||||
const mouseenter = 'mouseenter';
|
||||
const mouseleave = 'mouseleave';
|
||||
const active = 'active';
|
||||
const keyup = 'keyup';
|
||||
const keydown = 'keydown';
|
||||
const button = 'button';
|
||||
const ariaLabel = 'aria-label';
|
||||
const ariaExpanded = 'aria-expanded';
|
||||
const ariaSelected = 'aria-selected';
|
||||
const ariaControls = 'aria-controls';
|
||||
const tabIndex = 'tabindex';
|
||||
"use strict";
|
||||
|
||||
const click = "click";
|
||||
const mouseenter = "mouseenter";
|
||||
const mouseleave = "mouseleave";
|
||||
const active = "active";
|
||||
const keyup = "keyup";
|
||||
const keydown = "keydown";
|
||||
const button = "button";
|
||||
const ariaLabel = "aria-label";
|
||||
const ariaExpanded = "aria-expanded";
|
||||
const ariaSelected = "aria-selected";
|
||||
const ariaControls = "aria-controls";
|
||||
const tabIndex = "tabindex";
|
|
@ -25,7 +25,7 @@ function handleLinks() {
|
|||
|
||||
// Add a link icon next to each defined term so people can easily get bookmarks to them in the glossary
|
||||
function attachLinksToDefinedTerms() {
|
||||
queryAll(document, 'dt').forEach(dt => {
|
||||
queryAll(document, "dt").forEach(dt => {
|
||||
if (dt.id !== "") {
|
||||
attachSelfLink(dt);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ function handleLinks() {
|
|||
|
||||
// Make it so each link outside of the current domain opens up in a different window
|
||||
function makeOutsideLinksOpenInTabs() {
|
||||
queryAll(document, 'a').forEach(link => {
|
||||
queryAll(document, "a").forEach(link => {
|
||||
if (link.hostname && link.hostname !== location.hostname) {
|
||||
link.setAttribute("target", "_blank");
|
||||
link.setAttribute("rel", "noopener");
|
||||
|
|
|
@ -4,16 +4,12 @@
|
|||
let overlay = null;
|
||||
let popper = null;
|
||||
|
||||
function isActiveOverlay(element) {
|
||||
return overlay === element;
|
||||
}
|
||||
|
||||
// show/hide the specific overlay
|
||||
function toggleOverlay(element) {
|
||||
if (overlay === element) {
|
||||
closeActiveOverlay();
|
||||
} else {
|
||||
if (overlay != null) {
|
||||
if (overlay !== null) {
|
||||
closeActiveOverlay();
|
||||
}
|
||||
element.classList.add('show');
|
||||
|
@ -62,7 +58,7 @@ function handleOverlays() {
|
|||
},
|
||||
flip: {
|
||||
enabled: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// Attach the event handlers to support the sidebar
|
||||
function handleSidebar() {
|
||||
const sidebar = getById('sidebar');
|
||||
if (sidebar == null) {
|
||||
if (sidebar === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ const keyCodes = Object.freeze({
|
|||
'LEFT': 37,
|
||||
'UP': 38,
|
||||
'RIGHT': 39,
|
||||
'DOWN': 40
|
||||
'DOWN': 40,
|
||||
});
|
||||
|
||||
const escapeChars = {
|
||||
|
@ -26,7 +26,7 @@ const escapeChars = {
|
|||
'>': 'gt',
|
||||
'"': 'quot',
|
||||
'&': 'amp',
|
||||
'\'': '#39'
|
||||
'\'': '#39',
|
||||
};
|
||||
|
||||
const regex = new RegExp("[¢£¥€©®<>\"&']", 'g');
|
||||
|
@ -46,10 +46,12 @@ function copyToClipboard(str) {
|
|||
el.style.position = 'absolute';
|
||||
el.style.left = '-9999px'; // Move outside the screen to make it invisible
|
||||
document.body.appendChild(el); // Append the <textarea> element to the HTML document
|
||||
const selected =
|
||||
document.getSelection().rangeCount > 0 // Check if there is any content selected previously
|
||||
? document.getSelection().getRangeAt(0) // Store selection if found
|
||||
: false; // Mark as false to know no selection existed before
|
||||
let selected;
|
||||
if (document.getSelection().rangeCount > 0) {
|
||||
selected = document.getSelection().getRangeAt(0);
|
||||
} else {
|
||||
selected = false;
|
||||
} // Mark as false to know no selection existed before
|
||||
el.select(); // Select the <textarea> content
|
||||
document.execCommand('copy'); // Copy - only works as a result of a user action (e.g. click events)
|
||||
document.body.removeChild(el); // Remove the <textarea> element
|
||||
|
@ -98,14 +100,8 @@ function navigateToUrlOrRoot(url) {
|
|||
request.send();
|
||||
}
|
||||
|
||||
function createCookie(name, value, days) {
|
||||
let expires = "";
|
||||
if (days) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||
expires = "; expires=" + date.toGMTString();
|
||||
}
|
||||
document.cookie = name + "=" + value + expires + "; path=/";
|
||||
function createCookie(name, value) {
|
||||
document.cookie = name + "=" + value + "; path=/";
|
||||
}
|
||||
|
||||
function getById(id) {
|
||||
|
|
Loading…
Reference in New Issue