-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,187 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
title: "`hub` publisher" | ||
plugin: | ||
name: blackstork/builtin | ||
description: "Publish documents to Blackstork Hub." | ||
tags: [] | ||
version: "v0.4.2" | ||
source_github: "https://github.com/blackstork-io/fabric/tree/main/internal/builtin/" | ||
resource: | ||
type: publisher | ||
type: docs | ||
--- | ||
|
||
{{< breadcrumbs 2 >}} | ||
|
||
{{< plugin-resource-header "blackstork/builtin" "builtin" "v0.4.2" "hub" "publisher" >}} | ||
|
||
The publisher is built-in, which means it's a part of `fabric` binary. It's available out-of-the-box, no installation required. | ||
|
||
#### Formats | ||
|
||
The publisher supports the following document formats: | ||
|
||
- `unknown` | ||
|
||
To set the output format, specify it inside `publish` block with `format` argument. | ||
|
||
|
||
#### Configuration | ||
|
||
The publisher supports the following configuration arguments: | ||
|
||
```hcl | ||
config publish hub { | ||
# API url. | ||
# | ||
# Required string. | ||
# Must be non-empty | ||
# For example: | ||
api_url = "some string" | ||
# API url. | ||
# | ||
# Required string. | ||
# Must be non-empty | ||
# For example: | ||
api_token = "some string" | ||
} | ||
``` | ||
|
||
#### Usage | ||
|
||
The publisher supports the following execution arguments: | ||
|
||
```hcl | ||
# In addition to the arguments listed, `publish` block accepts `format` argument. | ||
publish hub { | ||
# Hub Document title override. By default uses title configured in the document. | ||
# | ||
# Optional string. | ||
# Must be non-empty | ||
# Default value: | ||
title = null | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
document "example" { | ||
|
||
title = "Example Report, {{ now | date \"Jan 02\" }}" | ||
|
||
publish hub { | ||
config { | ||
api_url = env.HUB_API_URL | ||
api_token = env.HUB_API_TOKEN | ||
} | ||
} | ||
|
||
content title { | ||
value = "TOC" | ||
} | ||
|
||
content toc {} | ||
|
||
content title { | ||
value = "Subtitle 0" | ||
} | ||
|
||
section { | ||
title = "Section #1" | ||
|
||
content title { | ||
value = "Section TOC" | ||
} | ||
|
||
content toc { | ||
start_level = 1 | ||
end_level = 4 | ||
ordered = true | ||
} | ||
|
||
content text { | ||
value = "Text value 1" | ||
} | ||
|
||
content title { | ||
value = "Subtitle 1" | ||
} | ||
|
||
content text { | ||
value = "Text value 2" | ||
} | ||
|
||
section { | ||
title = "Subsection 1" | ||
|
||
content text { | ||
value = "Text value 3" | ||
} | ||
} | ||
|
||
content title { | ||
value = "Subtitle 2" | ||
} | ||
} | ||
|
||
section { | ||
title = "Section 2" | ||
|
||
section { | ||
title = "Subsection 2" | ||
|
||
content text { | ||
value = "Text value 4" | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.