Skip to content

Commit e8c9f9a

Browse files
author
Bob Potterveld
committed
Update README and Makefile to describe process to modify and deploy custom-chatbot-style.css file.
1 parent 518cb4d commit e8c9f9a

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ sync-website: create-iframe-snippet
136136
@echo "[INFO] Saving a backup copy of previous loader config json"
137137
aws s3 cp \
138138
"$(CURRENT_CONFIG_FILE)" "s3://$(WEBAPP_BUCKET)/lex-web-ui-loader-config.$(shell date +%Y%m%d%H%M%S).json"
139+
# For CodePipeline based distribution / builds where the custom style is managed in
140+
# Source control, uncomment the next four lines such that the css file is updated
141+
# on each CodePipeline/CodeBuild invocation.
139142
# @echo "[INFO] copying custom-chatbot-style.css and setting cache max-age=0"
140143
# aws s3 cp \
141144
# --metadata-directive REPLACE --cache-control max-age=0 \

README-css-style.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,33 @@ is important. This guide will walk you through adjusting the UI to meet your nee
66
This guide does not cover the case if you are building lex-web-ui for use as a component
77
in other Vue apps or modifing Vue source components for your own implementation.
88

9-
*Note: After uploading the revised css file to your S3 bucket, be sure to invalidate the CloudFront
10-
distribution such that the new css file will be served up immediately. You may also need to clear
11-
your browser cache to see the change immediately.*
12-
9+
There are two mechanisms to modify and deploy the custom-chatbot-style.css file using the style
10+
modifications outlined in this README.
11+
12+
* Prebuilt lex-web-ui distribution
13+
14+
If you have installed the lex-web-ui using the prebuilt distributions from the links published on
15+
the lex-web-ui blog post or from the links available in the top level README.md, follow these steps.
16+
* Download the custom-chatbot-style.css file from your WebApp S3 bucket
17+
* Modify the CSS accordingly and save the file locally on your desktop
18+
* Upload the custom-chatbot-style.css back to your WebApp S3 bucket
19+
* Use the CloudFront console to invalidate the CloudFront distribution such that it will be served up immediately
20+
21+
* CodePipeline/CodeBuild distribution
22+
If you have used the master-pipeline.yaml to create a CodCommit/CodePipeline/CodeBuild distribution mechanism,
23+
follow these steps.
24+
* git clone the repo from CodeCommit
25+
* Modify the CSS accordingly in your local repo
26+
* Modify the root level Makefile and uncomment the lines noted below
27+
```
28+
# @echo "[INFO] copying custom-chatbot-style.css and setting cache max-age=0"
29+
# aws s3 cp \
30+
# --metadata-directive REPLACE --cache-control max-age=0 \
31+
# "$(DIST_DIR)/custom-chatbot-style.css" s3://$(WEBAPP_BUCKET)
32+
```
33+
* Commit and push the changes to both files
34+
* The resulting CodeBuild execution will publish the modified custom-chatbot-style.css to your WebApp S3 bucket.
35+
1336
## Summary of available css modifications
1437
1538
![Common use of CSS for LexWebUi](./img/LexWebUiStyle.png)

0 commit comments

Comments
 (0)