Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Commit 73af818

Browse files
Merge remote-tracking branch 'upstream/main' into sync-20250206-1
2 parents 1477845 + 23656e9 commit 73af818

File tree

107 files changed

+195
-5
lines changed

Some content is hidden

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

107 files changed

+195
-5
lines changed

404.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
permalink: /404
55
nav_exclude: true
66
search_exclude: true
7+
redirect_to: https://developer.axis.com/acap/
78
---
89

910
<h1>Page not found</h1>

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ source "https://rubygems.org/"
44
# here are only used for local development. Update the versions when needed to
55
# match GitHub Pages, see https://pages.github.com/versions for more info.
66
gem "github-pages", "~> 231"
7-
gem "just-the-docs", "~> 0.10.0"
7+
gem "just-the-docs", "~> 0.10.0"
8+
gem "jekyll-redirect-from"

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# ACAP documentation
22

3+
<!-- textlint-disable -->
4+
> [!Note]
5+
> This repository has been archived and its content migrated to [Axis Developer Documentation](https://developer.axis.com/) where ACAP documentation is found at <https://developer.axis.com/acap>. For the rational behind the migration, see [this blog post](https://developer.axis.com/blog/2025/02/06/acap).
6+
<!-- textlint-enable -->
7+
38
Welcome to the AXIS Camera Application Platform (ACAP) [documentation](https://axiscommunications.github.io/acap-documentation), which is built with [GitHub pages](https://pages.github.com/).
49

510
## Contribute

_config.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ kramdown:
5454
plugins:
5555
- jekyll-remote-theme
5656
- jekyll-sitemap
57+
- jekyll-redirect-from
5758

5859
# ------------------------------------------------------------------------------
5960
# Theme settings
@@ -70,9 +71,6 @@ aux_links:
7071
search_enabled: true
7172
heading_anchors: true
7273

73-
# Google Analytics Tracking
74-
ga_tracking: UA-266925-56
75-
7674
# Back to top link
7775
back_to_top: true
7876
back_to_top_text: Back to top

build_redirects.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
import os
2+
import glob
3+
4+
def find_files(directory):
5+
pattern = os.path.join(directory, "**", "*.md")
6+
return glob.glob(pattern, recursive=True)
7+
8+
def add_frontmatter_config(file_path, config_key, config_value):
9+
with open(file_path, "r") as file:
10+
content = file.read()
11+
12+
parts = content.split("---")
13+
if len(parts) < 3:
14+
raise ValueError("The file does not contain valid FrontMatter")
15+
16+
frontmatter = parts[1].strip()
17+
rest_of_content = "---".join(parts[2:])
18+
19+
frontmatter_lines = frontmatter.split("\n")
20+
21+
key_exists = False
22+
for i, line in enumerate(frontmatter_lines):
23+
if line.startswith(f"{config_key}:"):
24+
frontmatter_lines[i] = f"{config_key}: {config_value}"
25+
key_exists = True
26+
break
27+
28+
if not key_exists:
29+
frontmatter_lines.append(f"{config_key}: {config_value}")
30+
31+
frontmatter = "\n".join(frontmatter_lines)
32+
33+
updated_content = f"---\n{frontmatter}\n---{rest_of_content}"
34+
35+
with open(file_path, "w") as file:
36+
file.write(updated_content)
37+
38+
files = find_files("./docs")
39+
files.append("./index.md")
40+
files.append("./404.html")
41+
42+
for file in files:
43+
relativePath = file.replace("./docs/", "").replace("./", "").replace("index.md", "").replace(".md", "")
44+
45+
# The following redirects are changed because in Docusaurus a category
46+
# doesn't necessarily have a page associated with it
47+
48+
if (relativePath == "introduction/"):
49+
relativePath = "introduction/what-is-acap"
50+
51+
if (relativePath == "get-started/" or relativePath == "get-started/set-up-developer-environment/"):
52+
relativePath = "get-started/set-up-developer-environment/pre-requisites"
53+
54+
if (relativePath == "api/"):
55+
relativePath = "api/native-sdk-api"
56+
57+
if (relativePath == "service/"):
58+
relativePath = "service/acap-service-portal"
59+
60+
if (relativePath == "acap-sdk-version-3/"):
61+
relativePath = "acap-sdk-version-3/introduction"
62+
63+
if (relativePath == "acap-sdk-version-3/develop-applications/"):
64+
relativePath = "acap-sdk-version-3/develop-applications/application-project-structure"
65+
66+
if (relativePath == "acap-sdk-version-3/services-for-partners/"):
67+
relativePath = "acap-sdk-version-3/services-for-partners/package-signing"
68+
69+
# This page ios removed in the migration, redirect to the root of the ACAP
70+
# documentation
71+
if (relativePath == "licenses/"):
72+
relativePath = ""
73+
74+
# Redirect them to the root of the ACAP documentation
75+
if (relativePath == "404.html"):
76+
relativePath = ""
77+
78+
if (not relativePath.endswith("release-notes/") and "release-notes/" in relativePath):
79+
relativePath += "/"
80+
81+
url = f"https://developer.axis.com/acap/{relativePath}"
82+
83+
add_frontmatter_config(file, "redirect_to", url)
84+

docs/acap-sdk-version-3/api/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ layout: acap_sdk_version_3
33
parent: ACAP SDK version 3
44
title: API
55
nav_order: 6
6+
redirect_to: https://developer.axis.com/acap/acap-sdk-version-3/api/
67
---
78
# API
89

docs/acap-sdk-version-3/develop-applications/application-project-structure.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ parent: Develop applications
44
grand_parent: ACAP SDK version 3
55
title: Application project structure
66
nav_order: 1
7+
redirect_to: https://developer.axis.com/acap/acap-sdk-version-3/develop-applications/application-project-structure
78
---
89
# Application project structure
910

docs/acap-sdk-version-3/develop-applications/build-install-and-run-the-application.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ parent: Develop applications
44
grand_parent: ACAP SDK version 3
55
title: Build, install and run the application
66
nav_order: 2
7+
redirect_to: https://developer.axis.com/acap/acap-sdk-version-3/develop-applications/build-install-and-run-the-application
78
---
89
# Build, install and run the application
910

docs/acap-sdk-version-3/develop-applications/develop-using-visual-studio-code.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ parent: Develop applications
44
grand_parent: ACAP SDK version 3
55
title: Develop using Visual Studio Code
66
nav_order: 5
7+
redirect_to: https://developer.axis.com/acap/acap-sdk-version-3/develop-applications/develop-using-visual-studio-code
78
---
89
# Develop using Visual Studio Code
910

docs/acap-sdk-version-3/develop-applications/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ parent: ACAP SDK version 3
44
title: Develop applications
55
nav_order: 3
66
has_children: true
7+
redirect_to: https://developer.axis.com/acap/acap-sdk-version-3/develop-applications/application-project-structure
78
---
89
# Develop applications

0 commit comments

Comments
 (0)