Skip to content

Commit 46dfbd5

Browse files
authored
docs: admonitions right usage (#11063)
* docs: update caution to latest admonition syntax * docs: update note to latest admonition syntax * docs: update warning to latest admonition syntax * docs: update tip to latest admonition syntax * docs: update info to latest admonition syntax * docs: update contribution docs to latest admonition syntax
1 parent acc73d9 commit 46dfbd5

File tree

661 files changed

+788
-793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

661 files changed

+788
-793
lines changed

docs-website/CONTRIBUTING.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,24 +163,19 @@ Link to it: `[Install](./page.mdx#install-guide)` or `[Install](/docs/overview/q
163163
Use Docusaurus admonitions sparingly for supporting information:
164164

165165
```mdx
166-
:::note
167-
General notes or important information to highlight.
166+
:::note[General notes or important information to highlight.]
168167
:::
169168

170-
:::tip
171-
Short tip that helps the reader succeed.
169+
:::tip[Short tip that helps the reader succeed.]
172170
:::
173171

174-
:::info
175-
Useful but non-blocking background information.
172+
:::info[Useful but non-blocking background information.]
176173
:::
177174

178-
:::warning
179-
Risky settings or potential pitfalls.
175+
:::warning[Risky settings or potential pitfalls.]
180176
:::
181177

182-
:::danger
183-
Data loss or security-impacting issues.
178+
:::danger[Data loss or security-impacting issues.]
184179
:::
185180
```
186181

docs-website/docs/concepts/components/custom-components.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Here are the requirements for all custom components:
1919
- `run()`: This is a required method in every component. It accepts input arguments and returns a `dict`. The inputs can either come from the pipeline when it’s executed, or from the output of another component when connected using `connect()`. The `run()` method should be compatible with the input/output definitions declared for the component. See an [Extended Example](#extended-example) below to check how it works.
2020

2121

22-
:::note Avoid in-place input mutation
22+
:::note[Avoid in-place input mutation]
2323

2424
When building custom components, do not change the component's inputs directly. Instead, work on a copy or a new version of the input, modify that, and return it. The reason for this is that the original input values might be reused by other components or by later pipeline steps. Mutating the input directly can lead to unintended side effects and bugs in the pipeline, as other components might rely on the original input values.
2525

docs-website/docs/concepts/device-management.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Haystack’s device management is built on the following abstractions:
2424

2525
With the above abstractions, Haystack can fully address any supported device that’s part of your local machine and can support the usage of multiple devices at the same time. Every component that supports local inference will internally handle the conversion of these generic representations to their backend-specific representations.
2626

27-
:::info Source Code
27+
:::info[Source Code]
2828

2929
Find the full code for the abstractions above in the Haystack GitHub [repo](https://github.com/deepset-ai/haystack/blob/6a776e672fb69cc4ee42df9039066200f1baf24e/haystack/utils/device.py).
3030
:::

docs-website/docs/concepts/document-store.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ You can think of the Document Store as a database that stores your data and prov
1111

1212
Document Store is an object that stores your documents. In Haystack, a Document Store is different from a component, as it doesn't have the `run()` method. You can think of it as an interface to your database – you put the information there, or you can look through it. This means that a Document Store is not a piece of a pipeline but rather a tool that the components of a pipeline have access to and can interact with.
1313

14-
:::tip Work with Retrievers
14+
:::tip[Work with Retrievers]
1515

1616
The most common way to use a Document Store in Haystack is to fetch documents using a Retriever. A Document Store will often have a corresponding Retriever to get the most out of specific technologies. See more information in our [Retriever](../pipeline-components/retrievers.mdx) documentation.
1717
:::
1818

19-
:::note How to choose a Document Store?
19+
:::note[How to choose a Document Store?]
2020

2121
To learn about different types of Document Stores and their strengths and disadvantages, head to the [Choosing a Document Store](document-store/choosing-a-document-store.mdx) page.
2222
:::
@@ -65,7 +65,7 @@ document_store.write_documents(
6565
)
6666
```
6767

68-
:::note `DocumentWriter`
68+
:::note[`DocumentWriter`]
6969

7070
See `DocumentWriter` component [docs](../pipeline-components/writers/documentwriter.mdx) to write your documents into a Document Store in a pipeline.
7171
:::

docs-website/docs/concepts/document-store/choosing-a-document-store.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Continue further down the article for a more complex explanation of the strength
6060

6161
Vector libraries are often included in the “vector database” category improperly, as they are limited to handling only vectors, are designed to work in-memory, and normally don’t have a clean way to store data on disk. Still, they are the way to go every time performance and speed are the top requirements for your AI application, as these libraries can use hardware resources very effectively.
6262

63-
:::warning In progress
63+
:::warning[In progress]
6464

6565
We are currently developing the support for vector libraries in Haystack.
6666
:::

docs-website/docs/concepts/pipelines.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Thanks to serialization, you can save and then load your pipelines. Serializatio
115115

116116
Haystack pipelines delegate the serialization to its components, so serializing a pipeline simply means serializing each component in the pipeline one after the other, along with their connections. The pipeline is serialized into a dictionary format, which acts as an intermediate format that you can then convert into the final format you want.
117117

118-
:::info Serialization formats
118+
:::info[Serialization formats]
119119

120120
Haystack only supports YAML format at this time. We'll be rolling out more formats gradually.
121121
:::

docs-website/docs/concepts/pipelines/serialization.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ restored = component_from_dict(Greeter, data, "my_greeter")
130130
assert restored.message == greeter.message
131131
```
132132

133-
:::caution Init parameters must be stored as instance attributes
133+
:::caution[Init parameters must be stored as instance attributes]
134134

135135
Default serialization only works when there is a **1:1 mapping** between init parameter names and instance attributes. For every argument in `__init__`, the component must assign it to an attribute with the same name. For example, if you have `def __init__(self, prompt: str)`, you must have `self.prompt = prompt` in the class. Otherwise the serialization logic can't find the value to serialize and raises an error or uses the default value if the parameter has one.
136136
:::

docs-website/docs/concepts/pipelines/visualizing-pipelines.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You can visualize your pipelines as graphs to better understand how the componen
1313

1414
Haystack pipelines have `draw()` and `show()` methods that enable you to visualize the pipeline as a graph using Mermaid graphs.
1515

16-
:::note Data Privacy Notice
16+
:::note[Data Privacy Notice]
1717

1818
Exercise caution with sensitive data when using pipeline visualization.
1919

docs-website/docs/development/deployment.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Here are the currently available guides on Haystack pipeline deployment:
2525

2626
Haystack can be easily integrated into any HTTP application, but if you don’t have one, you can use Hayhooks, a ready-made application that serves Haystack pipelines as REST endpoints. We’ll be using Hayhooks throughout this guide to streamline the code examples. Refer to the Hayhooks [overview](hayhooks.mdx) for a quick start, or the [official Hayhooks documentation](https://deepset-ai.github.io/hayhooks/) for comprehensive guides and reference.
2727

28-
:::note Looking to scale with confidence?
28+
:::note[Looking to scale with confidence?]
2929

3030
If your team needs **enterprise-grade support, best practices, and deployment guidance** to run Haystack in production, check out **Haystack Enterprise Starter**.
3131

docs-website/docs/development/hayhooks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: "Hayhooks is a web application you can use to serve Haystack pipeli
99

1010
Hayhooks is a web application you can use to serve Haystack pipelines through HTTP endpoints. This page provides an overview of the main features of Hayhooks.
1111

12-
:::info Hayhooks Documentation
12+
:::info[Hayhooks Documentation]
1313

1414
For comprehensive documentation, including detailed configuration reference, advanced features,
1515
and examples, see the [official Hayhooks documentation](https://deepset-ai.github.io/hayhooks/).

0 commit comments

Comments
 (0)