add link checker, fix a redirect, remove unused component

This commit is contained in:
Jeff Escalante 2020-02-10 13:56:55 -05:00
parent db2fba3a82
commit 59ac380af4
No known key found for this signature in database
GPG key ID: 32D23C61AB5450DB
10 changed files with 39 additions and 449 deletions

View file

@ -274,34 +274,36 @@
# Guides
# Reorganized Guides by Persona
/guides/autopilot.html /guides/operations/autopilot
/guides/autopilot /guides/operations/autopilot
/guides/cluster/automatic.html /guides/operations/cluster/automatic
/guides/cluster/automatic /guides/operations/cluster/automatic
/guides/cluster/bootstrapping.html /guides/operations/cluster/bootstrapping
/guides/cluster/bootstrapping /guides/operations/cluster/bootstrapping
/guides/cluster/manual.html /guides/operations/cluster/manual
/guides/cluster/manual /guides/operations/cluster/manual
/guides/cluster/federation /guides/operations/federation
/guides/cluster/requirements /guides/operations/requirements
/guides/nomad-metrics.html /guides/operations/monitoring/nomad-metrics
/guides/nomad-metrics /guides/operations/monitoring/nomad-metrics
/guides/node-draining.html /guides/operations/node-draining
/guides/node-draining /guides/operations/node-draining
/guides/outage.html /guides/operations/outage
/guides/outage /guides/operations/outage
/guides/acl.html /guides/security/acl
/guides/acl /guides/security/acl
/guides/namespaces.html https://learn.hashicorp.com/nomad/governance-and-policy/namespaces
/guides/namespaces https://learn.hashicorp.com/nomad/governance-and-policy/namespaces
/guides/quotas.html https://learn.hashicorp.com/nomad/governance-and-policy/quotas
/guides/quotas https://learn.hashicorp.com/nomad/governance-and-policy/quotas
/guides/securing-nomad.html /guides/security/securing-nomad
/guides/securing-nomad /guides/security/securing-nomad
/guides/sentinel-policy.html https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
/guides/sentinel-policy https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
/guides/sentinel/job.html https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
/guides/sentinel/job https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
/guides/autopilot.html /guides/operations/autopilot
/guides/autopilot /guides/operations/autopilot
/guides/cluster/automatic.html /guides/operations/cluster/automatic
/guides/cluster/automatic /guides/operations/cluster/automatic
/guides/cluster/bootstrapping.html /guides/operations/cluster
/guides/cluster/bootstrapping /guides/operations/cluster
/guides/operations/cluster/bootstrapping.html /guides/operations/cluster
/guides/operations/cluster/bootstrapping /guides/operations/cluster
/guides/cluster/manual.html /guides/operations/cluster/manual
/guides/cluster/manual /guides/operations/cluster/manual
/guides/cluster/federation /guides/operations/federation
/guides/cluster/requirements /guides/operations/requirements
/guides/nomad-metrics.html /guides/operations/monitoring/nomad-metrics
/guides/nomad-metrics /guides/operations/monitoring/nomad-metrics
/guides/node-draining.html /guides/operations/node-draining
/guides/node-draining /guides/operations/node-draining
/guides/outage.html /guides/operations/outage
/guides/outage /guides/operations/outage
/guides/acl.html /guides/security/acl
/guides/acl /guides/security/acl
/guides/namespaces.html https://learn.hashicorp.com/nomad/governance-and-policy/namespaces
/guides/namespaces https://learn.hashicorp.com/nomad/governance-and-policy/namespaces
/guides/quotas.html https://learn.hashicorp.com/nomad/governance-and-policy/quotas
/guides/quotas https://learn.hashicorp.com/nomad/governance-and-policy/quotas
/guides/securing-nomad.html /guides/security/securing-nomad
/guides/securing-nomad /guides/security/securing-nomad
/guides/sentinel-policy.html https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
/guides/sentinel-policy https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
/guides/sentinel/job.html https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
/guides/sentinel/job https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
/guides/analytical-workloads/spark/spark.html /guides/analytical-workloads/spark
/guides/analytical-workloads/spark/spark /guides/analytical-workloads/spark

View file

@ -1 +0,0 @@
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z" fill="#fff" stroke="#E80134"/><path d="M12 8v4" stroke="#E80134"/><circle cx="12" cy="16" r="1" fill="#E80134"/></svg>

Before

Width:  |  Height:  |  Size: 276 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none"><path stroke="#D2D4DB" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M8.575 4.048L1.517 15.832a1.667 1.667 0 001.425 2.5h14.116a1.667 1.667 0 001.425-2.5L11.425 4.048a1.667 1.667 0 00-2.85 0z" clip-rule="evenodd"/><path stroke="#E80134" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10 8.332v3.333"/><circle cx="10" cy="15.001" fill="#E80134" r=".833"/></svg>

Before

Width:  |  Height:  |  Size: 481 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" fill="none"><path stroke="#D2D4DB" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.75 9.928v.698a7.5 7.5 0 11-4.447-6.855"/><path stroke="#1563FF" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16.5 3.875l-8.25 8.25L6 9.875"/></svg>

Before

Width:  |  Height:  |  Size: 345 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.75 9.053v.698a7.5 7.5 0 11-4.447-6.855"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16.5 3l-8.25 8.25L6 9"/></svg>

Before

Width:  |  Height:  |  Size: 304 B

View file

@ -1 +0,0 @@
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 23C5.925 23 1 18.075 1 12S5.925 1 12 1s11 4.925 11 11-4.925 11-11 11z" fill="#000" stroke="#000"/><path d="M16.666 9.082l-6.416 6.417-2.917-2.917" stroke="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 256 B

View file

@ -1,108 +0,0 @@
import marked from 'marked'
import Image from '@hashicorp/react-image'
import alertIcon from './img/alert-icon.svg?include'
import checkIcon from './img/check-icon.svg?include'
function BeforeAfterDiagram(props) {
const markedOptions = generateMarkedOptions()
const {
theme,
beforeHeadline,
beforeContent,
beforeImage,
afterHeadline,
afterContent,
afterImage
} = props
return (
<div className={`g-before-after-diagrams ${theme}`}>
<div className="before">
<div className="image">
<div>
<Image {...beforeImage} />
</div>
</div>
<div className="content">
<span className="line">
<span />
<div
dangerouslySetInnerHTML={{
__html: alertIcon
}}
/>
<span />
</span>
<div>
{beforeHeadline && (
<h3
className="g-type-display-3"
dangerouslySetInnerHTML={{
__html: marked.inlineLexer(beforeHeadline, [])
}}
/>
)}
{beforeContent && (
<div
className="g-type-body-small"
dangerouslySetInnerHTML={{
__html: marked(beforeContent, markedOptions)
}}
/>
)}
</div>
</div>
</div>
<div className="after">
<div className="image">
<div>
<Image {...afterImage} />
</div>
</div>
<div className="content">
<div className="line">
<div
dangerouslySetInnerHTML={{
__html: checkIcon
}}
/>
</div>
<div>
{afterHeadline && (
<h3
className="g-type-display-3"
dangerouslySetInnerHTML={{
__html: marked.inlineLexer(afterHeadline, [])
}}
/>
)}
{afterContent && (
<div
dangerouslySetInnerHTML={{
__html: marked(afterContent, markedOptions)
}}
/>
)}
</div>
</div>
</div>
</div>
)
}
export default BeforeAfterDiagram
function generateMarkedOptions() {
const markedRenderer = new marked.Renderer()
markedRenderer.heading = function(text, level) {
return `<h${level} class="g-type-label">${text}</h${level}>`
}
markedRenderer.paragraph = function(text) {
return `<p class="g-type-body-small">${text}</p>`
}
markedRenderer.list = function(text) {
return `<ul class="g-type-body-small">${text}</ul>`
}
return { renderer: markedRenderer }
}

View file

@ -1,307 +0,0 @@
.g-before-after-diagrams {
display: flex;
flex-wrap: wrap;
margin: 0 -16px;
position: relative;
@media (max-width: 1023px) {
margin-left: -12px;
margin-right: -12px;
}
@media (max-width: 767px) {
flex-direction: column;
margin-left: 40px;
margin-right: 0;
}
& > div {
display: flex;
flex-direction: column;
margin: 0 16px;
position: relative;
width: calc(50% - 32px);
@media (max-width: 1023px) {
margin: 0 12px;
width: calc(50% - 24px);
}
@media (max-width: 767px) {
margin: 0;
width: 100%;
}
}
& .before {
@media (max-width: 767px) {
margin-bottom: 62px;
}
& li:before {
background: url('/img/icons/alert-triangle.svg');
height: 20px;
margin-top: 3px;
width: 20px;
}
}
& .after li:before {
background: url('/img/icons/check-circle.svg');
height: 18px;
margin-top: 4px;
width: 18px;
}
& .image {
align-items: center;
display: flex;
height: 320px;
justify-content: center;
margin-bottom: 96px;
@media (max-width: 767px) {
margin-bottom: 40px;
}
@media (max-width: 640px) {
height: 284px;
}
@media (max-width: 540px) {
height: 238px;
}
@media (max-width: 480px) {
height: 211px;
}
@media (max-width: 375px) {
height: 163px;
}
& div {
height: 100%;
text-align: center;
width: 100%;
}
& img,
& svg {
max-height: 100%;
max-width: 100%;
}
}
& .content {
border: 1px solid var(--DEPRECATED-gray-9);
padding: 24px 32px 20px;
position: relative;
flex-grow: 1;
@media (max-width: 1023px) {
padding-left: 24px;
padding-right: 24px;
}
@media (max-width: 767px) {
padding-left: 20px;
padding-right: 20px;
}
&:before,
&:after {
bottom: 100%;
border: solid transparent;
content: '';
height: 0;
left: 50%;
width: 0;
position: absolute;
pointer-events: none;
}
&:before {
border-color: rgba(229, 230, 235, 0);
border-bottom-color: var(--DEPRECATED-gray-9);
border-width: 18px;
margin-left: -18px;
}
&:after {
border-color: rgba(255, 255, 255, 0);
border-bottom-color: var(--white);
border-width: 17px;
margin-left: -17px;
}
& > div {
height: 100%;
&.line {
height: auto;
}
& > div {
@media (min-width: 768px) {
max-width: 480px;
margin: 0 auto;
}
}
}
}
& h3 {
border-bottom: 1px solid var(--DEPRECATED-gray-9);
color: var(--black);
margin: 0 0 24px;
padding-bottom: 24px;
text-align: center;
}
& h4 {
display: block;
margin: 24px 0 26px;
text-transform: uppercase;
}
& ul {
list-style: none;
padding-left: 32px;
position: relative;
}
& li {
margin: 8px 0;
&:before {
background-repeat: no-repeat;
content: '';
left: 0;
position: absolute;
}
}
& .line {
padding: 0;
position: absolute;
right: 0;
top: -75px;
width: 100%;
@media (max-width: 767px) {
left: -28px;
height: 100%;
right: auto;
top: 28px;
width: auto;
}
& span {
display: block;
height: 1px;
position: absolute;
top: 12px;
width: calc(100% - 14px);
@media (max-width: 767px) {
width: 1px;
}
&:first-child {
background-image: linear-gradient(
90deg,
rgba(210, 212, 219, 0) 0%,
var(--DEPRECATED-gray-8) 100%
);
right: calc(50% + 20px);
width: calc(50% + 140px);
@media (max-width: 767px) {
background-image: linear-gradient(
180deg,
rgba(210, 212, 219, 0) 0%,
var(--DEPRECATED-gray-8) 100%
);
height: 245px;
right: auto;
top: -253px;
width: 1px;
}
}
&:last-child {
background-image: linear-gradient(
90deg,
var(--DEPRECATED-gray-8) 0%,
var(--black) 100%
);
left: calc(50% + 20px);
@media (max-width: 767px) {
background-image: linear-gradient(
180deg,
var(--DEPRECATED-gray-8) 0%,
var(--black) 100%
);
height: calc(100% + 375px);
left: auto;
top: 32px;
}
@media (max-width: 640px) {
height: calc(100% + 339px);
}
@media (max-width: 540px) {
height: calc(100% + 293px);
}
@media (max-width: 480px) {
height: calc(100% + 266px);
}
@media (max-width: 375px) {
height: calc(100% + 218px);
}
&:after {
border-color: transparent transparent transparent #000000;
border-style: solid;
border-width: 5.5px 0 5.5px 8px;
content: '';
height: 0;
position: absolute;
right: -8px;
top: -5px;
width: 0;
@media (max-width: 767px) {
transform: rotate(90deg);
top: auto;
bottom: -8px;
right: -4px;
}
}
}
}
& svg {
position: absolute;
left: 50%;
margin: 0 0 0 -11px;
}
}
/*
* VAULT THEME
*/
&.vault {
& .after {
& li:before {
background: url('/img/icons/check-circle-blue.svg');
height: 19px;
}
}
}
}

View file

@ -6591,6 +6591,12 @@
"resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz",
"integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug=="
},
"dart-linkcheck": {
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/dart-linkcheck/-/dart-linkcheck-2.0.12.tgz",
"integrity": "sha512-ReLhme4n6r1v47QcZgkz0yxrJ8qkSRMaHwichzK96OdwOMZ9DY4hHfHAnsLh2vU1rnYCwaVfo1LwwdnAM+nrzw==",
"dev": true
},
"date-fns": {
"version": "1.30.1",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz",

View file

@ -40,6 +40,7 @@
"stringify-object": "^3.3.0"
},
"devDependencies": {
"dart-linkcheck": "^2.0.12",
"glob": "^7.1.6",
"husky": "^4.2.1",
"inquirer": "^7.0.4",
@ -59,6 +60,7 @@
"generate:component": "next-hashicorp generate component",
"lint": "next-hashicorp lint",
"start": "rm -rf .next/cache/next-babel-loader/ && next dev",
"static": "npm run build && npm run export && cp _redirects out/."
"static": "npm run build && npm run export && cp _redirects out/.",
"linkcheck": "linkcheck https://www.nomadproject.io"
}
}