mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-03 01:48:32 +02:00
add empty pages rendering guard (#2388)
This commit is contained in:
@@ -104,4 +104,6 @@ content:
|
||||
url: https://qdrant.to/cloud
|
||||
partition: deploy
|
||||
hideInSidebar: true
|
||||
build:
|
||||
render: always
|
||||
---
|
||||
|
||||
@@ -107,4 +107,6 @@ content:
|
||||
url: https://qdrant.to/cloud
|
||||
partition: deploy
|
||||
hideInSidebar: true
|
||||
build:
|
||||
render: always
|
||||
---
|
||||
|
||||
@@ -50,4 +50,6 @@ content:
|
||||
text: Read More
|
||||
partition: ecosystem
|
||||
hideInSidebar: true
|
||||
build:
|
||||
render: always
|
||||
---
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
<main>
|
||||
{{ if (eq .Params.type "external-link") }}
|
||||
Redirecting to <a href="{{ .Params.external_url }}">external page</a>...
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
<main>
|
||||
{{ partial "documentation/header" . }}
|
||||
{{ partial "documentation/content-layout" . }}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
<main>
|
||||
{{ partial "documentation/header" . }}
|
||||
{{ partial "documentation/content-layout" . }}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
<main>
|
||||
{{ partial "documentation/header" . }}
|
||||
{{ partial "course/content-layout" . }}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
<main>
|
||||
{{ partial "documentation/header" . }}
|
||||
{{ partial "course/content-layout" . }}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
<main>
|
||||
{{ partial "documentation/header" . }}
|
||||
{{ partial "documentation/content-layout" . }}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
<main>
|
||||
{{ partial "documentation/header" . }}
|
||||
{{ partial "documentation/content-layout" . }}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
<main>
|
||||
{{ partial "documentation/header" . }}
|
||||
{{ partial "documentation/content-layout" . }}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
<main>
|
||||
{{ partial "documentation/header" . }}
|
||||
{{ partial "documentation/content-layout" . }}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{{ if and (not (in (slice "section" "home") .Kind)) (not .Content) (ne .Params.type "external-link") (ne .Params.build.render "always") }}
|
||||
{{- $reset := "\033[0m" -}}
|
||||
{{- $code := "\033[36m" -}}
|
||||
{{- $msg := print
|
||||
"Page %q has empty " $code ".Content" $reset ". If this is a headless file, consider adding build options to the parent " $code "_index.md" $reset " or the file itself to prevent it from being rendered. "
|
||||
"Otherwise, add " $code "build.render: always" $reset " to the file."
|
||||
-}}
|
||||
{{ errorf $msg .Path }}
|
||||
{{ end }}
|
||||
@@ -3,6 +3,7 @@
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body>
|
||||
{{- partial "validate-content.html" . -}}
|
||||
{{ partial "site-header" . }}
|
||||
{{ partial "subscribe" . }}
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user