Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build-and-preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
if: github.event.action != 'closed'
env:
HUGO_PREVIEW: 'true'
HUGO_PREVIEW_BASE_URL: https://docs.layer5.io/pr-preview/pr-${{ github.event.pull_request.number }}/
run: |
npm run build:preview
cat > public/robots.txt <<'EOF'
Expand Down Expand Up @@ -145,7 +146,7 @@ jobs:
with:
header: pr-preview
message: |
🚀 Preview deployment: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.pull_request.number }}/
🚀 Preview deployment: https://docs.layer5.io/pr-preview/pr-${{ github.event.pull_request.number }}/
> *Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment [here](https://github.com/${{ github.repository }}/actions/workflows/pages/pages-build-deployment)*

- name: Comment on pruned previews
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
hugo \
--gc \
--minify \
--baseURL "/"
--baseURL "https://docs.layer5.io/"
cp CNAME public/CNAME
touch public/.nojekyll
- name: Deploy to GitHub Pages
Expand Down
2 changes: 1 addition & 1 deletion content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,4 @@ function restoreImage(imgId, originalSrc) {
animate();
}
</script>
<!-- Wave Visualizer Script -->
<!-- Wave Visualizer Script -->
14 changes: 13 additions & 1 deletion layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage" lang="{{ .Site.Language.Lang }}" dir="{{ .Site.Language.Direction }}" class="no-js">
<head>
{{- $baseHref := .Site.BaseURL -}}
{{- with getenv "HUGO_PREVIEW_BASE_URL" -}}
{{- $baseHref = . -}}
{{- end }}
<script>
(function () {
var previewBase = window.location.pathname.match(/^\/pr-preview\/pr-\d+\//);
if (previewBase && window.location.pathname !== previewBase[0] + "404.html") {
window.location.replace(previewBase[0] + "404.html");
}
})();
</script>
<base href="{{ $baseHref }}">
{{ partial "head.html" . }}
</head>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
Expand Down Expand Up @@ -34,4 +47,3 @@ <h1>Not found</h1>
{{ partial "scripts.html" . }}
</body>
</html>

2 changes: 1 addition & 1 deletion layouts/partials/favicon.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
<link rel="shortcut icon" href="/favicons/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<meta name="theme-color" content="#ffffff">
Loading