Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8994cd5
fix: improving links on home page
Jul 22, 2025
87b8862
fix: improving links on home page
Jul 22, 2025
e72b4e3
fix: improving links on home page
Jul 22, 2025
de46c6a
fix: improving links on home page
Jul 22, 2025
ed10bab
fix: server's broken
Jul 22, 2025
5d1aceb
fix: merged with master
Jul 22, 2025
9cff61a
fix: testing redirects
Jul 22, 2025
30fded5
fix: removing redirects
Jul 22, 2025
af7fb61
fix: removing redirects
Jul 22, 2025
5992672
fix: fixing docs.yml
Jul 22, 2025
48ee826
fix: added components folder back and redirects
Jul 22, 2025
145b7cb
Merge remote-tracking branch 'origin/main' into 07-22-verifying-redir…
Jul 22, 2025
c6ab251
feat: updated more redirects and cleaned up changelogs
Jul 23, 2025
84d632d
Merge remote-tracking branch 'origin/main' into 07-22-redirects-3
Jul 23, 2025
e2dc96a
feat: cleaned up redirects
Jul 23, 2025
35a4dc8
feat: fixed more redirects
Jul 23, 2025
ec2ef27
Merge remote-tracking branch 'origin/main' into 07-22-redirects-5
Jul 23, 2025
879cf87
feat: removed cyclical redirect for sdks
Jul 23, 2025
c465250
feat: removed uncessary redirects
Jul 23, 2025
30bbb5f
feat: merged
Jul 23, 2025
8382d14
feat: added new changelog slug
Jul 23, 2025
d54879c
feat: merged
Jul 23, 2025
81e888b
feat: updated changelogs for sdks
Jul 23, 2025
7b6c14d
feat: updated slug to openapi-definition
Jul 23, 2025
ea4c068
feat: merged
Jul 23, 2025
71ce4bd
feat: fixed more redirects
Jul 23, 2025
30bb981
feat: merged
Jul 23, 2025
5d40148
feat: merged
Jul 23, 2025
4f09435
feat: merged
Jul 23, 2025
513566f
Merge remote-tracking branch 'origin/main' into 07-23-redirects-9
Jul 23, 2025
5fd8078
feat: added cli changelog
Jul 23, 2025
1a526a4
feat: added cli changelog
Jul 23, 2025
47b41bf
Merge remote-tracking branch 'origin/main' into 07-23-redirects-10
Jul 23, 2025
4ad4dc3
fix: endpoint snippets mapping
Jul 23, 2025
59bb3f2
fix: updated script
Jul 23, 2025
8803095
fix: updated script
Jul 23, 2025
db7eac7
Merge remote-tracking branch 'origin/main' into 07-23-redirects-11
Jul 23, 2025
dd9608e
fix: cleaned up all api definition files
Jul 23, 2025
cd2cfee
Merge remote-tracking branch 'origin/main' into 07-23-redirects-12
Jul 23, 2025
cd5dbf5
fix: add some remaining redirects
Jul 23, 2025
e319316
fix: updated python script
Jul 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 25 additions & 20 deletions check_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,17 @@ def follow_redirect_chain(self, url):
# Make request without following redirects automatically
response = self.session.get(current_url, timeout=self.timeout, allow_redirects=False)

# Check if this step leads to home page
if self.is_home_page(current_url):
return {
'status_code': response.status_code,
'final_url': current_url,
'redirect_chain': redirect_chain,
'redirect_count': redirect_count,
'leads_to_home': True,
'home_at_step': redirect_count,
'error': None
}

# If not a redirect, we're done
# If not a redirect, we're done - check final destination for home page
if response.status_code not in [301, 302, 303, 307, 308]:
# Check if final destination is home page
is_home = self.is_home_page(current_url)
return {
'status_code': response.status_code,
'final_url': current_url,
'redirect_chain': redirect_chain,
'redirect_count': redirect_count,
'leads_to_home': False,
'home_at_step': None,
'leads_to_home': is_home,
'home_at_step': redirect_count if is_home else None,
'error': None
}

Expand Down Expand Up @@ -142,26 +132,41 @@ def follow_redirect_chain(self, url):
'home_at_step': None,
'error': f'Redirect loop detected at step {redirect_count}'
}

# Check if this intermediate redirect step leads to home page
if self.is_home_page(current_url):
return {
'status_code': response.status_code,
'final_url': current_url,
'redirect_chain': redirect_chain,
'redirect_count': redirect_count,
'leads_to_home': True,
'home_at_step': redirect_count,
'error': None
}

# Too many redirects
# Too many redirects - check if final URL is home page anyway
is_home = self.is_home_page(current_url)
return {
'status_code': None,
'final_url': current_url,
'redirect_chain': redirect_chain,
'redirect_count': redirect_count,
'leads_to_home': False,
'home_at_step': None,
'leads_to_home': is_home,
'home_at_step': redirect_count if is_home else None,
'error': f'Too many redirects (>{self.max_redirects})'
}

except requests.exceptions.RequestException as e:
# Check if we ended up at home page even with an error
is_home = self.is_home_page(current_url)
return {
'status_code': None,
'final_url': current_url,
'redirect_chain': redirect_chain,
'redirect_count': redirect_count,
'leads_to_home': False,
'home_at_step': None,
'leads_to_home': is_home,
'home_at_step': redirect_count if is_home else None,
'error': str(e)
}

Expand Down
2 changes: 1 addition & 1 deletion fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ redirects:
permanent: true
# General SDK capabilities pattern (will catch any not specifically overridden above)
- source: /learn/sdks/capabilities/:slug*
destination: /learn/sdks/overview/capabilities/:slug*
destination: /learn/sdks/overview/introduction
permanent: true

# SDK Reference redirects
Expand Down
1 change: 1 addition & 0 deletions fern/products/docs/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ navigation:
path: ./pages/authentication/sso.mdx
- page: Role based access control (RBAC)
path: ./pages/authentication/rbac.mdx
slug: rbac
- page: API Key Injection
path: ./pages/api-references/autopopulate-api-key.mdx
- section: Enterprise
Expand Down
1 change: 1 addition & 0 deletions fern/products/sdks/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ navigation:
- changelog: ./overview/ruby/changelog
- page: Publishing to RubyGems
path: ./overview/ruby/publishing-to-rubygems.mdx
slug: publishing-to-rubygems
- page: Adding custom code
hidden: true
path: ./overview/ruby/custom-code.mdx
Expand Down
Loading
Loading