mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-06 19:38:30 +02:00
Serve Markdown when requested (#2181)
* Add support for rendering each page as md * On md pages, change relative links to go to md version * Netlify: respond with md if accept header equals text/markdown * Render shortcodes * Remove netlify accept header functionality
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# {{ .Title }}
|
||||
|
||||
{{- $content := .RenderShortcodes -}}
|
||||
{{- /* Rewrite internal absolute links: ](/path/to/page/) → ](/path/to/page/index.md) */}}
|
||||
{{- $content = replaceRE `\]\((/[^):]*/)` `](${1}index.md` $content -}}
|
||||
{{- /* Rewrite internal relative links: ](../page/) or (./page/) → same with index.md */}}
|
||||
{{- $content = replaceRE `\]\((\.\.?/[^):]*/)` `](${1}index.md` $content -}}
|
||||
{{ $content }}
|
||||
Reference in New Issue
Block a user