You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/techdocs/proc-techdocs-embed-videos.adoc
+7-12Lines changed: 7 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,11 @@
8
8
9
9
You can use `<iframe>` elements to embed videos into your TechDocs.
10
10
11
+
.Prerequisites
12
+
13
+
* An administrator has configured your AWS S3 bucket to store TechDocs sites.
14
+
* An administrator has configured the appropriate `techdocs.sanitizer.allowedIframeHosts` and `backend.csp` settings in your `app-config.yaml` file.
15
+
11
16
.Procedure
12
17
13
18
. In the section of the TechDocs file that you want to embed a video into, add the following configuration:
@@ -37,7 +42,7 @@ _<frame_border>_ :: Specifies the size of the frame border in number of pixels,
37
42
====
38
43
TechDocs uses DOMPurify to sanitize HTML. To prevent DOMPurify from removing the `<iframe>` elements, you must list every permitted video host, such as www.youtube.com, under the `techdocs.sanitizer.allowedIframeHosts` section of your `app-config.yaml` file. You must also add the video host to the `backend.csp` section of your `app-config.yaml` file.
39
44
====
40
-
. In the `frame-src` and `allowedIframeHosts` fields of your `app-config.yaml` file, add any video hosts that you want to use. For example:
45
+
. In the `frame-src` and `allowedIframeHosts` fields of your `app-config.yaml` file, add any video hosts that you want to use. You can add multiple. hosts. For example:
41
46
+
42
47
[source,yaml,subs="+quotes,+attributes"]
43
48
----
@@ -50,21 +55,11 @@ techdocs:
50
55
sanitizer:
51
56
allowedIframeHosts:
52
57
- www.youtube.com
58
+
- _<additional_video_host_url>_
53
59
publisher:
54
60
type: awsS3
55
61
awsS3:
56
62
bucketName: ${AWS_S3_BUCKET_NAME}
57
63
accountId: ${AWS_ACCOUNT_ID}
58
64
region: ${AWS_REGION}
59
65
----
60
-
+
61
-
. To authenticate with AWS, add the following configuration to your `app-config.yaml` file. For example:
Copy file name to clipboardExpand all lines: modules/techdocs/proc-techdocs-pipeline-github-actions.adoc
+29-10Lines changed: 29 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,35 +20,54 @@ You can implement a TechDocs pipeline using GitHub Actions to automatically gene
20
20
* Your organization has documentation files stored in a remote repository.
21
21
* You have an mkdocs.yaml file located in the root directory of your repository.
22
22
* You have the `catalog.entity.create` and `catalog.location.create` permissions to import documentation into TechDocs from a remote repository.
23
-
* You have an AWS S3 bucket created to store your TechDocs sites.
23
+
* You have an AWS S3 bucket to store your TechDocs sites.
24
24
* Minimal IAM Policies are configured for your S3 bucket, granting both Write and Read access.
25
-
* An IAM User has been created, the necessary policy attached, and an access key generated.
25
+
* An administrator has created an IAM User, attached the necessary policy, and generated an access key in the AWS console.
26
26
27
27
.Procedure
28
28
29
29
. Set up the GitHub Actions workflow
30
-
.. On GitHub, create a fork of the `rhdh-techdocs-pipeline` repository.
30
+
.. On GitHub, create a fork of the link:https://github.com/redhat-developer/red-hat-developer-hub-customization-provider[`red-hat-developer-hub-customization-provider`] repository.
31
31
+
32
32
[NOTE]
33
33
====
34
34
The `rhdh-techdocs-pipeline` repository contains a `generate-and-publish-techdocs.yaml` workflow that automatically generates TechDocs from the docs folder and publishes them to an Amazon S3 bucket.
35
35
====
36
36
+
37
37
.. Use the GitHub GUI to make sure that all of the permissions required to run the workflow are enabled.
38
-
.. Add the *Repository secrets* required to connect the workflow to your AWS account.
38
+
.. Add the *Repository secrets* required to connect the workflow to your AWS account, for example, `TECHDOCS_S3_BUCKET_NAME`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`.
39
39
+
40
40
[NOTE]
41
41
====
42
42
The default `mkdocs.yaml` file in the `rhdh-techdocs-pipeline` workflow installs the `techdocs-core` and `minify` plugins.
43
43
====
44
44
.. Optional: Modify the default structure of the `rhdh-techdocs-pipeline` repository or the default files within it to meet the needs of your organization.
45
45
.. Optional: Add other `mkdocs` plugins that you want to use by adding the name of the plugins to the `plugins` section of the `mkdocs.yaml` file and to the `steps.name: install mkdocs and mkdocs plugins` section of the `generate-and-publish-techdocs.yaml` file.
46
-
. Update the `app-config.yaml` file to enable your Amazon S3 bucket to serve TechDocs to your {product-very-short} instance.
47
-
.. In the Developer perspective of {ocp-short} console, click *ConfigMaps* and select your {product-very-short}`app-config.yaml` file.
48
-
.. In the `techdocs` section of the `app-config.yaml` file, set `builder` to `external`.
49
-
.. Set `publisher.type` to `awsS3`.
50
-
.. In the `aws` section, set `accounts.accountId` to `$(AWS_ACCOUNT_ID)`, set `accounts.accessKeyId` to `$(AWS_ACCESS_KEY_ID)`, and set `accounts.secretAccessKey` to `$(AWS_SECRET_ACCESS_KEY)`.
51
-
.. In the `catalog` section, set `locations.type` to `url` and set `locations.target` to the url to the `catalog-info.yaml` file in your `rhdh-techdocs-pipeline` repository.
46
+
. In the Developer perspective of {ocp-short} console, click *ConfigMaps* and select your {product-very-short}`app-config.yaml` file.
47
+
. Update the `app-config.yaml` file to enable your Amazon S3 bucket to serve TechDocs to your {product-very-short} instance. For example:
0 commit comments