diff --git a/.github/workflows/deply.yml b/.github/workflows/deply.yml index d9a20d45..3aadf57e 100644 --- a/.github/workflows/deply.yml +++ b/.github/workflows/deply.yml @@ -27,6 +27,7 @@ jobs: mkdir _data/commands _includes/commands ln -s $(pwd)/_submodules/valkey/src/commands $(pwd)/_data/commands/latest ln -s $(pwd)/_submodules/valkey-doc/commands $(pwd)/_includes/commands/latest + ln -s $(pwd)/_submodules/valkey-doc/docs $(pwd)/_includes/docs - name: Setup Ruby uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0 with: diff --git a/.gitignore b/.gitignore index 4f9c7cfc..f66c9a32 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ _site vendor .DS_Store /_data/commands/ -/_includes/commands/ \ No newline at end of file +/_includes/commands/ +/_includes/docs/ \ No newline at end of file diff --git a/_includes/docs b/_includes/docs new file mode 120000 index 00000000..a0984a08 --- /dev/null +++ b/_includes/docs @@ -0,0 +1 @@ +../_submodules/valkey-doc/docs/ \ No newline at end of file diff --git a/_layouts/doc-import.html b/_layouts/doc-import.html new file mode 100644 index 00000000..5820bf71 --- /dev/null +++ b/_layouts/doc-import.html @@ -0,0 +1,29 @@ +--- +layout: default +--- +{%- assign primary_title = page.primary_title -%} +{%- comment -%} + This template pulls in the file from `source` in the front matter. + + It detects if the script starts with front matter (delimited by `---`) by splitting and looking for the delimiter at the start of the file. + If the delimter is detected at the top of the file, it skips the the 3rd (zero based: 2) element and iterates over the remain sections. + If there delmiter is not detected (no front matter) it swallows the the whole file and markdownify's it. + +{%- endcomment -%} +{%- capture md -%}{% include {{ page.source }} %}{%- endcapture -%} +{%- assign stripped_front_matter = md | split: "---" -%} +{%- include page_title.html -%} +
+
+ {%- if stripped_front_matter[0].size == 0 -%} + {%- for item in stripped_front_matter offset:2 -%} + {{ item | markdownify }} + {%- if forloop.last == false -%} +
+ {%- endif -%} + {%- endfor -%} + {%- else -%} + {{ md | markdownify }} + {%- endif -%} +
+
diff --git a/_submodules/valkey-doc b/_submodules/valkey-doc index a26a6c5b..6d85b22a 160000 --- a/_submodules/valkey-doc +++ b/_submodules/valkey-doc @@ -1 +1 @@ -Subproject commit a26a6c5b2056d1873e0bca50583f8f7f5012cdfd +Subproject commit 6d85b22a9dd4b1ce2bf6305324df7f02b15a6ce7 diff --git a/docs/management/persistence.md b/docs/management/persistence.md new file mode 100644 index 00000000..fa73d48a --- /dev/null +++ b/docs/management/persistence.md @@ -0,0 +1,5 @@ +--- +layout: doc-import +primary_title: Persistence +source: "/docs/management/persistence.md" +--- \ No newline at end of file