Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Add redirects for the various guides
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed Mar 26, 2024
1 parent 25dfda3 commit e7109e0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/guides/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
title: How-To Guides
description: here you will find really useful guides
hide_table_of_contents: true
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/smart-contracts/guides
label: How-To Guides
---

:::danger These are not the droids you're looking for

This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/smart-contracts/guides) for the most up-to-date information

:::

The page lists all guides we have available for Soroban. Simply put, a "guide" is a short, bite-sized example that details how to accomplish a specific task. These guides are focused on a single topic, and are limited in scope.
2 changes: 2 additions & 0 deletions nginx/includes/redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ rewrite "^/docs/category/soroban-internals$" "https://developers.stellar.org/doc
rewrite "^/docs/soroban-internals/contract-interactions$" "https://developers.stellar.org/docs/learn/smart-contract-internals/contract-interactions/overview" permanent;
rewrite "^/docs/soroban-internals(.*)$" "https://developers.stellar.org/docs/learn/smart-contract-internals$1" permanent;
rewrite "^/docs/migrate(.*)$" "https://developers.stellar.org/docs/learn/migrate$1" permanent;
# smart contracts
rewrite "^/docs/guides(.*)$" "https://developers.stellar.org/docs/smart-contracts/guides$1" permanent;
7 changes: 7 additions & 0 deletions src/sidebar-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ const path = require('path')
const migrationLinksRecursive = (sidebarItems) => {
const result = sidebarItems.map((sidebarItem) => {
if (sidebarItem.type === 'category') {
if (sidebarItem.label === 'How-To Guides') {
return {
type: 'link',
href: sidebarItem.customProps.migration.href,
label: sidebarItem.customProps.migration.label,
}
}
return {...sidebarItem, items: migrationLinksRecursive(sidebarItem.items)}
}

Expand Down

0 comments on commit e7109e0

Please sign in to comment.