-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document how to embed artifacts on other websites (#3011)
Closes #2979 Signed-off-by: Sergio Castaño Arteaga <[email protected]> Signed-off-by: Cintia Sanchez Garcia <[email protected]> Co-authored-by: Sergio Castaño Arteaga <[email protected]> Co-authored-by: Cintia Sanchez Garcia <[email protected]>
- Loading branch information
1 parent
4a41c84
commit c8000ee
Showing
16 changed files
with
70 additions
and
8 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
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,52 @@ | ||
# Embedding artifacts | ||
|
||
Artifact Hub allows embedding a single artifact or a group of them in other websites. | ||
|
||
## Embedding a single artifact | ||
|
||
You can embed an Artifact Hub package on other websites by adding the corresponding embed code. The embed code is a piece of HTML that can be generated from the Artifact Hub UI. | ||
|
||
Let's go through an example to see how this works. | ||
|
||
The first step is to find the package you'd like to embed on <https://artifacthub.io>. For this example, we'll use the [Artifact Hub Helm chart](https://artifacthub.io/packages/helm/artifact-hub/artifact-hub). On the top right corner of the package view you'll see a button with three dots. | ||
|
||
![Embed screenshot](https://artifacthub.github.io/hub/screenshots/embed-screenshot-1.jpg) | ||
|
||
If you click on it, you'll see an entry named `Embed widget`, which opens the widget configurator. From it you can customize the widget's appearance to suit your needs. Once you are done, you can copy the resulting embed code by clicking on `copy code to clipboard` at the bottom. | ||
|
||
![Embed screenshot](https://artifacthub.github.io/hub/screenshots/embed-screenshot-2.jpg) | ||
|
||
The generated code would be something like this: | ||
|
||
```html | ||
<div | ||
class="artifacthub-widget" | ||
data-url="https://artifacthub.io/packages/helm/artifact-hub/artifact-hub" | ||
data-theme="light" | ||
data-header="true" | ||
data-stars="true" | ||
data-responsive="false" | ||
> | ||
<blockquote> | ||
<p lang="en" dir="ltr"><b>artifact-hub</b>: Artifact Hub is a web-based application that enables finding, installing, and publishing Kubernetes packages.</p> | ||
— Open in <a href="https://artifacthub.io/packages/helm/artifact-hub/artifact-hub">Artifact Hub</a> | ||
</blockquote> | ||
</div> | ||
<script async src="https://artifacthub.io/artifacthub-widget.js"></script> | ||
``` | ||
|
||
To verify it works as expected, you can give it a quick try on JSFiddle if you'd like: <https://jsfiddle.net/r0ox4c9a/>. | ||
|
||
## Embedding a group of artifacts | ||
|
||
Embedding a group of artifacts is very similar to embedding a single one. The main difference is that, instead of opening the widget configurator from the package view, it is opened from the search results view. | ||
|
||
![Embed screenshot](https://artifacthub.github.io/hub/screenshots/embed-screenshot-3.jpg) | ||
|
||
This allows you to use all the search filters available to select what packages you'd like to embed on the other website. You could choose all packages of a given kind, those published by a given organization or all packages provided by CNCF projects, for example. Then, from the configurator, you can customize the appearance of the widgets like we did on the previous case with a single artifact. | ||
|
||
![Embed screenshot](https://artifacthub.github.io/hub/screenshots/embed-screenshot-4.jpg) | ||
|
||
Once you are ready to go, you can copy the embed code and add it to the website you'd like to embed the artifacts on. | ||
|
||
You can see a widgets group in action in [this JSFiddle](https://jsfiddle.net/7nvkcfqb/). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: "Architecture" | ||
weight: 5 | ||
weight: 6 | ||
aliases: [ | ||
"/architecture", | ||
] | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: "Authorization" | ||
weight: 4 | ||
weight: 5 | ||
aliases: [ | ||
"/authorization", | ||
] | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: "CLI tool" | ||
weight: 8 | ||
weight: 9 | ||
aliases: [ | ||
"/cli", | ||
] | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: "Development environment setup" | ||
weight: 6 | ||
weight: 7 | ||
aliases: [ | ||
"/dev", | ||
] | ||
|
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,7 @@ | ||
--- | ||
title: "Embedding artifacts" | ||
weight: 3 | ||
aliases: [ | ||
"/embedding_artifacts", | ||
] | ||
--- |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: "Infrastructure" | ||
weight: 7 | ||
weight: 8 | ||
aliases: [ | ||
"/infrastructure", | ||
] | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: "Packages security report" | ||
weight: 3 | ||
weight: 4 | ||
aliases: [ | ||
"/security_report", | ||
] | ||
|
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