Skip to content

Conversation

@julian-risch
Copy link
Member

@julian-risch julian-risch commented Jun 20, 2025

This PR adds a DocusaurusRenderer. It's simpler than ReadmeCoreRenderer because it doesn't intera.ct with any Readme API

I got the feedback from @dfokina that the following frontmatter is enough for docusaurus as a start. The id should come from what was the slug field before. For example, in agents_api.yml we have slug: agents-api. I renamed it to id.

---
title: "Creating Custom Components"
id: "custom-components"
description: "Create your own components and use them standalone or in pipelines."
---

Tested with

loaders:
  - type: haystack_pydoc_tools.loaders.CustomPythonLoader
    search_path: [../../../haystack/components/agents]
    modules: ["agent"]
    ignore_when_discovered: ["__init__"]
processors:
  - type: filter
    expression:
    documented_only: true
    do_not_filter_modules: false
    skip_empty_modules: true
  - type: smart
  - type: crossref
renderer:
  type: haystack_pydoc_tools.renderers.DocusaurusRenderer
  description: Tool-using agents with provider-agnostic chat model support.
  title: Agents
  id: agents-api
  markdown:
    descriptive_class_title: false
    classdef_code_block: false
    descriptive_module_title: true
    add_method_class_prefix: true
    add_member_class_prefix: false
    filename: agents_api.md

which generated

---
title: Agents
id: agents-api
description: Tool-using agents with provider-agnostic chat model support.
---

<a id="agent"></a>

# Module agent

<a id="agent.Agent"></a>

## Agent

A Haystack component that implements a tool-using agent with provider-agnostic chat model support.
...

@julian-risch julian-risch marked this pull request as ready for review June 20, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants