diff --git a/automation/generate-all-docs-preview.sh b/automation/generate-all-docs-preview.sh new file mode 100644 index 000000000..8c9495c11 --- /dev/null +++ b/automation/generate-all-docs-preview.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +DOCS_PATH=$(realpath $SCRIPT_DIR/../qdrant-landing/content/documentation) + + +find $DOCS_PATH -name '*.md' | xargs -I {} bash ${SCRIPT_DIR}/generate-doc-preview.sh {} diff --git a/automation/generate-doc-preview.sh b/automation/generate-doc-preview.sh new file mode 100644 index 000000000..3fce376ab --- /dev/null +++ b/automation/generate-doc-preview.sh @@ -0,0 +1,68 @@ +#!/bin/bash + + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +PATH_TO_DOC=${1:-""} + +if [ -z "$PATH_TO_DOC" ]; then + echo "No path to doc provided" + exit 1 +fi + + +PATH_TO_DOCS=$(realpath $SCRIPT_DIR/../qdrant-landing/content/documentation) + +PATH_TO_IMAGES=$(realpath $SCRIPT_DIR/../qdrant-landing/static/documentation) + +ABS_DOCS_DIR=$(realpath $PATH_TO_DOCS) +ABS_DOC_DIR=$(dirname $(realpath $PATH_TO_DOC)) + + +DOCS_RELATIVE_PATH=$(realpath --relative-to=$ABS_DOCS_DIR $ABS_DOC_DIR) + +DOC_FILE_NAME=$(basename $PATH_TO_DOC) + +DOC_NAME_WITHOUT_EXTENSION=${DOC_FILE_NAME%.*} + +export OUTPUT_PATH="$PATH_TO_IMAGES/${DOCS_RELATIVE_PATH}/${DOC_NAME_WITHOUT_EXTENSION}-social-preview.png" + +if [ -f "$OUTPUT_PATH" ]; then + echo "Preview already exists" + exit 0 +fi + + +# Check if the doc is in the docs directory +if [ "$DOCS_RELATIVE_PATH" == "." ]; then + SUBTITLE_TEXT="Documentation" +else + if [ "$DOC_NAME_WITHOUT_EXTENSION" == "_index" ]; then + SUBTITLE_TEXT="Documentation" + else + SUBSECTION_TITLE=$(cat $ABS_DOC_DIR/_index.md | grep "title:" | head -n 1 | sed 's/title: //g' | sed 's/"//g') + SUBTITLE_TEXT="Documentation / $SUBSECTION_TITLE" + fi +fi + +TITLE_TEXT=$(cat $PATH_TO_DOC | grep "title:" | head -n 1 | sed 's/title: //g' | sed 's/"//g') + +echo $SUBTITLE_TEXT +echo $TITLE_TEXT + +PATH_TO_BG_IMAGE="${PATH_TO_IMAGES}/${DOCS_RELATIVE_PATH}/${DOC_NAME_WITHOUT_EXTENSION}-bg.png" + +if [ -f "$PATH_TO_BG_IMAGE" ]; then + BACKGROUND_PATH="$PATH_TO_BG_IMAGE" +else + BACKGROUND_PATH="" +fi + +mkdir -p $PATH_TO_IMAGES/${DOCS_RELATIVE_PATH} + +export TITLE_TEXT="$TITLE_TEXT" +export SUBTITLE_TEXT="$SUBTITLE_TEXT" +export BACKGROUND_PATH="$BACKGROUND_PATH" + +bash $SCRIPT_DIR/template/apply-template.sh + diff --git a/automation/template/apply-template.sh b/automation/template/apply-template.sh new file mode 100644 index 000000000..5ccc847da --- /dev/null +++ b/automation/template/apply-template.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +# Path to the directory where the script is located +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +OUTPUT_PATH=${OUTPUT_PATH:-"$SCRIPT_DIR/output.png"} + +export MAGICK_FONT_PATH=$SCRIPT_DIR/fonts + +SUBTITLE_TEXT=${SUBTITLE_TEXT:-""} + +if [ -z "$SUBTITLE_TEXT" ]; then + echo "No subtitle text provided" + exit 1 +fi + +TITLE_TEXT=${TITLE_TEXT:-""} + +if [ -z "$TITLE_TEXT" ]; then + echo "No title text provided" + exit 1 +fi + +SUBTITLE_TEXT_COMMAND="text 64,239 '$SUBTITLE_TEXT'" +SUBTITLE_SIZE=48 + +BACKGROUND_PATH=${BACKGROUND_PATH:-""} + +if [ -z "$BACKGROUND_PATH" ]; then + + BACKGROUNDS=(a b c d e f g h i j k) + + RANDOM_BACKGROUND=${BACKGROUNDS[$RANDOM % ${#BACKGROUNDS[@]} ]} + + TEMPLATE_PATH="$SCRIPT_DIR/backgrounds/bg_${RANDOM_BACKGROUND}.png" + + convert $TEMPLATE_PATH -font "RobotoMonoM" -fill '#F2F6FF' -density 72 -pointsize $SUBTITLE_SIZE -draw "$SUBTITLE_TEXT_COMMAND" $OUTPUT_PATH + + convert $OUTPUT_PATH \ + -interline-spacing 0 \ + -font "RobotoB" \ + -fill '#F2F6FF' \ + -size 640x \ + -density 72 \ + -pointsize 80 \ + -background none \ + caption:"$TITLE_TEXT" \ + -geometry '+64+280' \ + -composite \ + $OUTPUT_PATH +else + TEMPLATE_PATH="$SCRIPT_DIR/backgrounds/empty.png" + + echo $MAGICK_FONT_PATH + + convert $TEMPLATE_PATH -font "RobotoMonoM" -fill '#F2F6FF' -density 72 -pointsize $SUBTITLE_SIZE -draw "$SUBTITLE_TEXT_COMMAND" $OUTPUT_PATH + + convert $OUTPUT_PATH \ + -interline-spacing 0 \ + -font "RobotoB" \ + -fill '#F2F6FF' \ + -size 640x \ + -density 72 \ + -pointsize 80 \ + -background none \ + caption:"$TITLE_TEXT" \ + -geometry '+64+280' \ + -composite \ + $OUTPUT_PATH + + convert $BACKGROUND_PATH $OUTPUT_PATH -gravity center -resize '1280x640' -composite $OUTPUT_PATH +fi + + diff --git a/automation/template/backgrounds/bg_a.png b/automation/template/backgrounds/bg_a.png new file mode 100644 index 000000000..4d6c1e365 Binary files /dev/null and b/automation/template/backgrounds/bg_a.png differ diff --git a/automation/template/backgrounds/bg_b.png b/automation/template/backgrounds/bg_b.png new file mode 100644 index 000000000..6fa86424f Binary files /dev/null and b/automation/template/backgrounds/bg_b.png differ diff --git a/automation/template/backgrounds/bg_c.png b/automation/template/backgrounds/bg_c.png new file mode 100644 index 000000000..6e9cae215 Binary files /dev/null and b/automation/template/backgrounds/bg_c.png differ diff --git a/automation/template/backgrounds/bg_d.png b/automation/template/backgrounds/bg_d.png new file mode 100644 index 000000000..065fba6bd Binary files /dev/null and b/automation/template/backgrounds/bg_d.png differ diff --git a/automation/template/backgrounds/bg_e.png b/automation/template/backgrounds/bg_e.png new file mode 100644 index 000000000..5c91e2c22 Binary files /dev/null and b/automation/template/backgrounds/bg_e.png differ diff --git a/automation/template/backgrounds/bg_f.png b/automation/template/backgrounds/bg_f.png new file mode 100644 index 000000000..32ddd552a Binary files /dev/null and b/automation/template/backgrounds/bg_f.png differ diff --git a/automation/template/backgrounds/bg_g.png b/automation/template/backgrounds/bg_g.png new file mode 100644 index 000000000..3f35fabb5 Binary files /dev/null and b/automation/template/backgrounds/bg_g.png differ diff --git a/automation/template/backgrounds/bg_h.png b/automation/template/backgrounds/bg_h.png new file mode 100644 index 000000000..70cd85c37 Binary files /dev/null and b/automation/template/backgrounds/bg_h.png differ diff --git a/automation/template/backgrounds/bg_i.png b/automation/template/backgrounds/bg_i.png new file mode 100644 index 000000000..c82f13d06 Binary files /dev/null and b/automation/template/backgrounds/bg_i.png differ diff --git a/automation/template/backgrounds/bg_j.png b/automation/template/backgrounds/bg_j.png new file mode 100644 index 000000000..229aa27a4 Binary files /dev/null and b/automation/template/backgrounds/bg_j.png differ diff --git a/automation/template/backgrounds/bg_k.png b/automation/template/backgrounds/bg_k.png new file mode 100644 index 000000000..5fcdf48a3 Binary files /dev/null and b/automation/template/backgrounds/bg_k.png differ diff --git a/automation/template/backgrounds/bg_l.png b/automation/template/backgrounds/bg_l.png new file mode 100644 index 000000000..fb9e3fe89 Binary files /dev/null and b/automation/template/backgrounds/bg_l.png differ diff --git a/automation/template/backgrounds/empty.png b/automation/template/backgrounds/empty.png new file mode 100644 index 000000000..764316c37 Binary files /dev/null and b/automation/template/backgrounds/empty.png differ diff --git a/automation/template/fonts/LICENSE.txt b/automation/template/fonts/LICENSE.txt new file mode 100644 index 000000000..75b52484e --- /dev/null +++ b/automation/template/fonts/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/automation/template/fonts/README.txt b/automation/template/fonts/README.txt new file mode 100644 index 000000000..de6327473 --- /dev/null +++ b/automation/template/fonts/README.txt @@ -0,0 +1,77 @@ +Roboto Mono Variable Font +========================= + +This download contains Roboto Mono as both variable fonts and static fonts. + +Roboto Mono is a variable font with this axis: + wght + +This means all the styles are contained in these files: + RobotoMono-VariableFont_wght.ttf + RobotoMono-Italic-VariableFont_wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Roboto Mono: + static/RobotoMono-Thin.ttf + static/RobotoMono-ExtraLight.ttf + static/RobotoMono-Light.ttf + static/RobotoMono-Regular.ttf + static/RobotoMono-Medium.ttf + static/RobotoMono-SemiBold.ttf + static/RobotoMono-Bold.ttf + static/RobotoMono-ThinItalic.ttf + static/RobotoMono-ExtraLightItalic.ttf + static/RobotoMono-LightItalic.ttf + static/RobotoMono-Italic.ttf + static/RobotoMono-MediumItalic.ttf + static/RobotoMono-SemiBoldItalic.ttf + static/RobotoMono-BoldItalic.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (LICENSE.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/automation/template/fonts/Roboto-Black.ttf b/automation/template/fonts/Roboto-Black.ttf new file mode 100644 index 000000000..0112e7da6 Binary files /dev/null and b/automation/template/fonts/Roboto-Black.ttf differ diff --git a/automation/template/fonts/Roboto-BlackItalic.ttf b/automation/template/fonts/Roboto-BlackItalic.ttf new file mode 100644 index 000000000..b2c6aca57 Binary files /dev/null and b/automation/template/fonts/Roboto-BlackItalic.ttf differ diff --git a/automation/template/fonts/Roboto-Bold.ttf b/automation/template/fonts/Roboto-Bold.ttf new file mode 100644 index 000000000..43da14d84 Binary files /dev/null and b/automation/template/fonts/Roboto-Bold.ttf differ diff --git a/automation/template/fonts/Roboto-BoldItalic.ttf b/automation/template/fonts/Roboto-BoldItalic.ttf new file mode 100644 index 000000000..bcfdab431 Binary files /dev/null and b/automation/template/fonts/Roboto-BoldItalic.ttf differ diff --git a/automation/template/fonts/Roboto-Italic.ttf b/automation/template/fonts/Roboto-Italic.ttf new file mode 100644 index 000000000..1b5eaa361 Binary files /dev/null and b/automation/template/fonts/Roboto-Italic.ttf differ diff --git a/automation/template/fonts/Roboto-Light.ttf b/automation/template/fonts/Roboto-Light.ttf new file mode 100644 index 000000000..e7307e72c Binary files /dev/null and b/automation/template/fonts/Roboto-Light.ttf differ diff --git a/automation/template/fonts/Roboto-LightItalic.ttf b/automation/template/fonts/Roboto-LightItalic.ttf new file mode 100644 index 000000000..2d277afb2 Binary files /dev/null and b/automation/template/fonts/Roboto-LightItalic.ttf differ diff --git a/automation/template/fonts/Roboto-Medium.ttf b/automation/template/fonts/Roboto-Medium.ttf new file mode 100644 index 000000000..ac0f908b9 Binary files /dev/null and b/automation/template/fonts/Roboto-Medium.ttf differ diff --git a/automation/template/fonts/Roboto-MediumItalic.ttf b/automation/template/fonts/Roboto-MediumItalic.ttf new file mode 100644 index 000000000..fc36a4785 Binary files /dev/null and b/automation/template/fonts/Roboto-MediumItalic.ttf differ diff --git a/automation/template/fonts/Roboto-Regular.ttf b/automation/template/fonts/Roboto-Regular.ttf new file mode 100644 index 000000000..ddf4bfacb Binary files /dev/null and b/automation/template/fonts/Roboto-Regular.ttf differ diff --git a/automation/template/fonts/Roboto-Thin.ttf b/automation/template/fonts/Roboto-Thin.ttf new file mode 100644 index 000000000..2e0dee6a8 Binary files /dev/null and b/automation/template/fonts/Roboto-Thin.ttf differ diff --git a/automation/template/fonts/Roboto-ThinItalic.ttf b/automation/template/fonts/Roboto-ThinItalic.ttf new file mode 100644 index 000000000..084f9c0f5 Binary files /dev/null and b/automation/template/fonts/Roboto-ThinItalic.ttf differ diff --git a/automation/template/fonts/RobotoMono-Italic-VariableFont_wght.ttf b/automation/template/fonts/RobotoMono-Italic-VariableFont_wght.ttf new file mode 100644 index 000000000..31c87fc07 Binary files /dev/null and b/automation/template/fonts/RobotoMono-Italic-VariableFont_wght.ttf differ diff --git a/automation/template/fonts/RobotoMono-VariableFont_wght.ttf b/automation/template/fonts/RobotoMono-VariableFont_wght.ttf new file mode 100644 index 000000000..1d5371e6b Binary files /dev/null and b/automation/template/fonts/RobotoMono-VariableFont_wght.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-Bold.ttf b/automation/template/fonts/static/RobotoMono-Bold.ttf new file mode 100644 index 000000000..8eff26c1e Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-Bold.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-BoldItalic.ttf b/automation/template/fonts/static/RobotoMono-BoldItalic.ttf new file mode 100644 index 000000000..99299640b Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-BoldItalic.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-ExtraLight.ttf b/automation/template/fonts/static/RobotoMono-ExtraLight.ttf new file mode 100644 index 000000000..e788efeaf Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-ExtraLight.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-ExtraLightItalic.ttf b/automation/template/fonts/static/RobotoMono-ExtraLightItalic.ttf new file mode 100644 index 000000000..142bb800b Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-ExtraLightItalic.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-Italic.ttf b/automation/template/fonts/static/RobotoMono-Italic.ttf new file mode 100644 index 000000000..cf2b5b39c Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-Italic.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-Light.ttf b/automation/template/fonts/static/RobotoMono-Light.ttf new file mode 100644 index 000000000..f03a2b9e4 Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-Light.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-LightItalic.ttf b/automation/template/fonts/static/RobotoMono-LightItalic.ttf new file mode 100644 index 000000000..acda3b80f Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-LightItalic.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-Medium.ttf b/automation/template/fonts/static/RobotoMono-Medium.ttf new file mode 100644 index 000000000..752d0fab7 Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-Medium.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-MediumItalic.ttf b/automation/template/fonts/static/RobotoMono-MediumItalic.ttf new file mode 100644 index 000000000..03c2f693e Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-MediumItalic.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-Regular.ttf b/automation/template/fonts/static/RobotoMono-Regular.ttf new file mode 100644 index 000000000..d9371a1bd Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-Regular.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-SemiBold.ttf b/automation/template/fonts/static/RobotoMono-SemiBold.ttf new file mode 100644 index 000000000..06aea97f3 Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-SemiBold.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-SemiBoldItalic.ttf b/automation/template/fonts/static/RobotoMono-SemiBoldItalic.ttf new file mode 100644 index 000000000..72b0fc6d9 Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-SemiBoldItalic.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-Thin.ttf b/automation/template/fonts/static/RobotoMono-Thin.ttf new file mode 100644 index 000000000..388700f23 Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-Thin.ttf differ diff --git a/automation/template/fonts/static/RobotoMono-ThinItalic.ttf b/automation/template/fonts/static/RobotoMono-ThinItalic.ttf new file mode 100644 index 000000000..b33bd28e4 Binary files /dev/null and b/automation/template/fonts/static/RobotoMono-ThinItalic.ttf differ diff --git a/automation/template/fonts/type.xml b/automation/template/fonts/type.xml new file mode 100644 index 000000000..d480e1800 --- /dev/null +++ b/automation/template/fonts/type.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/automation/template/imagick_type_gen b/automation/template/imagick_type_gen new file mode 100755 index 000000000..d0ae48379 --- /dev/null +++ b/automation/template/imagick_type_gen @@ -0,0 +1,555 @@ +#!/usr/bin/perl -w +# +# Usage: $prog > ~/.magick/type.xml +# $prog [-d] font1.ttf font2.ttf ... > type.xml +# $prog -f ttf_font_file_list > type.xml +# +# Generate an ImageMagick font list "type.xml" file for ALL fonts +# currently on the local linux system. This includes +# True Type Fonts (ttf) +# Open Type Fonts (otf) +# Ghostscript Adobe Fonts (afm) +# +# The output can be saved into files in the ".magick" sub-directory of +# your home, to be referenced by, or replacing the "type.xml" file. +# +# This file informs ImageMagick of the fonts location, font type, name and +# family. It also trys its best to clean up the name to provide a 'nicer' +# one for you to magick identify the various fonts. +# +# On Linux system the scritp uses the "locate" command to find the fonts. +# If you recently added fonts you should run "updatedb" first. +# +# On MacOSX only the fonts stored in /Library/Fonts are looked for. +# That is the script is equivelent to doing... +# +# find /Library/Fonts -type f -name '*.*' | \ +# imagick_type_gen -f - > type.xml +# +# When the "type.xml" font definitions file has been generated and +# installed, should then see a list of the fonts found with... +# magick -list font +# +# And can use the fonts, by name, with commands like... +# magick -font Candice -pointsize 72 label:Anthony x: +# +# Instead of having to specifying TTF font file directly... +# magick -font ~/lib/font/truetype/favoriate/candice.ttf \ +# -pointsize 72 label:Anthony x: +# +# Also see the script "show_fonts" which displays a sample image either +# a IM defined font, or the given font files. The "graphics_utf" script +# may also be useful to look at specific UTF character sections of a +# specific font, such as Math symbols. +# +# Anthony Thyssen May 2003 - Updated Feburary 2017 +# +### +# +# Example use, seperating system from personal fonts so the later +# overrides the former (of the same font exists) +# +# For example... +# +# # Find personal fonts +# find $HOME/fonts -type f -name '*.ttf' | \ +# imagick_type_gen -f - > ~/.magick/type-myfonts.xml +# +# # Find System Fonts - then remove personal fonts from that list +# sudo updatedb +# imagick_type_gen > ~/.magick/type-system.xml +# perl -00 -i -ne "m%glyphs=\"$HOME/% || print" ~/.magick/type-system.xml +# +# You can then include both of these files into a "~/.magick/type.xml" +# so that the person +# +# +# +# +# +# +# Note that later defintions will override earlier ones. As such "myfonts" +# will override any "system" font. However any fonts that the IM system +# configures in /usr/lib/ImageMagick-*/config/type*.xml will override the +# both the above definitions, though that is unlikely. +# +### +# Internal Notes and History +# +# Primary Source +# http://www.imagemagick.org/Usage/scripts/imagick_type_gen +# +# Originally the script used an external tool to read TTF fonts, but now +# that is built-in thanks to Peter N Lewis +# +# Before IM v6.1.2-3 the font list file was called "type.mgk" and +# not "type.xml". And you would use "-list type" instead of "-list font" +# +# The original version of this script was found on +# http://studio.imagemagick.org/pipermail/magick-users/2003-March/001703.html +# by raptor , presumaibly around March 2002 +# +# Re-Write by Anthony Thyssen , August 2002 +# May 2003 Update with TTF family names +# Oct 2005 Update to use "getttinfo" if available +# Jan 2009 updated +# Feb 2017 merge bug report from Kazuyoshi Tlacaelel +# +# WARNING: Input arguments are NOT tested for correctness. +# This script represents a security risk if used ONLINE. +# I accept no responsiblity for misuse. Use at own risk. +# +### +use strict; +use FindBin; +my $PROGNAME = $FindBin::Script; +use Fcntl qw( O_RDONLY SEEK_SET ); +binmode(STDOUT, ":utf8"); +binmode(STDERR, ":utf8"); + +my $VERBOSE = 0; # verbose output of fonts found +my $DEBUG = 0; # debug TTF file decoding +my $FILE = 0; # read a font list from a file (maybe stdin) + +# ====================================================================== +# Font Handling... +# ====================================================================== +# +# True Type fonts Handling +# +my $ttf_template = herefile( q{ + | + }); +my $ttf_template_full = herefile( q{ + | + }); + +sub ttf_file_parse { + # + # Method for Parsing TTF files curtesy of + # Peter N Lewis + # + my $file = $_[0]; + my ( $font_family, $font_fullname, $font_psname ) = ( '','','','' ); + + my ( $fh, $len ); + unless ( sysopen( $fh, $file, O_RDONLY ) ) { + warn "Cannot open $file: $!\n"; + return; + } + my $header; + unless ( sysread( $fh, $header, 12 ) ) { + warn "Cant read header: $file"; + close($fh); + return; + } + my ( $sfnt_version, $numTables, $searchRange, $entrySelector, $rangeShift + ) = unpack( 'Nnnnn', $header ); + + my $sfnt_version_code = unpack( 'A4', $header ); + unless ( $sfnt_version == 0x00010000 + || $sfnt_version_code eq 'true' + || $sfnt_version_code eq 'typ1' ) { + warn "TTF Version mismatch, not a basic TrueType font file: $file"; + close($fh); + return; + } + + print STDERR "TTF Table count: $numTables\n" if $DEBUG>=2; + foreach ( 1..$numTables ) { + my $table_entry; + unless ( sysread( $fh, $table_entry, 16 ) ) { + warn "Cant read master table $_ from $file"; + last; + } + + my ( $table_tag, $table_checkSum, $table_offset, $table_length + ) = unpack( 'A4NNN', $table_entry ); + print STDERR "Table: $table_tag\n" if $DEBUG>=2; + $table_tag eq 'name' or next; + + my $table_header; + sysseek( $fh, $table_offset, SEEK_SET ) or die "Can't seek: $file"; + sysread( $fh, $table_header, 6 ); + my ( $table_format, $table_count, $table_stringOffset + ) = unpack( 'nnn', $table_header ); + print STDERR "Name Table Entries: $table_count\n" if $DEBUG>=2; + my $table_base = $table_offset + 6; + my $storage_base = $table_base + $table_count * 12; + + foreach my $index ( 1..$table_count ) { + my $entry; + sysseek( $fh, $table_base + ($index-1)*12, SEEK_SET ) + or die "Cant seek: $file"; + sysread( $fh, $entry, 12 ); + my ( $name_platformID, $name_encodingID, $name_languageID, + $name_id, $name_length, $name_offset + ) = unpack( 'nnnnnn', $entry ); + print STDERR "Index[$index]: ", join ( ", ", + $name_platformID, $name_encodingID, $name_languageID, + $name_id, $name_length, $name_offset ), "\n" if $DEBUG>=2; + # + # ID meanings : figured out from getttinfo + # + # Platform: 0=Apple 1=macintosh 3=microsoft + # Encoding: 0=unicode(8) 1=unicode(16) + # Language: 0=english 1033=English-US 1041=Japanese 2052=Chinese + # + next unless $name_languageID == 0 + || $name_languageID == 1033 + ; + + my $name; + sysseek( $fh, $storage_base + $name_offset, SEEK_SET ) + or die "Cant seek: $file"; + sysread( $fh, $name, $name_length ); + + # Decode UTF-16 to UTF-8 if nessary + $name = pack("U*",unpack("n*", $name)) if $name_encodingID == 1; + $name =~ s/\0//g; # clean fonts use UTF-16 when it should be UTF-8 + print STDERR "$name\n" if $DEBUG>=2; + + $font_family = $name if $name_id == 1; + #font_subfamily = $name if $name_id == 2; # (EG: Regular) + #font_identifier = $name if $name_id == 3; # Unique Name + $font_fullname = $name if $name_id == 4; + #font_version = $name if $name_id == 5; + $font_psname = $name if $name_id == 6; # Postscipt Name + #font_trademark = $name if $name_id == 7; + #font_manufacturer = $name if $name_id == 8; + #font_designer = $name if $name_id == 9; + } + last; # found "name" table -- skip any other tables as irrelevent + } + close( $fh ); + return ( $font_family, $font_fullname, $font_psname ); +} + +sub ttf_name { + my $file = shift; + + my ( $family, $fullname, $psname ) = &ttf_file_parse( $file ); + print STDERR "$file\n\t==> $family -- $fullname -- $psname\n" if $DEBUG; + + $fullname =~ s/[^\s\w-]//g; # Check: Pepsi.ttf + $fullname =~ s/^\s+//; + $fullname =~ s/\s+$//; + $fullname =~ s/(^|\s)-/$1/g; + $fullname =~ s/-(\s|$)/$1/g; + + $family =~ s/[^\s\w-]//g; # Check: Pepsi.ttf + $family =~ s/^\s*//; + $family =~ s/\s*$//; + $family =~ s/\s*(MS|ITC)$//; # font factory ititials + $family =~ s/^(MS|ITC)\s*//; + $family =~ s/\s*(FB|MT)\s*/ /; # Check: MaturaScriptCapitals + $family =~ s/^Monotype\s*//; # Check: Corsiva + $family =~ s/^AR PL\s*//; # Check: gkai00mp.ttf + $family =~ s/\sBV$//; # Check: CandyStore.ttf + + # Determine simple font name + # Junk/abbr decriptive strings, foundaries, etc + # Test with the fonts given + my $name = ($fullname); + $name =~ s/-/ /g; + $name =~ s/\s*(MS|ITC)$//; # font factory ititials + $name =~ s/^(MS|ITC)\s*//; + $name =~ s/\s*(FB|MT)\s*/ /; # Check: MaturaScriptCapitals + $name =~ s/^Monotype\s*//; # Check: Corsiva + $name =~ s/^AR PL\s*//; # Check: gkai00mp.ttf + $name =~ s/^TTF_//; # Check: TattoEF.tff + $name =~ s/^HE_//; # Check: Terminal.tff + $name =~ s/^KR\s//; # Check: SimpleFleur*.ttf + $name =~ s/\sBT$//; # Check: Amazone.ttf + $name =~ s/\sBV$//; # Check: CandyStore.ttf + $name =~ s/\sFM$//; # Check: CactusSandwich.ttf + $name =~ s/\sNFI$//; # Check: Zreaks.ttf + $name =~ s/SSK$//; # Check: BravoScript.ttf + + $name =~ s/Regular//g; # Check: Gecko + $name =~ s/\bPlain\b//g; # Check: LittleGidding + $name =~ s/\bReg\b//g; # Check: agencyr.ttf + $name =~ s/\bNormal\b//g; + #$name =~ s/\bSans\b//g; + $name =~ s/\bDemi\s*[Bb]old\b/Db/g; + $name =~ s/\bCondensed\b/C/g; + $name =~ s/\bBold\b/B/g; + $name =~ s/\bItalic\b/I/g; + $name =~ s/\bExtra[Bb]old\b/Xb/g; + $name =~ s/\bBlack\b/Bk/g; + $name =~ s/\bHeavy\b/H/g; + $name =~ s/\bMedium\b/M/g; # Check: gkai00mp.ttf + $name =~ s/\bLight\b/L/g; + $name =~ s/\bOblique\b/Ob/g; + $name =~ s/\bUnregistered\b//g; # Check: CandyCane.ttf + + $name =~ s/\s+//g; # Remove all spaces + + # Special Case Renaming + $name = "Dot" if $name eq "NationalFirstFontDotted"; + + $fullname =~ s/\s+/ /g; + $fullname =~ s/\s$//; + $fullname =~ s/^\s//; + + # Failed to parse TTF file? + return( ( $file =~ m/^.*\/(.*?).ttf$/ )[0] ) unless $name; + + return ($name, $fullname, $family); # return the name if found! +} + +sub do_ttf_font { + my $file = shift; + my (@ttf) = ttf_name($file); + + print STDERR join( ' - ', @ttf), "\n" if $VERBOSE; + printf $ttf_template, @ttf, $file if @ttf == 1; + printf $ttf_template_full, @ttf, $file if @ttf == 3; +} + + +#--------------------------- +# +# Open Type fonts +# +# I do not know how to parse OTF files (yet) +# so we are stuck with just the filebame +# +my $otf_template = herefile( q{ + | + }); + +sub do_otf_font { + my $file = shift; + + my $name = $file; + $name =~ s/^.*\///; + $name =~ s/\.otf$//; + + $name =~ s/-?Regular//g; + $name =~ s/-?Bold?/B/g; + $name =~ s/-?Italic/I/g; + $name =~ s/-?Ita?/I/g; + $name =~ s/-?Oblique/Ob/g; + + print STDERR join( ' - ', $name ), "\n" if $VERBOSE; + printf $otf_template, $name, $file; +} + + +#--------------------------- +# +# Adobe Type fonts +# +# Get font name from the AFM file +my $afm_template_full = herefile( q{ + | + }); + +sub afm_name { + my $file = shift; + + my( $name, $fullname, $family ) = ('','',''); + if ( open AFM, $file ) { + while( ) { + chop; last if /^StartCharMetrics/; + #$name = $1 if /^FontName (.*)/; + $fullname = $1 if /^FullName (.*)/; + $family = $1 if /^FamilyName (.*)/; + } + close AFM; + + $family =~ s/\s*L$//; # just the stupid 'L' + $fullname =~ s/\bL\b//; + + $name = $fullname; + + $name =~ s/\bRegular\b//; # Junk/abbr decriptive strings + $name =~ s/\bDemi\s*[Bb]old\b/Db/g; + $name =~ s/\bDemi\s*[Oo]blique\b/Do/g; + $name =~ s/\bCondensed\b/C/g; + $name =~ s/\bBold\b/B/g; + $name =~ s/\bItalic\b/I/g; + $name =~ s/\bOblique\b/Ob/g; + $name =~ s/\bExtra[Bb]old\b/Xb/g; + $name =~ s/\bBlack\b/Bk/g; + $name =~ s/\bHeavy\b/H/g; + $name =~ s/\bMedium\b/M/g; + $name =~ s/\bLight\b/L/g; + + $name =~ s/[-\s]+//g; + $fullname =~ s/\s+/ /g; + $fullname =~ s/\s$//g; + $fullname =~ s/^\s//g; + } else { + warn "Cannot open $file"; + } + + return ($name, $fullname, $family ) if $name && $fullname && $family; +} + +sub do_afm_fonts { + my %atf; + # locate abode font files + map { my ($k) = m/^(.*?).pfb*$/i; $atf{lc($k)}{pfb} = $_ } locate('pfb'); + map { my ($k) = m/^(.*?).afm*$/i; $atf{lc($k)}{afm} = $_ } locate('afm'); + + # for each Abode font where BOTH files were found. + for my $key (keys %atf) { + next unless $atf{$key}{pfb} && $atf{$key}{afm}; + my (@afm) = afm_name($atf{$key}{afm}); + + #print STDERR join( ' - ', @afm), "\n" if $VERBOSE; + printf $afm_template_full, @afm, $atf{$key}{pfb}, $atf{$key}{afm} + if @afm == 3; + } +} + +# ====================================================================== +# Option Handling... +# ====================================================================== + +sub Usage { + print STDERR @_, "\n" if @_; + @ARGV = ( "$FindBin::Bin/$PROGNAME" ); + while( <> ) { + next if 1 .. 2; + last if /^###/; + last unless /^#/; + s/^#$//; s/^# //; + last if /^$/; + print STDERR $. == 3 ? "Usage: $_" + : " $_"; + } + print STDERR "For full manual use --help\n"; + exit 10; +} +sub Help { + @ARGV = ( "$FindBin::Bin/$PROGNAME" ); + while( <> ) { + next if $. == 1; + last if /^###/; + last unless /^#/; + s/^#$//; s/^# //; + print STDERR; + } + exit 10; +} + +sub do_font { + local $_ = shift; + + if ( /\.ttf$/i ) { + do_ttf_font($_) + } + elsif ( $_ =~ /\.otf$/i ) { + do_otf_font($_) + } + else { + print STDERR "$PROGNAME: \"$_\" skipped, unknown suffix\n"; + } +} + +sub locate { + # Locate font files with the given suffix + my $suffix = shift; + + if ( -d "/Library/Fonts" ) { # We must be on MacOSX! + # Use a 'find' to discover fonts in that directory only + # Find method from Kazuyoshi Tlacaelel - Feb 2017 + return grep { /\.$suffix$/i && -f $_ } + split( "\n", `find /Library/Fonts -type f -name '*.*'` ); + # map { glob "$_" } # Use glob to expand '?' in locate output + # split "\n", `locate -i '.$_[0]'`; # alternative + } + # All linux system run updatedb and locate - so ask it + return split('\0', `locate -0ier '\\.$suffix\$'`); + + #return grep { /\.$_[0]$/i && -f $_ } + # map { glob "$_" } + # split "\n", `find /Library/Fonts -name '*.*'`; +} + +sub herefile { # Handle a multi-line quoted indented string + my $string = shift; + $string =~ s/^\s*//; # remove start spaces + $string =~ s/^\s*\| ?//gm; # remove line starts + $string =~ s/\s*$/\n/g; # remove end spaces + return $string; +} + +OPTION: # Multi-switch option handling +while( @ARGV && $ARGV[0] =~ s/^-(?=.)// ) { + $_ = shift; { + m/^$/ && do { next }; # Next option + m/^-$/ && do { last }; # End of options '--' + m/^\?/ && do { Help }; # Usage Help '-?' + m/^-?(help|doc|man|manual)$/ && Help; # Print help manual comments + + s/^d// && do { $DEBUG++; redo }; # \ + s/^v// && do { $VERBOSE++; redo }; # / + s/^f// && do { $FILE++; redo }; # / + + Usage( "$PROGNAME: Unknown Option \"-$_\"" ); + } continue { next OPTION }; last OPTION; +} + +print herefile( q{ + | + | +}); + +if ( $FILE ) { + while( <> ) { + s/#.*$//; # ignore comments + s/\s+$//; # remove end of line spaces + next if /^$/; # skip blank lines + + do_font($_); + } +} +elsif ( @ARGV ) { + # TTF font filenames as arguments + for ( @ARGV ) { + do_font($_); + } +} else { + + # Generate the "type.xml" file using "locate" + print STDERR "Doing TTF fonts\n" if $VERBOSE; + for ( locate('ttf') ) { + do_ttf_font($_); + } + print STDERR "Doing OTF fonts\n" if $VERBOSE; + for ( locate('otf') ) { + do_otf_font($_); + } + print STDERR "Doing ATM fonts\n" if $VERBOSE; + do_afm_fonts(); +} + +print "\n"; + + +# ---------------------------------------------------------------------------- diff --git a/qdrant-landing/README.md b/qdrant-landing/README.md index c36900f61..40ddc82d3 100644 --- a/qdrant-landing/README.md +++ b/qdrant-landing/README.md @@ -44,6 +44,14 @@ keywords: # Keywords for SEO --- ``` +## Preview image mechanism + +Preview image for each page is selected based from the following places in the following order: + +- If document has param `social_preview_image` - it will be used as preview image +- If there is a file `static//-social-preview.png` - it will be used as preview image +- Global `preview_image = "/images/social_preview.png"` will be used as preview image + ## Article preview Article preview is a set of images that will be used in the article preview. They can be generated from one image. To generate preview images, you need to have [ImageMagick](https://imagemagick.org/index.php) and [cwebp](https://developers.google.com/speed/webp/download) installed. @@ -99,6 +107,26 @@ hideInSidebar: true # Optional. If true, the page will not be shown in the sideb --- ``` +## Preview images for documentation pages + +Branded individual preview images for documentation pages might be auto-generated using the following command: + +(from the root of the project) + +```bash +bash -x automation/generate-all-docs-preview.sh +``` + +It will automatically insert documentation Section name and Title of the page into the preview. +If there is a custom background for the image - it should be placed in the `static/documentation//-bg.png`. + + +If there is no custom background - random default background will be used. + +Generated images will be placed in the `static/documentation//-social-preview.png`. + +To re-generate preview image, remove the previously generated one and run the command again. + ## Documentation sidebar ### Delimiter diff --git a/qdrant-landing/static/documentation/0-dl-social-preview.png b/qdrant-landing/static/documentation/0-dl-social-preview.png new file mode 100644 index 000000000..13215929e Binary files /dev/null and b/qdrant-landing/static/documentation/0-dl-social-preview.png differ diff --git a/qdrant-landing/static/documentation/1-dl-social-preview.png b/qdrant-landing/static/documentation/1-dl-social-preview.png new file mode 100644 index 000000000..0fec3bf2f Binary files /dev/null and b/qdrant-landing/static/documentation/1-dl-social-preview.png differ diff --git a/qdrant-landing/static/documentation/2-dl-social-preview.png b/qdrant-landing/static/documentation/2-dl-social-preview.png new file mode 100644 index 000000000..8098a28ec Binary files /dev/null and b/qdrant-landing/static/documentation/2-dl-social-preview.png differ diff --git a/qdrant-landing/static/documentation/_index-social-preview.png b/qdrant-landing/static/documentation/_index-social-preview.png new file mode 100644 index 000000000..e1ef28412 Binary files /dev/null and b/qdrant-landing/static/documentation/_index-social-preview.png differ diff --git a/qdrant-landing/static/documentation/api-reference-social-preview.png b/qdrant-landing/static/documentation/api-reference-social-preview.png new file mode 100644 index 000000000..90d2458ea Binary files /dev/null and b/qdrant-landing/static/documentation/api-reference-social-preview.png differ diff --git a/qdrant-landing/static/documentation/benchmarks-social-preview.png b/qdrant-landing/static/documentation/benchmarks-social-preview.png new file mode 100644 index 000000000..dbf2313d8 Binary files /dev/null and b/qdrant-landing/static/documentation/benchmarks-social-preview.png differ diff --git a/qdrant-landing/static/documentation/cloud/_index-social-preview.png b/qdrant-landing/static/documentation/cloud/_index-social-preview.png new file mode 100644 index 000000000..144b4a7bb Binary files /dev/null and b/qdrant-landing/static/documentation/cloud/_index-social-preview.png differ diff --git a/qdrant-landing/static/documentation/cloud/backups-social-preview.png b/qdrant-landing/static/documentation/cloud/backups-social-preview.png new file mode 100644 index 000000000..c2ea466ee Binary files /dev/null and b/qdrant-landing/static/documentation/cloud/backups-social-preview.png differ diff --git a/qdrant-landing/static/documentation/cloud/capacity-social-preview.png b/qdrant-landing/static/documentation/cloud/capacity-social-preview.png new file mode 100644 index 000000000..cc45fd0c5 Binary files /dev/null and b/qdrant-landing/static/documentation/cloud/capacity-social-preview.png differ diff --git a/qdrant-landing/static/documentation/cloud/cloud-quick-start-social-preview.png b/qdrant-landing/static/documentation/cloud/cloud-quick-start-social-preview.png new file mode 100644 index 000000000..b0921d32d Binary files /dev/null and b/qdrant-landing/static/documentation/cloud/cloud-quick-start-social-preview.png differ diff --git a/qdrant-landing/static/documentation/cloud/cluster-scaling-social-preview.png b/qdrant-landing/static/documentation/cloud/cluster-scaling-social-preview.png new file mode 100644 index 000000000..d7dbcd98c Binary files /dev/null and b/qdrant-landing/static/documentation/cloud/cluster-scaling-social-preview.png differ diff --git a/qdrant-landing/static/documentation/community-links-social-preview.png b/qdrant-landing/static/documentation/community-links-social-preview.png new file mode 100644 index 000000000..2109087cc Binary files /dev/null and b/qdrant-landing/static/documentation/community-links-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/_index-social-preview.png b/qdrant-landing/static/documentation/concepts/_index-social-preview.png new file mode 100644 index 000000000..ab448dda9 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/_index-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/collections-bg.png b/qdrant-landing/static/documentation/concepts/collections-bg.png new file mode 100644 index 000000000..1fc64036a Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/collections-bg.png differ diff --git a/qdrant-landing/static/documentation/concepts/collections-social-preview.png b/qdrant-landing/static/documentation/concepts/collections-social-preview.png new file mode 100644 index 000000000..a16f7f162 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/collections-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/filtering-bg.png b/qdrant-landing/static/documentation/concepts/filtering-bg.png new file mode 100644 index 000000000..84e8b8724 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/filtering-bg.png differ diff --git a/qdrant-landing/static/documentation/concepts/filtering-social-preview.png b/qdrant-landing/static/documentation/concepts/filtering-social-preview.png new file mode 100644 index 000000000..f03a9acf1 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/filtering-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/indexing-bg.png b/qdrant-landing/static/documentation/concepts/indexing-bg.png new file mode 100644 index 000000000..c8620421f Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/indexing-bg.png differ diff --git a/qdrant-landing/static/documentation/concepts/indexing-social-preview.png b/qdrant-landing/static/documentation/concepts/indexing-social-preview.png new file mode 100644 index 000000000..5c6ffdb6b Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/indexing-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/optimizer-bg.png b/qdrant-landing/static/documentation/concepts/optimizer-bg.png new file mode 100644 index 000000000..20145305a Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/optimizer-bg.png differ diff --git a/qdrant-landing/static/documentation/concepts/optimizer-social-preview.png b/qdrant-landing/static/documentation/concepts/optimizer-social-preview.png new file mode 100644 index 000000000..eac201add Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/optimizer-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/payload-bg.png b/qdrant-landing/static/documentation/concepts/payload-bg.png new file mode 100644 index 000000000..82e757dd4 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/payload-bg.png differ diff --git a/qdrant-landing/static/documentation/concepts/payload-social-preview.png b/qdrant-landing/static/documentation/concepts/payload-social-preview.png new file mode 100644 index 000000000..c67d25ae5 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/payload-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/points-bg.png b/qdrant-landing/static/documentation/concepts/points-bg.png new file mode 100644 index 000000000..d1bf9cf1d Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/points-bg.png differ diff --git a/qdrant-landing/static/documentation/concepts/points-social-preview.png b/qdrant-landing/static/documentation/concepts/points-social-preview.png new file mode 100644 index 000000000..8dced09cc Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/points-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/search-bg.png b/qdrant-landing/static/documentation/concepts/search-bg.png new file mode 100644 index 000000000..317348cbb Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/search-bg.png differ diff --git a/qdrant-landing/static/documentation/concepts/search-social-preview.png b/qdrant-landing/static/documentation/concepts/search-social-preview.png new file mode 100644 index 000000000..b28369db6 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/search-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/snapshots-bg.png b/qdrant-landing/static/documentation/concepts/snapshots-bg.png new file mode 100644 index 000000000..f303ade24 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/snapshots-bg.png differ diff --git a/qdrant-landing/static/documentation/concepts/snapshots-social-preview.png b/qdrant-landing/static/documentation/concepts/snapshots-social-preview.png new file mode 100644 index 000000000..5f261b818 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/snapshots-social-preview.png differ diff --git a/qdrant-landing/static/documentation/concepts/storage-bg.png b/qdrant-landing/static/documentation/concepts/storage-bg.png new file mode 100644 index 000000000..c5bb8aae5 Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/storage-bg.png differ diff --git a/qdrant-landing/static/documentation/concepts/storage-social-preview.png b/qdrant-landing/static/documentation/concepts/storage-social-preview.png new file mode 100644 index 000000000..e0ab6dcee Binary files /dev/null and b/qdrant-landing/static/documentation/concepts/storage-social-preview.png differ diff --git a/qdrant-landing/static/documentation/contribution-guidelines-social-preview.png b/qdrant-landing/static/documentation/contribution-guidelines-social-preview.png new file mode 100644 index 000000000..54d62ee25 Binary files /dev/null and b/qdrant-landing/static/documentation/contribution-guidelines-social-preview.png differ diff --git a/qdrant-landing/static/documentation/examples-social-preview.png b/qdrant-landing/static/documentation/examples-social-preview.png new file mode 100644 index 000000000..f10b1233c Binary files /dev/null and b/qdrant-landing/static/documentation/examples-social-preview.png differ diff --git a/qdrant-landing/static/documentation/guides/_index-social-preview.png b/qdrant-landing/static/documentation/guides/_index-social-preview.png new file mode 100644 index 000000000..b8b8727f3 Binary files /dev/null and b/qdrant-landing/static/documentation/guides/_index-social-preview.png differ diff --git a/qdrant-landing/static/documentation/guides/administration-social-preview.png b/qdrant-landing/static/documentation/guides/administration-social-preview.png new file mode 100644 index 000000000..72aa2dc11 Binary files /dev/null and b/qdrant-landing/static/documentation/guides/administration-social-preview.png differ diff --git a/qdrant-landing/static/documentation/guides/configuration-social-preview.png b/qdrant-landing/static/documentation/guides/configuration-social-preview.png new file mode 100644 index 000000000..11d779128 Binary files /dev/null and b/qdrant-landing/static/documentation/guides/configuration-social-preview.png differ diff --git a/qdrant-landing/static/documentation/guides/distributed_deployment-social-preview.png b/qdrant-landing/static/documentation/guides/distributed_deployment-social-preview.png new file mode 100644 index 000000000..6030a6bdc Binary files /dev/null and b/qdrant-landing/static/documentation/guides/distributed_deployment-social-preview.png differ diff --git a/qdrant-landing/static/documentation/guides/installation-social-preview.png b/qdrant-landing/static/documentation/guides/installation-social-preview.png new file mode 100644 index 000000000..1a1485cb8 Binary files /dev/null and b/qdrant-landing/static/documentation/guides/installation-social-preview.png differ diff --git a/qdrant-landing/static/documentation/guides/monitoring-social-preview.png b/qdrant-landing/static/documentation/guides/monitoring-social-preview.png new file mode 100644 index 000000000..cb3f1511f Binary files /dev/null and b/qdrant-landing/static/documentation/guides/monitoring-social-preview.png differ diff --git a/qdrant-landing/static/documentation/guides/quantization-social-preview.png b/qdrant-landing/static/documentation/guides/quantization-social-preview.png new file mode 100644 index 000000000..b88d82824 Binary files /dev/null and b/qdrant-landing/static/documentation/guides/quantization-social-preview.png differ diff --git a/qdrant-landing/static/documentation/guides/security-social-preview.png b/qdrant-landing/static/documentation/guides/security-social-preview.png new file mode 100644 index 000000000..9af507281 Binary files /dev/null and b/qdrant-landing/static/documentation/guides/security-social-preview.png differ diff --git a/qdrant-landing/static/documentation/guides/telemetry-social-preview.png b/qdrant-landing/static/documentation/guides/telemetry-social-preview.png new file mode 100644 index 000000000..6dab1369c Binary files /dev/null and b/qdrant-landing/static/documentation/guides/telemetry-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/_index-social-preview.png b/qdrant-landing/static/documentation/integrations/_index-social-preview.png new file mode 100644 index 000000000..73edd24c0 Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/_index-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/aleph-alpha-social-preview.png b/qdrant-landing/static/documentation/integrations/aleph-alpha-social-preview.png new file mode 100644 index 000000000..f6d35b0a3 Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/aleph-alpha-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/cohere-social-preview.png b/qdrant-landing/static/documentation/integrations/cohere-social-preview.png new file mode 100644 index 000000000..0625f1d10 Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/cohere-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/docarray-social-preview.png b/qdrant-landing/static/documentation/integrations/docarray-social-preview.png new file mode 100644 index 000000000..331928f6e Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/docarray-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/fifty-one-social-preview.png b/qdrant-landing/static/documentation/integrations/fifty-one-social-preview.png new file mode 100644 index 000000000..accb701d9 Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/fifty-one-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/haystack-social-preview.png b/qdrant-landing/static/documentation/integrations/haystack-social-preview.png new file mode 100644 index 000000000..697ea9199 Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/haystack-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/langchain-social-preview.png b/qdrant-landing/static/documentation/integrations/langchain-social-preview.png new file mode 100644 index 000000000..ae18789f7 Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/langchain-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/llama-index-social-preview.png b/qdrant-landing/static/documentation/integrations/llama-index-social-preview.png new file mode 100644 index 000000000..9b0178674 Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/llama-index-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/openai-social-preview.png b/qdrant-landing/static/documentation/integrations/openai-social-preview.png new file mode 100644 index 000000000..2f3b54d83 Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/openai-social-preview.png differ diff --git a/qdrant-landing/static/documentation/integrations/txtai-social-preview.png b/qdrant-landing/static/documentation/integrations/txtai-social-preview.png new file mode 100644 index 000000000..ee229233c Binary files /dev/null and b/qdrant-landing/static/documentation/integrations/txtai-social-preview.png differ diff --git a/qdrant-landing/static/documentation/overview/_index-social-preview.png b/qdrant-landing/static/documentation/overview/_index-social-preview.png new file mode 100644 index 000000000..db35b4486 Binary files /dev/null and b/qdrant-landing/static/documentation/overview/_index-social-preview.png differ diff --git a/qdrant-landing/static/documentation/overview/vector-search-social-preview.png b/qdrant-landing/static/documentation/overview/vector-search-social-preview.png new file mode 100644 index 000000000..5ca115660 Binary files /dev/null and b/qdrant-landing/static/documentation/overview/vector-search-social-preview.png differ diff --git a/qdrant-landing/static/documentation/python-client-social-preview.png b/qdrant-landing/static/documentation/python-client-social-preview.png new file mode 100644 index 000000000..3a681fdc5 Binary files /dev/null and b/qdrant-landing/static/documentation/python-client-social-preview.png differ diff --git a/qdrant-landing/static/documentation/qdrant-alternatives-social-preview.png b/qdrant-landing/static/documentation/qdrant-alternatives-social-preview.png new file mode 100644 index 000000000..e0be09887 Binary files /dev/null and b/qdrant-landing/static/documentation/qdrant-alternatives-social-preview.png differ diff --git a/qdrant-landing/static/documentation/quick-start-social-preview.png b/qdrant-landing/static/documentation/quick-start-social-preview.png new file mode 100644 index 000000000..5f6dc7441 Binary files /dev/null and b/qdrant-landing/static/documentation/quick-start-social-preview.png differ diff --git a/qdrant-landing/static/documentation/release-notes-social-preview.png b/qdrant-landing/static/documentation/release-notes-social-preview.png new file mode 100644 index 000000000..dcb9e5f85 Binary files /dev/null and b/qdrant-landing/static/documentation/release-notes-social-preview.png differ diff --git a/qdrant-landing/static/documentation/roadmap-social-preview.png b/qdrant-landing/static/documentation/roadmap-social-preview.png new file mode 100644 index 000000000..34d8a51e4 Binary files /dev/null and b/qdrant-landing/static/documentation/roadmap-social-preview.png differ diff --git a/qdrant-landing/static/documentation/technical-support-social-preview.png b/qdrant-landing/static/documentation/technical-support-social-preview.png new file mode 100644 index 000000000..3ea6cdfc9 Binary files /dev/null and b/qdrant-landing/static/documentation/technical-support-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/_index-social-preview.png b/qdrant-landing/static/documentation/tutorials/_index-social-preview.png new file mode 100644 index 000000000..054ace743 Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/_index-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/aleph-alpha-search-social-preview.png b/qdrant-landing/static/documentation/tutorials/aleph-alpha-search-social-preview.png new file mode 100644 index 000000000..cc6b6986e Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/aleph-alpha-search-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/bulk-upload-social-preview.png b/qdrant-landing/static/documentation/tutorials/bulk-upload-social-preview.png new file mode 100644 index 000000000..d6ad668ed Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/bulk-upload-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/common-errors-social-preview.png b/qdrant-landing/static/documentation/tutorials/common-errors-social-preview.png new file mode 100644 index 000000000..9cb8d4865 Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/common-errors-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/create-snapshot-social-preview.png b/qdrant-landing/static/documentation/tutorials/create-snapshot-social-preview.png new file mode 100644 index 000000000..ac98a04af Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/create-snapshot-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/how-to-social-preview.png b/qdrant-landing/static/documentation/tutorials/how-to-social-preview.png new file mode 100644 index 000000000..3d5ab66ba Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/how-to-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/mighty-social-preview.png b/qdrant-landing/static/documentation/tutorials/mighty-social-preview.png new file mode 100644 index 000000000..21b10ac37 Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/mighty-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/multiple-partitions-social-preview.png b/qdrant-landing/static/documentation/tutorials/multiple-partitions-social-preview.png new file mode 100644 index 000000000..94b585312 Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/multiple-partitions-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/neural-search-social-preview.png b/qdrant-landing/static/documentation/tutorials/neural-search-social-preview.png new file mode 100644 index 000000000..60a1058c6 Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/neural-search-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/optimize-social-preview.png b/qdrant-landing/static/documentation/tutorials/optimize-social-preview.png new file mode 100644 index 000000000..68365c659 Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/optimize-social-preview.png differ diff --git a/qdrant-landing/static/documentation/tutorials/search-beginners-social-preview.png b/qdrant-landing/static/documentation/tutorials/search-beginners-social-preview.png new file mode 100644 index 000000000..cba013cd6 Binary files /dev/null and b/qdrant-landing/static/documentation/tutorials/search-beginners-social-preview.png differ diff --git a/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html b/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html index 5e7e5aedb..4dca3cf1d 100644 --- a/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html +++ b/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html @@ -135,23 +135,35 @@ {{ end }} - -{{ if .Params.social_preview_image }} - - - - - - -{{ else }} - - - - - - + +{{ $image := .Site.Params.preview_image }} + + +{{ with .File }} + {{ $preview_image_base := path.Join "static" .File.Dir .File.ContentBaseName }} + {{ $preview_image := printf "%s-social-preview.png" $preview_image_base }} + {{ $preview_image_exists := fileExists $preview_image }} + + {{ if $preview_image_exists }} + {{ $preview_image_base := path.Join .Dir .ContentBaseName }} + {{ $preview_image := printf "%s-social-preview.png" $preview_image_base }} + {{ $image = $preview_image }} + {{ end }} {{ end }} + +{{ if .Params.social_preview_image }} + {{ $image = .Params.social_preview_image }} +{{ end }} + + + + + + + + + {{ if .Params.author }}