Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
85431bf
Remove products dir
nmelehan-akamai May 29, 2026
c547ccc
Add script that updates relative product page links to techdocs
nmelehan-akamai May 29, 2026
6773efb
Rewrite relative products URLs to corresponding absolute techdocs URLs
nmelehan-akamai May 29, 2026
61f4976
Rewrite absolute products URLs to corresponding absolute techdocs URLs
nmelehan-akamai May 29, 2026
15b4216
Rewrite /docs/ URLs to /cloud/
nmelehan-akamai May 29, 2026
6925f02
Fix edge case
nmelehan-akamai May 29, 2026
0daa543
Theme updates
nmelehan-akamai Jun 15, 2026
8ac0271
Update base URL in site config
nmelehan-akamai Jun 15, 2026
5257232
Remove duplicate sitemap sed domain search/replace logic
nmelehan-akamai Jun 15, 2026
d983087
Remove product docs from link checker
nmelehan-akamai Jun 15, 2026
f29d6b4
Fix incorrect root directory case for link checker
nmelehan-akamai Jun 15, 2026
c4a070b
Bug fix for link checker
nmelehan-akamai Jun 15, 2026
16154a0
Bug fix for link checker,2
nmelehan-akamai Jun 15, 2026
45d3af5
Bug fix for link checker,3
nmelehan-akamai Jun 16, 2026
a871492
Use cloud prefix for Netlify
nmelehan-akamai Jun 16, 2026
42a56ae
Bug fix for link checker,4
nmelehan-akamai Jun 16, 2026
df1b528
Bug fix for link checker,5
nmelehan-akamai Jun 16, 2026
3b0036e
Move files under docs/assets/ to guide directories
nmelehan-akamai Jun 16, 2026
59a71e9
Remove unreferenced files left in docs/assets/
nmelehan-akamai Jun 16, 2026
4a4e90b
Fix links that redirect to techdocs
nmelehan-akamai Jun 16, 2026
ed5a2da
Fix remaining link errors
nmelehan-akamai Jun 16, 2026
e5b8018
Link checker test: try to print all failures and warnings regardless …
nmelehan-akamai Jun 16, 2026
49c0d4e
Fix some alias links to point to final location
nmelehan-akamai Jun 16, 2026
8e81b2e
Fix some alias links to point to final location,2
nmelehan-akamai Jun 16, 2026
0ab155f
Fix some alias links to point to final location,3
nmelehan-akamai Jun 16, 2026
7f7e63c
Theme updates
nmelehan-akamai Jun 16, 2026
b92346b
Remove API checks from link check test
nmelehan-akamai Jun 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions .github/workflows/build-production-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,6 @@ jobs:
cd public
cp sitemap.xml ${{ vars.DUPE_SITEMAP_NAME }}

SED_ESCAPED_URL=$(echo ${{ secrets.DOCS_WEBSITE_URL }} | sed 's|\.|\\\.|g')
sed -i 's|<loc>$SED_ESCAPED_URL\([a-z0-9\/-]*\)/</loc>|<loc>https://akamai.com/cloud/\1</loc>|g' ${{ vars.DUPE_SITEMAP_NAME }}
sed -i 's|<loc>$SED_ESCAPED_URL</loc>|<loc>https://akamai.com/cloud</loc>|' ${{ vars.DUPE_SITEMAP_NAME }}

# Make a tarball of the site, because it will upload much, much quicker
# than the uncompressed rendered site. The commit for this workflow run
# is encoded in the name of the tarball.
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build-staging-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,6 @@ jobs:
cd public
cp sitemap.xml ${{ vars.DUPE_SITEMAP_NAME }}

SED_ESCAPED_URL=$(echo ${{ secrets.DOCS_WEBSITE_URL }} | sed 's|\.|\\\.|g')
sed -i 's|<loc>$SED_ESCAPED_URL\([a-z0-9\/-]*\)/</loc>|<loc>https://akamai.com/cloud/\1</loc>|g' ${{ vars.DUPE_SITEMAP_NAME }}
sed -i 's|<loc>$SED_ESCAPED_URL</loc>|<loc>https://akamai.com/cloud</loc>|' ${{ vars.DUPE_SITEMAP_NAME }}

# Make a tarball of the site, because it will upload much, much quicker
# than the uncompressed rendered site. The commit for this workflow run
# is encoded in the name of the tarball.
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build-testing-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ jobs:
cd public
cp sitemap.xml ${{ vars.DUPE_SITEMAP_NAME }}

SED_ESCAPED_URL=$(echo ${{ secrets.DOCS_WEBSITE_URL }} | sed 's|\.|\\\.|g')
sed -i 's|<loc>$SED_ESCAPED_URL\([a-z0-9\/-]*\)/</loc>|<loc>https://akamai.com/cloud/\1</loc>|g' ${{ vars.DUPE_SITEMAP_NAME }}
sed -i 's|<loc>$SED_ESCAPED_URL</loc>|<loc>https://akamai.com/cloud</loc>|' ${{ vars.DUPE_SITEMAP_NAME }}

# Make a tarball of the site, because it will upload much, much quicker
# than the uncompressed rendered site. The commit for this workflow run
# is encoded in the name of the tarball.
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ hugo_stats.json
.hugo_build.lock
redirects.conf
scripts/duplicates.csv
scripts/.product_link_cache.json
algolia_out/

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# github.com/linode/linode-docs-theme v0.0.0-20260527191020-967a1fed9ff8
# github.com/linode/linode-docs-theme v0.0.0-20260616154148-26d1400a2a41
# github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.21300.20800
# github.com/gohugoio/hugo-mod-jslibs/turbo/v8 v8.20000.20400
# github.com/hotwired/turbo v8.0.4+incompatible
Expand Down
81 changes: 81 additions & 0 deletions apply-redirects.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/usr/bin/env python3
"""Replace relative links in the markdown library with their techdocs.akamai.com
replacements, as defined in cloud-techdocs-redirects.csv.

The CSV has two columns: the relative link to find, and the replacement link.
Links in the markdown appear as Markdown inline link targets, i.e. wrapped in
parentheses: ``(link)``. Matching on ``(link)`` keeps replacements exact and
avoids prefix collisions (e.g. ``/foo/`` vs ``/foo/bar/``).

Usage:
python3 apply-redirects.py [--dry-run]
"""

import argparse
import csv
import sys
from pathlib import Path

REPO_ROOT = Path(__file__).resolve().parent
CSV_PATH = REPO_ROOT / "cloud-techdocs-redirects.csv"
DOCS_DIR = REPO_ROOT / "docs"


def load_redirects(csv_path):
"""Return a list of (old, new) link pairs from the CSV."""
pairs = []
with open(csv_path, newline="", encoding="utf-8") as f:
for row in csv.reader(f):
if not row or not row[0].strip():
continue
if len(row) < 2:
print(f"Skipping malformed row: {row!r}", file=sys.stderr)
continue
old, new = row[0].strip(), row[1].strip()
pairs.append((old, new))
return pairs


def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--dry-run",
action="store_true",
help="Report what would change without writing files.",
)
args = parser.parse_args()

redirects = load_redirects(CSV_PATH)
# Map the parenthesized link-target forms.
replacements = [(f"({old})", f"({new})", old) for old, new in redirects]

total_replacements = 0
changed_files = 0

for md_file in sorted(DOCS_DIR.rglob("*.md")):
text = md_file.read_text(encoding="utf-8")
original = text
file_count = 0

for old_token, new_token, old_link in replacements:
n = text.count(old_token)
if n:
text = text.replace(old_token, new_token)
file_count += n
rel = md_file.relative_to(REPO_ROOT)
print(f" {rel}: {n}x {old_link}")

if text != original:
changed_files += 1
total_replacements += file_count
if not args.dry_run:
md_file.write_text(text, encoding="utf-8")

action = "Would replace" if args.dry_run else "Replaced"
print(
f"\n{action} {total_replacements} link(s) across {changed_files} file(s)."
)


if __name__ == "__main__":
main()
Loading
Loading