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 tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed Mar 26, 2024
1 parent e7109e0 commit a4d2f1d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
10 changes: 10 additions & 0 deletions docs/tutorials/README.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
---
title: Tutorials
hide_table_of_contents: true
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/smart-contracts/example-contracts
label: Tutorials
---

import DocCardList from "@theme/DocCardList";

:::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/example-contracts) for the most up-to-date information

:::

The Soroban team has put together a large collection of [example contracts] to demonstrate use of the Soroban smart contracts platform. For many of these example contracts, we've written an accompanying "tutorial" that will walk you through the example contracts and describe a bit more about their design. You can think of these "tutorials" as example contracts that end with a deployable smart contract. You can use the provided filters to find a relevant tutorial for your experience level.

<DocCardList />
Expand Down
13 changes: 7 additions & 6 deletions nginx/includes/redirects.conf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
rewrite "^/docs/category/examples$" "/docs/tutorials" permanent;
rewrite "^/docs/category/examples$" "https://developers.stellar.org/docs/smart-contracts/example-contracts" permanent;
rewrite "^/docs/getting-started/run-rpc$" "https://developers.stellar.org/network/soroban-rpc/admin-guide" permanent;
rewrite "^/docs/category/tutorials$" "/docs/tutorials" permanent;
rewrite "^/docs/category/tutorials$" "https://developers.stellar.org/docs/smart-contracts/example-contracts" permanent;
rewrite "^/docs/tutorials/deploy-to-futurenet$" "/docs/getting-started/deploy-to-testnet" permanent;
rewrite "^/fundamentals-and-concepts/faq$" "/docs/faq" permanent;
rewrite "^/docs/examples/events$" "/docs/tutorials/events" permanent;
rewrite "^/docs/examples/events$" "https://developers.stellar.org/docs/smart-contracts/example-contracts/events" permanent;
rewrite "^/docs/learn/rust-dialect$" "https://developers.stellar.org/docs/learn/smart-contract-internals/rust-dialect" permanent;
rewrite "^/docs/advanced-tutorials/liquidity-pool-b6f$" "/docs/tutorials/liquidity-pool" permanent;
rewrite "^/docs/advanced-tutorials/liquidity-pool-b6f$" "https://developers.stellar.org/docs/smart-contracts/example-contracts/liquidity-pool" permanent;
rewrite "^/docs(/category)?/learn$" "https://developers.stellar.org/docs/learn/smart-contract-internals" permanent;
rewrite "^/docs/category/fundamentals-and-concepts$" "https://developers.stellar.org/docs/learn/smart-contract-internals" permanent;
rewrite "^/docs/built-in-contracts/token$" "/docs/tokens/stellar-asset-contract" permanent;
Expand All @@ -15,7 +15,7 @@ rewrite "^/docs/tutorials/testing$" "https://developers.stellar.org/docs/learn/s
rewrite "^/docs/category/how-to-guides$" "/docs/guides" permanent;
rewrite "^/docs/getting-started/connect-freighter-wallet$" "/docs/reference/freighter" permanent;
rewrite "^/docs/common-interfaces/token$" "/docs/tokens/token-interface" permanent;
rewrite "^/docs/how-to-guides/tokens$" "/docs/tutorials/tokens" permanent;
rewrite "^/docs/how-to-guides/tokens$" "https://developers.stellar.org/docs/smart-contracts/example-contracts/tokens" permanent;
rewrite "^/dapps/category/challenges$" "/dashboard" permanent;
rewrite "^/docs/guides/cli/wrap-token$" "/docs/guides/cli/deploy-stellar-asset-contract" permanent;
# BEGIN re-structure redirects
Expand All @@ -32,7 +32,7 @@ rewrite "^/docs/fundamentals-and-concepts/(built-in-types|custom-types|fully-typ
rewrite "^/docs/fundamentals-and-concepts/invoking-contracts-with-transactions$" "https://developers.stellar.org/docs/learn/smart-contract-internals/contract-interactions/stellar-transaction" permanent;
rewrite "^/docs/soroban-internals/contract-interactions/stellar-transactions$" "https://developers.stellar.org/docs/learn/smart-contract-internals/contract-interactions/stellar-transaction" permanent;
rewrite "^/docs/fundamentals-and-concepts/interacting-with-contracts$" "https://developers.stellar.org/docs/learn/smart-contract-internals/contract-interactions" permanent;
rewrite "^/docs/(basic|advanced)-tutorials(/.*)$" "/docs/tutorials$2" permanent;
rewrite "^/docs/(basic|advanced)-tutorials(/.*)$" "https://developers.stellar.org/docs/smart-contracts/example-contracts$2" permanent;
rewrite "^/docs/fundamentals-and-concepts(/.*)$" "https://developers.stellar.org/docs/learn/smart-contract-internals$1" permanent;
rewrite "^/docs/notes" "https://developers.stellar.org/meetings" permanent;
##### BEGIN merge redirects
Expand Down Expand Up @@ -65,3 +65,4 @@ rewrite "^/docs/soroban-internals(.*)$" "https://developers.stellar.org/docs/lea
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;
rewrite "^/docs/tutorials(.*)$" "https://developers.stellar.org/docs/smart-contracts/example-contracts$1" permanent;
2 changes: 1 addition & 1 deletion src/sidebar-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path')
const migrationLinksRecursive = (sidebarItems) => {
const result = sidebarItems.map((sidebarItem) => {
if (sidebarItem.type === 'category') {
if (sidebarItem.label === 'How-To Guides') {
if (sidebarItem.label === 'How-To Guides' || sidebarItem.label === 'Tutorials') {
return {
type: 'link',
href: sidebarItem.customProps.migration.href,
Expand Down

0 comments on commit a4d2f1d

Please sign in to comment.