mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-02 01:18:30 +02:00
Generate multiple code snippets from a single source file (#2146)
* Support generating multiple snippets from one source file * Convert Python code snippets from one source file * Add code snippets for C#, Go, Java, Rust and TS * Make intro less Python-oriented * Add client installation instructions for all languages * Cleanup python code --------- Co-authored-by: xzfc <xzfcpw@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<!-- Extract shortcode parameters -->
|
||||
{{ $path := .Get "path" }}
|
||||
{{ $order := .Get "order" }}
|
||||
{{ $block := .Get "block" }}
|
||||
|
||||
|
||||
<!-- Convert order string to a slice if provided -->
|
||||
@@ -53,7 +54,7 @@
|
||||
<!-- Read all files from the given path -->
|
||||
{{ $files := dict }}
|
||||
|
||||
{{ range $dir := slice (printf "content/%s" $path) (printf "content/%s/generated" $path) }}
|
||||
{{ range $dir := slice (printf "content/%s" $path) (printf "content/%s/generated/%s" $path $block) }}
|
||||
{{ if not (fileExists $dir) }}
|
||||
{{ continue }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user