Skip to content

Commit

Permalink
docs: Add sway examples (#447)
Browse files Browse the repository at this point in the history
* Ready for review

* add audits

* more audits
  • Loading branch information
calldelegation authored Oct 4, 2024
1 parent 08d84f9 commit 7a1ee9e
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 62 deletions.
9 changes: 8 additions & 1 deletion docs/intro/what-is-fuel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ cardsInfo={[
isExternal: true,
heading: 'Sway By Example',
headingIcon: 'Beach',
body: 'An introduction to Sway with simple examples',
body: 'An introduction to Sway with bite-sized simple examples',
},
{
link: 'https://github.com/FuelLabs/sway-examples',
isExternal: true,
heading: 'Sway Examples',
headingIcon: 'Robot',
body: 'Examples of full-stack DeFi applications',
},
{
link: '/docs/sway-libs',
Expand Down
2 changes: 1 addition & 1 deletion docs/migrations-and-disclosures
2 changes: 1 addition & 1 deletion docs/nightly/migrations-and-disclosures
122 changes: 63 additions & 59 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { join } from "path";
import { join } from 'path';

export const DOCS_DIRECTORY = join(process.cwd(), "./docs");
export const NIGHTLY_DOCS_DIRECTORY = join(process.cwd(), "./docs/nightly");
export const FIELDS = ["title", "slug", "content", "category"];
export const DOCS_DIRECTORY = join(process.cwd(), './docs');
export const NIGHTLY_DOCS_DIRECTORY = join(process.cwd(), './docs/nightly');
export const FIELDS = ['title', 'slug', 'content', 'category'];

export const FUEL_TESTNET = "testnet";
export const FUEL_TESTNET_UPPER_CASE = "Testnet";
export const TESTNET_VERSION = "v1";
export const FUEL_TESTNET = 'testnet';
export const FUEL_TESTNET_UPPER_CASE = 'Testnet';
export const TESTNET_VERSION = 'v1';
export const FAUCET_LINK = `https://faucet-${FUEL_TESTNET}.fuel.network/`;
export const PLAYGROUND_LINK = `https://${FUEL_TESTNET}.fuel.network/${TESTNET_VERSION}/playground/`;
export const EXPLORER_LINK = "https://app.fuel.network/";
export const BRIDGE_LINK = "https://app.fuel.network/bridge";
export const EXPLORER_LINK = 'https://app.fuel.network/';
export const BRIDGE_LINK = 'https://app.fuel.network/bridge';

export type LinkObject = {
name: string;
Expand All @@ -20,32 +20,36 @@ export type LinkObject = {

export const EXTERNAL_NAVIGATION_LINKS: LinkObject[] = [
{
name: "Sway Core Lib",
link: "https://fuellabs.github.io/sway/master/core/",
name: 'Sway Core Lib',
link: 'https://fuellabs.github.io/sway/master/core/',
},
{
name: "Sway Std Lib",
link: "https://fuellabs.github.io/sway/master/std/",
name: 'Sway Std Lib',
link: 'https://fuellabs.github.io/sway/master/std/',
},
{
name: "Example Applications",
link: "https://github.com/FuelLabs/sway-applications/",
name: 'Sway Examples',
link: 'https://github.com/FuelLabs/sway-examples/',
},
{
name: "Sway Playground",
link: "https://sway-playground.org/",
name: 'Example Applications',
link: 'https://github.com/FuelLabs/sway-applications/',
},
{
name: "Sway By Example",
link: "https://swaybyexample.com/",
name: 'Sway Playground',
link: 'https://sway-playground.org/',
},
{
name: "Faucet",
name: 'Faucet',
link: FAUCET_LINK,
},
{
name: "Contributing",
link: "/docs/contributing",
name: 'Audits',
link: 'https://github.com/FuelLabs/audits',
},
{
name: 'Contributing',
link: '/docs/contributing',
},
];

Expand All @@ -54,98 +58,98 @@ export const EXTERNAL_NAVIGATION_LINKS: LinkObject[] = [
// biome-ignore lint/suspicious/noExplicitAny:
export const NAVIGATION: any[] = [
{
name: "Guides",
link: "/guides",
name: 'Guides',
link: '/guides',
},
{
name: "Intro",
link: "/docs/intro",
name: 'Intro',
link: '/docs/intro',
},
{
name: "Sway",
name: 'Sway',
menu: [
{
name: "Sway Language",
name: 'Sway Language',
},
{
name: "Sway",
link: "/docs/sway",
name: 'Sway',
link: '/docs/sway',
},
{
name: "Standard Library",
link: "https://fuellabs.github.io/sway/master/std/",
name: 'Standard Library',
link: 'https://fuellabs.github.io/sway/master/std/',
},
{
name: "Core Library",
link: "https://fuellabs.github.io/sway/master/core/",
name: 'Core Library',
link: 'https://fuellabs.github.io/sway/master/core/',
},
{
name: "Sway Playground",
link: "https://sway-playground.org",
name: 'Sway Playground',
link: 'https://sway-playground.org',
},
{
name: "Sway By Example",
link: "https://swaybyexample.com/",
name: 'Sway By Example',
link: 'https://swaybyexample.com/',
},
{
name: "Example Apps",
link: "https://github.com/FuelLabs/sway-applications/",
name: 'Example Apps',
link: 'https://github.com/FuelLabs/sway-applications/',
},
{
name: "Tooling",
name: 'Tooling',
},
{
name: "Forc",
link: "/docs/forc",
name: 'Forc',
link: '/docs/forc',
},
],
},
{
name: "SDKs",
name: 'SDKs',
menu: [
{
name: "Rust SDK",
link: "/docs/fuels-rs",
name: 'Rust SDK',
link: '/docs/fuels-rs',
},
{
name: "TypeScript SDK",
link: "/docs/fuels-ts",
name: 'TypeScript SDK',
link: '/docs/fuels-ts',
},
{
name: "Wallet",
link: "/docs/wallet/install/",
name: 'Wallet',
link: '/docs/wallet/install/',
},
],
},
{
name: "Network",
name: 'Network',
menu: [
// {
// name: 'About Fuel',
// link: '/docs/about-fuel/',
// },
{
name: "GraphQL API",
link: "/docs/graphql/overview/",
name: 'GraphQL API',
link: '/docs/graphql/overview/',
},
{
name: "Specifications",
link: "/docs/specs",
name: 'Specifications',
link: '/docs/specs',
},
{
name: "Explorer",
name: 'Explorer',
link: EXPLORER_LINK,
},
{
name: "Faucet",
name: 'Faucet',
link: FAUCET_LINK,
},
{
name: "Bridge",
name: 'Bridge',
link: BRIDGE_LINK,
},
],
},
];

export const DEFAULT_THEME = "light";
export const DEFAULT_THEME = 'light';

0 comments on commit 7a1ee9e

Please sign in to comment.