mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-03 09:58:30 +02:00
Improve rendering of Markdownified docs (#2420)
* Improve rendering of Markdownified docs * Make frontmatter title rendering conditional
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
# {{ .Title }}
|
|
||||||
|
|
||||||
{{- $content := .RenderShortcodes -}}
|
{{- $content := .RenderShortcodes -}}
|
||||||
{{- /* Rewrite internal absolute links: ](/path/to/page/) → ](/path/to/page/index.md) */}}
|
{{- if not (strings.TrimSpace $content) }}# {{ .Title }}
|
||||||
{{- $content = replaceRE `\]\((/[^):]*/)([\)#?])` `](${1}index.md${2}` $content -}}
|
{{ end -}}
|
||||||
|
{{- /* Rewrite internal absolute links: ](/path/to/page/) → ](https://qdrant.tech/path/to/page/index.md) */}}
|
||||||
|
{{- $content = replaceRE `\]\((/[^):]*/)([\)#?])` `](https://qdrant.tech${1}index.md${2}` $content -}}
|
||||||
{{- /* Rewrite internal relative links: ](../page/) or (./page/) → same with index.md */}}
|
{{- /* Rewrite internal relative links: ](../page/) or (./page/) → same with index.md */}}
|
||||||
{{- $content = replaceRE `\]\((\.\.?/[^):]*/)([\)#?])` `](${1}index.md${2}` $content -}}
|
{{- $content = replaceRE `\]\((\.\.?/[^):]*/)([\)#?])` `](https://qdrant.tech/${1}index.md${2}` $content -}}
|
||||||
{{ $content }}
|
{{ $content }}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
# {{ .Title }}
|
|
||||||
|
|
||||||
{{- $content := .RenderShortcodes -}}
|
{{- $content := .RenderShortcodes -}}
|
||||||
{{- /* Rewrite internal absolute links: ](/path/to/page/) → ](/path/to/page/index.md) */}}
|
{{- if not (strings.TrimSpace $content) }}# {{ .Title }}
|
||||||
{{- $content = replaceRE `\]\((/[^):]*/)([\)#?])` `](${1}index.md${2}` $content -}}
|
{{ end -}}
|
||||||
|
{{- /* Rewrite internal absolute links: ](/path/to/page/) → ](https://qdrant.tech/path/to/page/index.md) */}}
|
||||||
|
{{- $content = replaceRE `\]\((/[^):]*/)([\)#?])` `](https://qdrant.tech${1}index.md${2}` $content -}}
|
||||||
{{- /* Rewrite internal relative links: ](../page/) or (./page/) → same with index.md */}}
|
{{- /* Rewrite internal relative links: ](../page/) or (./page/) → same with index.md */}}
|
||||||
{{- $content = replaceRE `\]\((\.\.?/[^):]*/)([\)#?])` `](${1}index.md${2}` $content -}}
|
{{- $content = replaceRE `\]\((\.\.?/[^):]*/)([\)#?])` `](https://qdrant.tech/${1}index.md${2}` $content -}}
|
||||||
{{ $content }}
|
{{ $content }}
|
||||||
Reference in New Issue
Block a user