mirror of https://github.com/lukechilds/docs.git
Jonathon
3 years ago
committed by
Friedger Müffke
50 changed files with 727 additions and 2440 deletions
@ -1,2 +1,5 @@ |
|||
/// <reference types="next" />
|
|||
/// <reference types="next/types/global" />
|
|||
/// <reference types="next/image-types/global" />
|
|||
|
|||
// NOTE: This file should not be edited
|
|||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
|||
|
@ -0,0 +1,18 @@ |
|||
import { NextRequest, NextResponse } from 'next/server'; |
|||
import { SUPPORTED_LANGUAGES } from '../common/constants'; |
|||
|
|||
export function middleware(request: NextRequest) { |
|||
if (request.nextUrl.pathname.includes('/api/')) { |
|||
return undefined; |
|||
} |
|||
const shouldHandleLocale = |
|||
!request.nextUrl.pathname.includes('/favicon') && |
|||
!request.nextUrl.pathname.includes('/static/'); |
|||
|
|||
const locale = request.headers.get('accept-language').substr(0, 2); |
|||
if ((shouldHandleLocale && !SUPPORTED_LANGUAGES.includes(locale)) || locale === 'en') { |
|||
return undefined; |
|||
} else if (!request.nextUrl.pathname.includes(locale)) { |
|||
return NextResponse.redirect(`/${locale}${request.nextUrl.pathname}`); |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
--- |
|||
title: Stacks documentation |
|||
description: Learn about Stacks mining, the STX token, and the Clarity smart contract language |
|||
--- |
|||
|
|||
-> Content related to developer tools and app development has recently moved to [docs.hiro.so](https://docs.hiro.so/). For more information on the content move, see [this post](https://forum.stacks.org/t/the-evolution-of-the-stacks-documentation-and-a-new-hiro-docs-site/12343) on the Stacks forum. |
|||
|
|||
## Understand Stacks |
|||
|
|||
[@page-reference | grid] |
|||
| /understand-stacks/overview, /understand-stacks/proof-of-transfer, /understand-stacks/testnet |
|||
|
|||
## Write smart contracts |
|||
|
|||
[@page-reference | grid] |
|||
| /write-smart-contracts/overview, /write-smart-contracts/tokens |
|||
|
|||
## Start mining |
|||
|
|||
[@page-reference | grid] |
|||
| /start-mining/mainnet, /start-mining/testnet |
File diff suppressed because it is too large
Loading…
Reference in new issue