Skip to content

Commit 6d31678

Browse files
kgowruKapil GowruKapil Gowru
authored
Fix apidef redirects (#462)
Co-authored-by: Kapil Gowru <[email protected]> Co-authored-by: Kapil Gowru <[email protected]>
1 parent 73460fe commit 6d31678

File tree

13 files changed

+131
-70
lines changed

13 files changed

+131
-70
lines changed

fern/assets/styles.css

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,46 @@ a[href*="changelog"] svg {
372372
.sdks-homepage {
373373
position: relative;
374374

375+
.changelog-button {
376+
display: flex;
377+
padding: 0.25rem 0.5rem;
378+
align-items: center;
379+
justify-content: center;
380+
border-radius: 0.5rem;
381+
transition: background-color 0.15s ease-in-out;
382+
position: relative;
383+
height: 2rem;
384+
text-decoration: none !important;
385+
386+
img {
387+
flex-shrink: 0;
388+
width: 16px;
389+
height: 16px;
390+
position: relative;
391+
}
392+
393+
div {
394+
font-size: 1rem;
395+
white-space: nowrap;
396+
max-width: 0;
397+
opacity: 0;
398+
overflow: hidden;
399+
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
400+
width: 0;
401+
}
402+
403+
&:hover {
404+
gap: 0.25rem;
405+
background-color: var(--grayscale-a3);
406+
407+
div {
408+
max-width: 200px;
409+
opacity: 1;
410+
width: fit-content;
411+
}
412+
}
413+
}
414+
375415
.dashed-pattern-left {
376416
position: absolute;
377417
left: -4rem;

fern/docs.yml

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,31 @@ products:
5757
slug: api-definitions
5858

5959
- display-name: OpenAPI
60-
path: ./products/api-def/api-def.yml
60+
path: ./products/api-def/openapi-def.yml
6161
icon: fa-regular fa-book
6262
image: ./images/product-switcher/openapi-definition-light.png
6363
slug: openapi-definition
6464

6565
- display-name: AsyncAPI
66-
path: ./products/api-def/api-def.yml
66+
path: ./products/api-def/asyncapi-def.yml
6767
icon: fa-regular fa-bolt
6868
image: ./images/product-switcher/asyncapi-light.png
6969
slug: asyncapi-definition
7070

7171
- display-name: OpenRPC
72-
path: ./products/api-def/api-def.yml
72+
path: ./products/api-def/openrpc-def.yml
7373
icon: fa-regular fa-code
7474
image: ./images/product-switcher/openrpc-light.png
7575
slug: openrpc-definition
7676

7777
- display-name: gRPC
78-
path: ./products/api-def/api-def.yml
78+
path: ./products/api-def/grpc-def.yml
7979
icon: fa-regular fa-plug
8080
image: ./images/product-switcher/grpc-light.png
8181
slug: grpc-definition
8282

8383
- display-name: Fern Definition
84-
path: ./products/api-def/api-def.yml
84+
path: ./products/api-def/ferndef-def.yml
8585
icon: fa-regular fa-seedling
8686
image: ./images/product-switcher/fern-definition-light.png
8787
slug: fern-definition
@@ -411,6 +411,9 @@ redirects:
411411
- source: /learn/docs/content/visual-editor
412412
destination: /learn/docs/writing-content/visual-editor
413413
permanent: true
414+
- source: /learn/docs/writing-content/code-blocks
415+
destination: /learn/docs/writing-content/components/code-blocks
416+
permanent: true
414417

415418
- source: /learn/docs/getting-started/changelog/:slug*
416419
destination: /learn/docs/changelog/:slug*
@@ -476,43 +479,40 @@ redirects:
476479
# API DEFINITION REDIRECTS
477480
# ============================================================================
478481

479-
# API Definition OpenAPI specific redirects first
482+
# # API Definition OpenAPI specific redirects first
480483
- source: /learn/api-definition/openapi/endpoints/:slug*
481-
destination: /learn/openapi-definition/endpoints/:slug*
484+
destination: /learn/api-definitions/openapi/endpoints/:slug*
482485
permanent: true
483486
- source: /learn/api-definition/openapi/extensions/:slug*
484-
destination: /learn/openapi-definition/extensions/:slug*
487+
destination: /learn/api-definitions/openapi/extensions/:slug*
485488
permanent: true
486489
- source: /learn/api-definition/openapi/frameworks/:slug*
487-
destination: /learn/openapi-definition/frameworks/:slug*
490+
destination: /learn/api-definitions/openapi/frameworks/:slug*
488491
permanent: true
489492
- source: /learn/api-definition/openapi/:slug*
490-
destination: /learn/openapi-definition/:slug*
493+
destination: /learn/api-definitions/openapi/:slug*
491494
permanent: true
492495
- source: /learn/openapi-definition/extensions/webhooks
493-
destination: /learn/openapi-definition/endpoints/webhooks
496+
destination: /learn/api-definitions/openapi/endpoints/webhooks
494497
permanent: true
495498

496499
# API Definition Fern specific redirects first
497500
- source: /learn/api-definition/fern/endpoints/:slug*
498-
destination: /learn/fern-definition/endpoints/:slug*
501+
destination: /learn/api-definitions/ferndef/endpoints/:slug*
499502
permanent: true
500503
- source: /learn/api-definition/fern/api-yml/:slug*
501-
destination: /learn/fern-definition/api-yml/:slug*
504+
destination: /learn/api-definitions/ferndef/api-yml/:slug*
502505
permanent: true
503506
- source: /learn/api-definition/fern/:slug*
504-
destination: /learn/fern-definition/:slug*
507+
destination: /learn/api-definitions/ferndef/:slug*
505508
permanent: true
506509

507-
# API Definition Introduction redirects
510+
# # API Definition Introduction redirects
508511
- source: /learn/api-definition/introduction/what-is-an-api-definition
509-
destination: /learn/openapi-definition/overview
512+
destination: /learn/api-definitions/overview/what-is-an-api-definition
510513
permanent: true
511514
- source: /learn/api-definition/introduction/what-is-the-fern-folder
512-
destination: /learn/sdks/overview/quickstart
513-
permanent: true
514-
- source: /learn/api-definition/introduction/:slug*
515-
destination: /learn/openapi-definition/overview
515+
destination: /learn/api-definitions/overview/project-structure
516516
permanent: true
517517

518518
# ============================================================================
@@ -573,6 +573,21 @@ redirects:
573573
# ============================================================================
574574
# API REFERENCE REDIRECTS
575575
# ============================================================================
576+
- source: /learn/openapi-definition/empty-page
577+
destination: /learn/api-definitions/openapi/overview
578+
permanent: true
579+
- source: /learn/asyncapi-definition/empty-page
580+
destination: /learn/api-definitions/asyncapi/overview
581+
permanent: true
582+
- source: /learn/openrpc-definition/empty-page
583+
destination: /learn/api-definitions/openrpc/overview
584+
permanent: true
585+
- source: /learn/grpc-definition/empty-page
586+
destination: /learn/api-definitions/grpc/overview
587+
permanent: true
588+
- source: /learn/fern-definition/empty-page
589+
destination: /learn/api-definitions/ferndef/overview
590+
permanent: true
576591
- source: /learn/openapi-definition/:slug*
577592
destination: /learn/api-definitions/openapi/:slug*
578593
permanent: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
navigation:
2+
- page: AsyncAPI Definition Redirect Page
3+
path: ./pages/asyncapi-empty.mdx
4+
slug: empty-page
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
navigation:
2+
- page: Fern Definition Redirect Page
3+
path: ./pages/ferndef-empty.mdx
4+
slug: empty-page

fern/products/api-def/grpc-def.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
navigation:
2+
- page: gRPC Definition Redirect Page
3+
path: ./pages/grpc-empty.mdx
4+
slug: empty-page
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
navigation:
2+
- page: OpenAPI Definition Redirect Page
3+
path: ./pages/openapi-empty.mdx
4+
slug: empty-page
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
navigation:
2+
- page: OpenRPC Definition Redirect Page
3+
path: ./pages/openrpc-empty.mdx
4+
slug: empty-page
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: AsyncAPI Definition Redirect Page
3+
description: This is an empty page used to redirect to the AsyncAPI Definition pages.
4+
---
5+
6+
<Warning>This page is empty. Please visit the [AsyncAPI Definition](/api-definitions/asyncapi/overview) page for more information.</Warning>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Fern Definition Redirect Page
3+
description: This is an empty page used to redirect to the Fern Definition pages.
4+
---
5+
6+
<Warning>This page is empty. Please visit the [Fern Definition](/api-definitions/ferndef/overview) page for more information.</Warning>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: gRPC Definition Redirect Page
3+
description: This is an empty page used to redirect to the gRPC Definition pages.
4+
---
5+
6+
<Warning>This page is empty. Please visit the [gRPC Definition](/api-definitions/grpc/overview) page for more information.</Warning>

0 commit comments

Comments
 (0)