Skip to content

Commit 9ad9f80

Browse files
author
ebembi-crdb
committed
Fix cross-version image links in archive-v20.1
- Copy DBeaver and IntelliJ images from v2.1 to v20.1 directory - Update image links in dbeaver.md and intellij-idea.md to use v20.1 images - Update sidebar_htmltest.rb to respect htmltest config and skip archived versions Addresses cross-version linking issues similar to those fixed in PR #21195
1 parent da89637 commit 9ad9f80

11 files changed

+33
-13
lines changed

src/current/_plugins/sidebar_htmltest.rb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
11
require 'json'
22
require 'liquid'
3+
require 'yaml'
34

45
module SidebarHTMLTest
56
class Generator < Jekyll::Generator
67
def generate(site)
78
@site = site
89

10+
# Read htmltest configuration to get ignored directories
11+
htmltest_config = YAML.load_file('.htmltest.yml') rescue {}
12+
ignored_dirs = htmltest_config['IgnoreDirs'] || []
13+
14+
# Extract version numbers from ignored directories
15+
ignored_versions = ignored_dirs.map do |dir|
16+
match = dir.match(/\^?docs\/?(v\d+\.\d+)/)
17+
match[1] if match
18+
end.compact
19+
920
Dir[File.join(site.config['includes_dir'], 'sidebar-data-v*.json')].each do |f|
1021
next unless !!site.config['cockroachcloud'] == f.include?('cockroachcloud')
22+
23+
# Extract version from filename
24+
version = f.match(/sidebar-data-(v\d+\.\d+)/)[1]
25+
26+
# Skip if this version is in the ignored list
27+
if ignored_versions.include?(version)
28+
Jekyll.logger.info "SidebarHTMLTest:", "Skipping ignored version #{version}"
29+
next
30+
end
31+
1132
partial = site.liquid_renderer.file(f).parse(File.read(f))
1233
json = partial.render!(site.site_payload, {registers: {site: site}})
13-
version = f.match(/sidebar-data-(v\d+\.\d+)/)[1]
1434
render_sidebar(json, version)
1535
end
1636
end
189 KB
Loading
26.4 KB
Loading
29.8 KB
Loading
29.4 KB
Loading
9.15 KB
Loading
18.7 KB
Loading
10.4 KB
Loading
67.8 KB
Loading

src/current/v20.1/dbeaver.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ To work through this tutorial, take the following steps:
2929

3030
Start DBeaver, and select **Database > New Connection** from the menu. In the dialog that appears, select **CockroachDB** from the list.
3131

32-
<img src="{{ 'images/v2.1/dbeaver-01-select-cockroachdb.png' | relative_url }}" alt="DBeaver - Select CockroachDB" style="border:1px solid #eee;max-width:100%" />
32+
<img src="{{ 'images/v20.1/dbeaver-01-select-cockroachdb.png' | relative_url }}" alt="DBeaver - Select CockroachDB" style="border:1px solid #eee;max-width:100%" />
3333

3434
## Step 2. Update the connection settings
3535

3636
On the **Create new connection** dialog that appears, click **Network settings**.
3737

38-
<img src="{{ 'images/v2.1/dbeaver-02-cockroachdb-connection-settings.png' | relative_url }}" alt="DBeaver - CockroachDB connection settings" style="border:1px solid #eee;max-width:100%" />
38+
<img src="{{ 'images/v20.1/dbeaver-02-cockroachdb-connection-settings.png' | relative_url }}" alt="DBeaver - CockroachDB connection settings" style="border:1px solid #eee;max-width:100%" />
3939

4040
From the network settings, click the **SSL** tab. It will look like the screenshot below.
4141

42-
<img src="{{ 'images/v2.1/dbeaver-03-ssl-tab.png' | relative_url }}" alt="DBeaver - SSL tab" style="border:1px solid #eee;max-width:100%" />
42+
<img src="{{ 'images/v20.1/dbeaver-03-ssl-tab.png' | relative_url }}" alt="DBeaver - SSL tab" style="border:1px solid #eee;max-width:100%" />
4343

4444
Check the **Use SSL** checkbox as shown, and fill in the text areas as follows:
4545

@@ -57,13 +57,13 @@ Select **require** from the **SSL mode** dropdown. There is no need to set the
5757

5858
Click **Test Connection ...**. If everything worked, you will see a **Success** dialog like the one shown below.
5959

60-
<img src="{{ 'images/v2.1/dbeaver-04-connection-success-dialog.png' | relative_url }}" alt="DBeaver - connection success dialog" style="border:1px solid #eee;max-width:100%" />
60+
<img src="{{ 'images/v20.1/dbeaver-04-connection-success-dialog.png' | relative_url }}" alt="DBeaver - connection success dialog" style="border:1px solid #eee;max-width:100%" />
6161

6262
## Step 4. Start using DBeaver
6363

6464
Click **Finish** to get started using DBeaver with CockroachDB.
6565

66-
<img src="{{ 'images/v2.1/dbeaver-05-movr.png' | relative_url }}" alt="DBeaver - CockroachDB with the movr database" style="max-width:100%" />
66+
<img src="{{ 'images/v20.1/dbeaver-05-movr.png' | relative_url }}" alt="DBeaver - CockroachDB with the movr database" style="max-width:100%" />
6767

6868
For more information about using DBeaver, see the [DBeaver documentation](https://dbeaver.io/docs/).
6969

0 commit comments

Comments
 (0)