Skip to content

Commit 4fbdf6f

Browse files
authored
Merge pull request #1510 from redis/DOC-5203
RC: Remove unused images and duplicate images
2 parents fa45930 + 4ca5e41 commit 4fbdf6f

File tree

276 files changed

+52
-42
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+52
-42
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The `filename` property value can be any file name path which is relative to the
102102
We added a new property `class` which allows you to override the CSS class of the image. Images have by default a `block` display in Tailwind. You can change this by setting the class property to `inline`. The following example shows two images that are in a single line:
103103

104104
```
105-
{{< image filename="/images/rc/icon-database-update-status-pending.png#no-click" alt="Pending database status" class="inline" >}} &nbsp; {{< image filename="/images/rc/icon-database-update-status-active.png#no-click" alt="Active database status" class="inline" >}}
105+
{{< image filename="/images/rc/icon-database-update-status-pending.png#no-click" alt="Pending database status" class="inline" >}} &nbsp; {{< image filename="/images/rc/icon-database-status-active.png#no-click" alt="Active database status" class="inline" >}}
106106
```
107107

108108
### Templating

build/image_report.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,22 @@ def scan_file(path: str, verbose: bool = True) -> list:
7676
print(f"Checking for images not found in '{args.pathname}' that are in '{args.find_unused[0]}'")
7777

7878
unused_images = []
79+
total_images = 0
7980

8081
for root, dirs, files in os.walk(args.find_unused[0]):
8182
for file in files:
82-
if (file.endswith(".png") or file.endswith(".jpg") or file.endswith(".webp")) and not any(file in img for img in unique_images):
83-
img_filepath = os.path.join(root, file)
84-
print(f" Image '{img_filepath}' not found in '{args.pathname}'")
85-
unused_images.append(img_filepath)
86-
87-
print(f"Found {len(unused_images)} unused images.")
83+
if (file.endswith(".png") or file.endswith(".jpg") or file.endswith(".webp")):
84+
total_images += 1
85+
if not any(file in img for img in unique_images):
86+
img_filepath = os.path.join(root, file)
87+
print(f" Image '{img_filepath}' not found in '{args.pathname}'")
88+
unused_images.append(img_filepath)
89+
90+
print(f"Found {len(unused_images)} unused images out of {total_images} images in '{args.find_unused[0]}.'")
91+
92+
if len(unused_images) > 0:
93+
print("Do you want to remove these images? (y/n) (DO NOT DO ON MAIN BRANCH!)")
94+
if input().lower() == "y":
95+
for img in unused_images:
96+
os.remove(img)
97+
print(f"Removed '{img}'")

content/embeds/rc-tags-tag-module.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ After you add your first tag, you can:
1212

1313
- Select **Delete** next to a tag to delete it.
1414

15-
{{<image filename="images/rc/tags-icon-delete.png" alt="Delete button." >}}
15+
{{<image filename="images/rc/icon-delete-teal.png" width="36px" alt="Delete button." >}}
1616

1717
- Select **Add additional tag** to add another tag.
1818

content/integrate/amazon-bedrock/set-up-redis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ To create your vector index in Redis Insight:
185185

186186
1. In the [Redis Cloud console](https://cloud.redis.io/), in your database's **Configuration** tab, select the **Connect** button next to your database to open the connection wizard.
187187

188-
{{< image filename="/images/rc/connection-wizard-button.png#no-click" alt="Connect button." >}}
188+
{{< image filename="/images/rc/button-connect.png#no-click" alt="Connect button." >}}
189189

190190
1. In the connection wizard, under **Redis Insight Desktop**, select **Public Endpoint**. Select **Open with Redis Insight** to connect to the database with Redis Insight.
191191

content/operate/rc/api/get-started/enable-the-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To enable the API:
2323

2424
1. If a **Copy** button appears to the right of the API account key, the API is enabled. This button copies the account key to the Clipboard.
2525

26-
{{<image filename="images/rc/button-access-management-api-key-copy.png" alt="Use the **Copy** button to copy the access key to the Clipboard." >}}
26+
{{<image filename="images/rc/button-copy.png" alt="Use the **Copy** button to copy the access key to the Clipboard." >}}
2727

2828
If you see an **Enable API** button, select it to enable the API and generate your API account key.
2929

content/operate/rc/api/get-started/manage-api-keys.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ By default, the **API account key** is masked; that is, it is obscured for secur
3737

3838
The **Copy** button copies the account key to the Clipboard.
3939

40-
{{<image filename="images/rc/button-access-management-api-key-copy.png" alt="The **Copy** button copies the account key to the Clipboard." >}}
40+
{{<image filename="images/rc/button-copy.png" alt="The **Copy** button copies the account key to the Clipboard." >}}
4141

4242
## API user keys
4343

@@ -51,7 +51,7 @@ Users can have more than one user key; however, users should not share user keys
5151

5252
Use the **Add** button to create a new user key.
5353

54-
{{<image filename="images/rc/button-access-management-add.png" alt="Use the **Add** button to begin creating a new user key." >}}
54+
{{<image filename="images/rc/icon-add.png" width="30px" alt="Use the **Add** button to begin creating a new user key." >}}
5555

5656
When you do this, you're prompted for the **Key name** and the associated **User name**.
5757

@@ -89,7 +89,7 @@ To delete a user key:
8989

9090
2. Select the **Delete** button.
9191

92-
{{<image filename="images/rc/button-access-management-api-user-key-delete.png" alt="Select the **Delete** button to begin deleting the selected user key." >}}
92+
{{<image filename="images/rc/icon-delete-teal.png" width="36px" alt="Select the **Delete** button to begin deleting the selected user key." >}}
9393

9494
3. This displays the **Delete API secret key** dialog box.
9595

@@ -113,12 +113,12 @@ To manage the CIDR allow list:
113113

114114
3. Enter each allowed IP address in [CIDR format](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) (example: `127.1.0.0/24`) and then select the **Save** button.
115115

116-
{{<image filename="images/rc/button-access-management-cidr-rule-save.png" alt="Use the **Save** button to save a CIDR allow list rule." >}}
116+
{{<image filename="images/rc/button-access-management-cidr-rule-save.png" width="36px" alt="Use the **Save** button to save a CIDR allow list rule." >}}
117117

118118
Use the **Add CIDR rule** button to add additional addresses to the list.
119119

120120
{{<image filename="images/rc/button-access-management-cidr-rule-add.png" alt="Use the **Add Rule** button to add a new address to the CIDR allow list." >}}
121121

122122
Use the **Edit** button to change the address for a rule or the **Delete button** to remove a rule.
123123

124-
{{<image filename="images/rc/button-access-management-cidr-rule-edit.png#no-click" alt="Use the **Edit** button to change the address for a CIDR allow list rule." class="inline">}} &nbsp; {{<image filename="images/rc/button-access-management-cidr-rule-delete.png#no-click" alt="Use the **Delete** button to remove an address from the CIDR allow list." class="inline" >}}
124+
{{<image filename="images/rc/icon-edit.png#no-click" width="36px" alt="Use the **Edit** button to change the address for a CIDR allow list rule." class="inline">}} &nbsp; {{<image filename="images/rc/icon-delete-teal.png#no-click" width="36px" alt="Use the **Delete** button to remove an address from the CIDR allow list." class="inline" >}}

content/operate/rc/databases/connect/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you've turned on [Role-based access control]({{< relref "/operate/rc/security
2121

2222
Once you have the username and password, select **Connect** to open the connection wizard.
2323

24-
{{< image filename="/images/rc/connection-wizard-button.png#no-click" alt="Connect button." >}}
24+
{{< image filename="/images/rc/button-connect.png#no-click" alt="Connect button." >}}
2525

2626
The connection wizard provides the following database connection methods:
2727

content/operate/rc/databases/create-database/create-active-active-database.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ The **Sizing** tab helps you specify the database, memory, and throughput requir
115115

116116
When you first visit the **Sizing** tab, there are no databases defined. Select the **Add** button to create one.
117117

118-
{{<image filename="images/rc/icon-add-database.png" width="30px" alt="Use the Add button to define a new database for your subscription." >}}
118+
{{<image filename="images/rc/icon-add.png" width="30px" alt="Use the Add button to define a new database for your subscription." >}}
119119

120120
This opens the **New Active-Active Redis Database** dialog, which lets you define the requirements for your new database.
121121

@@ -163,7 +163,7 @@ Use the **Add database** button to define additional databases or select the **C
163163

164164
Hover over a database to see the **Edit** and **Delete** icons. You can use the **Edit** icon to change a database or the **Delete** icon to remove a database from the list.
165165

166-
{{<image filename="images/rc/icon-database-edit.png#no-click" width="30px" alt="Use the Edit button to change database settings." class="inline" >}}&nbsp;{{<image filename="images/rc/icon-database-delete.png#no-click" width="30px" alt="Use the Delete button to remove a database." class="inline">}}
166+
{{<image filename="images/rc/icon-edit.png#no-click" width="30px" alt="Use the Edit button to change database settings." class="inline" >}}&nbsp;{{<image filename="images/rc/icon-delete-teal.png#no-click" width="30px" alt="Use the Delete button to remove a database." class="inline">}}
167167

168168

169169
### Review and Create tab

content/operate/rc/databases/create-database/create-essentials-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ This guide shows how to create an Essentials database.
6868

6969
If you chose a paid plan and haven't previously entered a payment method, use the **Add Credit Card** button to add one.
7070

71-
{{<image filename="images/rc/icon-add-credit-card.png" alt="The Add credit card icon." >}}
71+
{{<image filename="images/rc/icon-add.png" width="30px" alt="The Add credit card icon." >}}
7272

7373
1. Select **Create database** or **Confirm & pay** to create your database.
7474

content/operate/rc/databases/create-database/create-flex-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ This guide shows how to create a Redis Flex database on Redis Cloud Essentials.
102102

103103
If you haven't previously entered a payment method, use the **Add Credit Card** button to add one.
104104

105-
{{<image filename="images/rc/icon-add-credit-card.png" alt="The Add credit card icon." >}}
105+
{{<image filename="images/rc/icon-add.png" width="30px" alt="The Add credit card icon." >}}
106106

107107
1. Select **Confirm & pay** to create your database.
108108

0 commit comments

Comments
 (0)