diff --git a/README.md b/README.md index ab6c1ac..de79147 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,7 @@ -# Astro Starter Kit: Docs Site +# Boom Platform: Docs Site -[![Build Astro site](https://github.com/advanced-astro/astro-docs-template/actions/workflows/test.yml/badge.svg)](https://github.com/advanced-astro/astro-docs-template/actions/workflows/test.yml) - -```bash -pnpm create astro@latest -- --template advanced-astro/astro-docs-template -``` - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/advanced-astro/astro-docs-template) -[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/s/github/advanced-astro/astro-docs-template) - -> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! +docs are found in the `src/content/docs/` folder(s). Pages are written in markdown or mdx. -![docs](https://user-images.githubusercontent.com/4677417/186189283-0831b9ab-d6b9-485d-8955-3057e532ab31.png) - -## Key Features - -- 📝 **Full Markdown and MDX support** -- 📱 **Responsive mobile-friendly design** -- 🧭 **Sidebar navigation** -- 🔎 **Search (powered by Algolia)** -- 🔤 **Self-Hosted webfont (GDPR compliant)** -- 🗨️ **Multi-language i18n** -- 📃 **Automatic table of contents** -- 🧑‍💻 **Automatic list of contributors** -- 🌙 (and, best of all) **dark mode** ## 🧞 Commands @@ -38,141 +16,17 @@ All commands are run from the root of the project, from a terminal: | `pnpm run astro ...` | Run CLI commands like `astro add`, `astro check` | | `pnpm run astro --help` | Get help using the Astro CLI | -To deploy your site to production, check out our [Deploy an Astro Website](https://docs.astro.build/guides/deploy) guide. - -## 👀 Want to learn more? - -Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). - -## Customize This Theme - -### Site metadata - -`src/config.ts` contains several data objects that describe metadata about your site like title, description, default language, and Open Graph details. You can customize these to match your project. - -### SCSS styling - -The theme's look and feel is controlled by a few key variables that you can customize yourself. You'll find them in the `src/styles/theme.scss` SCSS file. - -If you've never worked with CSS variables before, give [MDN's guide on CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) a quick read. - -This theme uses a "cool blue" accent color by default. To customize this for your project, change the `--theme-accent` variable to whatever color you'd like: - -```diff -/* src/styles/theme.css */ -:root { - color-scheme: light; -- --theme-accent: hsla(var(--color-blue), 1); -+ --theme-accent: hsla(var(--color-red), 1); /* or: hsla(#FF0000, 1); */ -``` - -## Page metadata - -Astro uses frontmatter in [Markdown](https://www.markdownguide.org/) and [MDX](https://mdxjs.com/) pages to choose layouts and pass properties to those layouts. If you are using the default layout, you can customize the page in many different ways to optimize SEO and other things. For example, you can use the `title` and `description` properties to set the document title, meta title, meta description, and Open Graph description. - -```markdown ---- -title: Example title -description: Really cool docs example that uses Astro -layout: ../../layouts/MainLayout.astro ---- - -# Page content... -``` - -For more SEO related properties, look at `src/components/HeadSEO.astro` -### Sidebar navigation -The sidebar navigation is controlled by the `SIDEBAR` variable in your `src/config.ts` file. You can customize the sidebar by modifying this object. A default, starter navigation has already been created for you. -```ts -export const SIDEBAR = { - en: [ - { text: 'Section Header', header: true }, - { text: 'Introduction', link: 'en/introduction' }, - { text: 'Page 2', link: 'en/page-2' }, - { text: 'Page 3', link: 'en/page-3' }, +## New to Astro? - { text: 'Another Section', header: true }, - { text: 'Page 4', link: 'en/page-4' } - ] -} -``` - -Note the top-level `en` key: This is needed for multi-language support. You can change it to whatever language you'd like, or add new languages as you go. More details on this below. - -### Multiple Languages support - -The Astro docs template supports multiple languages out of the box. The default theme only shows `en` documentation, but you can enable multi-language support features by adding a second language to your project. - -To add a new language to your project, you'll want to extend the current `src/content/docs/[lang]/...` layout: - -```diff - 📂 src/content/docs - ┣ 📂 en - ┃ ┣ 📜 page-1.md - ┃ ┣ 📜 page-2.md - ┃ ┣ 📜 page-3.astro -+ ┣ 📂 es -+ ┃ ┣ 📜 page-1.md -+ ┃ ┣ 📜 page-2.md -+ ┃ ┣ 📜 page-3.astro -``` - -You'll also need to add the new language name to the `KNOWN_LANGUAGES` map in your `src/config.ts` file. This will enable your new language switcher in the site header. - -```diff -// src/config.ts -export const KNOWN_LANGUAGES = { - English: 'en', -+ Spanish: 'es', -}; -``` - -Last step: you'll need to add a new entry to your sidebar, to create the table of contents for that language. While duplicating every page might not sound ideal to everyone, this extra control allows you to create entirely custom content for every language. - -> Make sure the sidebar `link` value points to the correct language! - -```diff -// src/config.ts -export const SIDEBAR = { - en: [ - { text: 'Section Header', header: true, }, - { text: 'Introduction', link: 'en/introduction' }, - // ... - ], -+ es: [ -+ { text: 'Encabezado de sección', header: true, }, -+ { text: 'Introducción', link: 'es/introduction' }, -+ // ... -+ ], -}; - -// ... -``` - -If you plan to use Spanish as the default language, you just need to modify the redirect path in `src/pages/index.astro`: +[![Build Astro site](https://github.com/advanced-astro/astro-docs-template/actions/workflows/test.yml/badge.svg)](https://github.com/advanced-astro/astro-docs-template/actions/workflows/test.yml) -```diff - +```bash +pnpm create astro@latest -- --template advanced-astro/astro-docs-template ``` -You can also remove the above script and write a landing page in Spanish instead. - -### What if I don't plan to support multiple languages? - -That's totally fine! Not all projects need (or can support) multiple languages. You can continue to use this theme without ever adding a second language. - -If that single language is not English, you can just replace `en` in directory layouts and configurations with the preferred language. - -### Search (Powered by Algolia) - -[Algolia](https://www.algolia.com/) offers a free service to qualified open source projects called [DocSearch](https://docsearch.algolia.com/). If you are accepted to the DocSearch program, provide your API Key & index name in `src/config.ts` and a search box will automatically appear in your site header. - -Note that Aglolia and Astro are not affiliated. We have no say over acceptance to the DocSearch program. +## 👀 Want to learn more? -If you'd prefer to remove Algolia's search and replace it with your own, check out the `src/components/Header.astro` component to see where the component is added. +Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). diff --git a/astro.config.mjs b/astro.config.mjs index 8773f45..f120ba5 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -9,5 +9,5 @@ import sitemap from '@astrojs/sitemap' export default defineConfig({ integrations: [mdx(), preact(), react(), sitemap()], base: `/`, - site: `https://stackspay.org` + site: `https://boom.money` }) diff --git a/src/components/Footer/AvatarList.astro b/src/components/Footer/AvatarList.astro index 42a6d61..a72422f 100644 --- a/src/components/Footer/AvatarList.astro +++ b/src/components/Footer/AvatarList.astro @@ -5,8 +5,8 @@ type Props = { } const { path } = Astro.props const resolvedPath = `${path}` -const url = `https://api.github.com/repos/advanced-astro/astro-docs-template/commits?path=${resolvedPath}` -const commitsURL = `https://github.com/advanced-astro/astro-docs-template/commits/main/${resolvedPath}` +const url = `https://api.github.com/repos/boomcrypto/docs.boom.money/commits?path=${resolvedPath}` +const commitsURL = `https://github.com/boomcrypto/docs.boom.money/commits/main/${resolvedPath}` type Commit = { author: { diff --git a/src/components/HeadSEO.astro b/src/components/HeadSEO.astro index 782ca2f..ad0f5e9 100644 --- a/src/components/HeadSEO.astro +++ b/src/components/HeadSEO.astro @@ -35,10 +35,7 @@ const imageAlt = image?.alt ?? OPEN_GRAPH.image.alt + + - + diff --git a/src/components/Header/Header.astro b/src/components/Header/Header.astro index 45732b5..96c707b 100644 --- a/src/components/Header/Header.astro +++ b/src/components/Header/Header.astro @@ -5,7 +5,7 @@ import BoomLogo from './BoomLogo.astro' import SkipToContent from './SkipToContent.astro' import SidebarToggle from './SidebarToggle' import LanguageSelect from './LanguageSelect' -import Search from './Search' +// import Search from './Search' type Props = { currentPage: string @@ -28,14 +28,14 @@ const lang = getLanguageFromURL(currentPage) -
+ { KNOWN_LANGUAGE_CODES.length > 1 && ( ) - } + } diff --git a/src/consts.ts b/src/consts.ts index 3360f7a..3a919e8 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -1,16 +1,15 @@ export const SITE = { title: 'Boom', - description: 'Boom: Fast and easy Bitcoin payments', + description: 'Fast and easy Bitcoin payments', defaultLanguage: 'en-us' } as const export const OPEN_GRAPH = { image: { src: 'default-og-image.png', - alt: - 'Boom logo,' + alt: 'Boom. Fast & easy Bitcoin payments.' }, - twitter: 'boom_wallet' + twitter: 'boom_wallet', } export const KNOWN_LANGUAGES = { diff --git a/src/content/docs/en/introduction.mdx b/src/content/docs/en/introduction.mdx index 99fba12..c36bcfe 100644 --- a/src/content/docs/en/introduction.mdx +++ b/src/content/docs/en/introduction.mdx @@ -1,6 +1,6 @@ --- title: Introduction -hide_breadcrumbs: true +hide_breadcrumbs: true --- **Boom** is built to leverage the Stacks blockchain & sBTC make a more decentralized, non-custodial, trust minimized Bitcoin payment layer for the rest of us. diff --git a/src/content/docs/en/merchant.mdx b/src/content/docs/en/merchant.mdx deleted file mode 100644 index f132c8a..0000000 --- a/src/content/docs/en/merchant.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: 'How to Use Stacks Pay as a Merchant' -description: 'Stacks Pay allows merchants to accept payments in cryptocurrency quickly and securely on the Stacks blockchain.' ---- - -### **Getting Started** - -Stacks Pay allows merchants to accept payments in cryptocurrency quickly and securely on the Stacks blockchain. Whether you're selling products, accepting donations, or invoicing clients, Stacks Pay generates encoded payment links or QR codes that your customers can use to make payments to your Stacks wallet. - -Payment links can be generated via our SDK or API (locations will be added later). While **Boom Wallet** supports generating Stacks Pay links, any Stacks-compatible wallet (such as **Xverse** or **Leather**) can be used to receive payments. Additionally, any merchant that accepts Stacks Pay can integrate it into their payment workflow. - -### **Step 1: Set Up Your Stacks Wallet** - -Before you can begin accepting payments, you’ll need a Stacks wallet to receive funds. If you don’t already have one, follow these steps: - -1. **Choose a Wallet**: You can use any Stacks-compatible wallet to receive payments, such as [Xverse](https://www.xverse.app/), [Leather](https://leather.io/), or [Boom Wallet](https://www.boomwallet.app). - -2. **Create Your Wallet**: Download and install the wallet of your choice, then follow the instructions to create a new wallet. Make sure to safely store your recovery phrase, as it's essential for accessing your funds. - -3. **Get Your Stacks Address**: After setting up your wallet, copy your Stacks address. It’s typically a long string starting with "SP" (e.g., `SP2YDB...`). This is the address you’ll use to receive payments. - -### **Step 2: Create a Payment Request** - -To accept payments, you’ll need to generate a Stacks Pay payment link. You can generate these encoded payment links using our SDK or API (locations will be added later). While **Boom Wallet** supports generating Stacks Pay links, merchants can integrate Stacks Pay into their own systems. - -Here’s how to generate a Stacks Pay payment link: - -1. **Use the SDK or API**: - - Utilize our SDK or API to generate a payment link by providing the necessary payment details. - - Enter the following information: - - **Recipient**: BNS name or Stacks address where the payment will be sent. - - **Amount**: The fixed amount (in STX or tokens) if you’re selling a product. For donations or open-ended payments, you can leave this blank, allowing the customer to enter their desired amount. - - **Description**: A short description of the payment (e.g., “Payment for consulting services” or “Donation to support our nonprofit”). - - **Stacks Pay ID (spId)**: By default, an `spId` will be automatically generated. However, you can provide a custom `spId` to tie the payment to your internal order numbers or workflows. - - **Note**: Documentation and resources for the SDK and API will be available soon. Please check back for updates. - -2. **Generate the Encoded Payment Link**: - - The SDK or API will create a Bech32m-encoded payment link based on the information provided. - - **Note**: Stacks Pay URLs are always encoded to ensure compatibility, security, and error detection. The encoded link will look something like: - ``` - stxpay1qpz9eyarqj8guvs49epj7wp6rszpe6sczxsrdsgx5uqzgkx5fw - ``` - This encoded link ensures that the payment details are securely transmitted to the customer’s wallet. - -3. **Generate the QR Code (Optional)**: - - If you’re handling in-person transactions or want to make it easier for mobile users, you can also generate a QR code from the payment link. Many tools and libraries offer the option to generate a QR code from a URL. - -### **Step 3: Share the Payment Request with Your Customer** - -Once you’ve generated the Stacks Pay link or QR code, you can easily share it with your customers. - -1. **Via Email or Messaging**: - - Copy the encoded payment link and include it in an email or message to your customer. - - Example: “Please click the link below to complete your payment: [Encoded Payment Link]” - -2. **Embed on Your Website**: - - If you run an online store, you can embed the payment link as a button on your website. - - Example: Add a “Pay with Stacks” button that links to the encoded payment URL for a seamless customer experience. - -3. **Use a QR Code for In-Person Payments**: - - For mobile-first or in-person payments, display the generated QR code at checkout. Your customer can scan the QR code with their wallet app (such as Boom, Xverse, or Leather) to initiate the payment. - -### **Step 4: Receive Payments in Your Wallet** - -Once your customer completes the payment, the funds will be sent directly to your Stacks wallet. Here’s how to track and verify the payment: - -1. **Check Your Wallet**: - - Log into your wallet (Boom, Xverse, Leather, etc.) and monitor incoming transactions. Payments should appear shortly after they’ve been confirmed on the blockchain. - -2. **Verify the Payment**: - - Check the transaction details to ensure that the correct amount has been sent. The `spId` (Stacks Pay ID) can help you confirm that the payment matches your specific request. - -3. **Track the Payment on the Blockchain**: - - Since Stacks Pay operates on the Stacks blockchain, you can view every transaction publicly on a blockchain explorer like [Stacks Explorer](https://explorer.stacks.co). Simply enter your Stacks address to view the payment status. - -### **Step 5: Best Practices for Using Stacks Pay** - -To ensure smooth payment processing for both you and your customers, follow these best practices: - -- **Use the SDK or API for Payment Generation**: Generate Stacks Pay payment links using our SDK or API to integrate seamlessly with your systems. - -- **Utilize the `spId` for Order Tracking**: Use the `spId` to tie payments to your internal order numbers or workflows. By default, an `spId` is automatically generated, but you can provide a custom `spId` when generating the payment link. - -- **Verify Payment Details**: Always double-check that the recipient address, amount, and description are correct before sharing the payment link. - -- **Share Payment Links Securely**: When sharing links via email, messaging apps, or websites, ensure that they are transmitted securely. Always preview the link before sending to prevent errors. - -- **Monitor Your Payments**: Keep an eye on your wallet for incoming transactions. For merchants handling multiple payments, use the `spId` to track and verify each transaction efficiently. - -- **Secure Your Wallet**: For larger amounts, consider using a hardware wallet or enabling two-factor authentication (2FA) to protect your funds. - -- **Respond Quickly to Payment Issues**: If a customer accidentally sends the wrong amount or experiences a payment issue, verify the transaction on the blockchain and address any concerns promptly. - -### **Example: Accepting Payments with Stacks Pay** - -Let’s say you run an online store and want to accept payments in cryptocurrency. Here’s how you can use Stacks Pay to handle the process: - -1. **Create the Payment Request**: - - Use the SDK or API to generate a payment link. - - Enter your Stacks address as the recipient. - - Specify the amount for the product or service. - - Add a description like “Payment for Order #12345”. - - Provide an `spId` matching your internal order number (e.g., `Order12345`) to tie the payment to your order workflow. - -2. **Share the Payment Link**: - - Integrate the payment link into your checkout process. - - Customers can click the link or scan a QR code to initiate the payment. - -3. **Customer Makes the Payment**: - - The customer's wallet (Boom, Xverse, Leather, etc.) will open with the payment details filled in. They can confirm and complete the payment. - -4. **Verify the Payment**: - - You check your wallet or system to ensure the payment has been received. The `spId` helps you confirm the payment corresponds to the specific order. - -### **Next Steps for Merchants** - -Now that you understand how to create and manage Stacks Pay payment requests, it’s time to integrate it into your business: - -- **Use the SDK or API**: Begin creating encoded payment links for your products, services, or donations using our SDK or API (locations will be added later). - -- **Integrate with Your Systems**: Incorporate Stacks Pay into your existing payment workflows, utilizing the `spId` to track orders and payments. - -- **Share Payment Links with Customers**: Whether through your website, email, or QR codes, make it easy for customers to pay using Stacks Pay. - -- **Monitor Transactions**: Keep track of all incoming payments and verify them using your wallet or a blockchain explorer. - -For more information on how customers will use Stacks Pay to make payments, check out our [User Guide on How to Pay Using Stacks Pay](#how-to-pay-using-stacks-pay).