Skip to content

Commit

Permalink
Doc adjustments for 0.4.1 (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
traut authored Apr 5, 2024
1 parent 9fd919d commit ffab645
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/plugins/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ hideChildren: true

# Plugins

## Data sources and content providers

Fabric plugins implement various [data sources]({{< ref "data-sources.md" >}}) and [content providers]({{< ref "content-providers.md" >}}):

- **data sources** are integrations responsible for loading data from the file, external service, API, or data storage.
Expand Down
30 changes: 30 additions & 0 deletions docs/templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Templates
description: Discover a diverse range of data sources within Fabric plugins. These integrations empower you to effortlessly load data from files, external services, APIs, and data storage systems. Simplify your data retrieval process and enhance your document generation workflow with Fabric's versatile data sources.
type: docs
weight: 60
---

# Templates

Fabric templates are the blueprints for configuring and generating documents. They offer a structured framework for defining data requirements, content structures, and rendering specifications within the [Fabric Configuration Language]({{< ref "language" >}}).

With Fabric templates, users can streamline their document generation process, ensuring consistency, accuracy, and scalability.

<div class="relative h-[35rem] w-auto not-prose">
<img src="/images/fabric-template-example.png" alt="Fabric template code" title="Fabric template code" class="absolute left-0 top-0 z-0 w-[600px]"/>
<img src="/images/fabric-template-example-rendered.png" alt="Rendered Fabric template" title="Rendered Fabric template" class="absolute right-0 bottom-0 z-10 w-[500px]"/>
</div>

## Templates repository

[Fabric Templates](https://github.com/blackstork-io/fabric-templates) repository contains use-case focused open-source templates for Fabric and is a great place to start:

- Cyber Threat Intelligence:
- MITRE CTID CTI Blueprints ([source](https://mitre-engenuity.org/cybersecurity/center-for-threat-informed-defense/our-work/cti-blueprints/))
- [Campaign Report Template](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/cti/mitre-ctid-campaign-report.fabric) ([example](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/cti/mitre-ctid-campaign-report-example.md))
- [Executive Report Template](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/cti/mitre-ctid-executive-report.fabric) ([example](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/cti/mitre-ctid-executive-report-example.md))
- [Intrusion Analysis Report Template](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/cti/mitre-ctid-intrusion-analysis-report.fabric) ([example](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/cti/mitre-ctid-intrusion-analysis-report-example.md))
- [Threat Actor Profile Report Template](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/cti/mitre-ctid-threat-actor-profile-report.fabric) ([example](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/cti/mitre-ctid-threat-actor-profile-report-example.md))
- SecOps:
- [Weekly Activity Overview Template](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/secops/weekly-activity-overview-elastic-security.fabric) ([example](https://github.com/blackstork-io/fabric-templates/tree/main/cybersec/secops/weekly-activity-overview-elastic-security-example.md))
10 changes: 5 additions & 5 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ There are 8 planets and 146 moons in our solar system.

## Content providers

Fabric seamlessly integrates with external APIs for content generation. An excellent example is the utilization of the OpenAI API to dynamically generate text through prompts.
Fabric seamlessly integrates with external APIs for content generation. An excellent example is the use of the OpenAI API to dynamically generate text through prompts.

In scenarios where providing the exact text or a template string for the content block proves challenging or impossible, leveraging generative AI for summarization becomes invaluable. This enables users to dynamically create context-aware text.

In this tutorial, we will utilize the [`openai_text`]({{< ref "plugins/openai/content-providers/openai_text" >}}) content provider, allowing us to generate text with the OpenAI Language Model (LLM).
In this tutorial, we will use the [`openai_text`]({{< ref "plugins/openai/content-providers/openai_text" >}}) content provider to generate text with the OpenAI Large Language Model (LLM).

### Installation

Expand Down Expand Up @@ -285,7 +285,7 @@ document "greeting" {
}
```

To render the document, `OPENAI_API_KEY` environment variable must be set. A simple way to do that, is to set it for each execution:
To render the document, `OPENAI_API_KEY` environment variable must be set. A simple way to do that, is to set it for each `fabric` command execution:

```shell
$ OPENAI_API_KEY="<key-value>" fabric render document.greeting
Expand Down Expand Up @@ -320,8 +320,8 @@ An excellent choice for macOS users is [MacDown](https://macdown.uranusjr.com/),

# Next steps

Congratulations! By completing this tutorial, you've gained a solid understanding of Fabric and its core principles.
Congratulations! By completing this tutorial, you've gained a good understanding of Fabric and its core principles.

Explore the open-source templates in the [Fabric Templates](https://github.com/blackstork-io/fabric-templates) GitHub repository. You can reuse entire documents or specific blocks in your own templates!
Take a look at the detailed [FCL specification]({{< ref "language" >}}), explore [the open-source templates]({{< ref "templates" >}}) the community made, and see if there are integrations for your tech stack in [Fabric plugins]({{< ref "plugins" >}}).

If you have any questions, feel free to ask in the [Fabric Community Slack](https://fabric-community.slack.com/) and we'll be glad to assist you!

0 comments on commit ffab645

Please sign in to comment.