|
1 | | -# Astro Shadcn UI Template |
| 1 | +# Block Open Source |
2 | 2 |
|
3 | | -This template helps you build apps with Astro, Tailwind CSS, and Shadcn UI. |
| 3 | +This repository contains the source code for [opensource.block.xyz](https://opensource.block.xyz), the open source home of Block, Inc. (NYSE: XYZ). |
4 | 4 |
|
5 | | -## Getting Started |
| 5 | +At Block, we Default to Open. We believe that open source and open protocols are essential to our purpose of Economic Empowerment. |
6 | 6 |
|
7 | | -To get started with this application, make sure you have Node.js v18+ installed on your system. Then, follow these steps: |
| 7 | +Block is a global technology company that builds tools to empower businesses and individuals to participate in the economy. Our open source initiatives span across payments, blockchain, security, and developer tools, reflecting our commitment to building in the open and contributing to the broader technology community. |
| 8 | + |
| 9 | +## About This Site |
| 10 | + |
| 11 | +This site serves as the central hub for Block's open source projects and efforts, featuring: |
| 12 | + |
| 13 | +- **Project Showcase**: Discover our open source projects and contributions |
| 14 | +- **Blog**: Technical articles, announcements, and insights from Block engineers |
| 15 | +- **Resources**: Documentation and guides for working with Block's open source projects |
| 16 | + |
| 17 | +## Build Instructions |
| 18 | + |
| 19 | +This site is built with [Astro](https://astro.build), a modern static site framework. It is forked from the Block Open Source [Docs Site Kickstarter](https://github.com/block/docs-site-kickstarter). |
| 20 | + |
| 21 | +### Prerequisites |
| 22 | + |
| 23 | +- Node.js v18 or higher (Tested w/ `24`) |
| 24 | +- [pnpm](https://pnpm.io) package manager |
| 25 | + |
| 26 | +### Development |
| 27 | + |
| 28 | +1. Clone the repository: |
| 29 | + ```bash |
| 30 | + git clone https://github.com/block/opensource.block.xyz.git |
| 31 | + cd opensource.block.xyz |
| 32 | + ``` |
| 33 | + |
| 34 | +2. Install dependencies: |
| 35 | + ```bash |
| 36 | + pnpm install |
| 37 | + ``` |
| 38 | + |
| 39 | +3. Start the development server: |
| 40 | + ```bash |
| 41 | + pnpm run dev |
| 42 | + ``` |
| 43 | + |
| 44 | +4. Open your browser and navigate to `http://localhost:4321` |
| 45 | + |
| 46 | +### Production Build |
| 47 | + |
| 48 | +To create a production build: |
8 | 49 |
|
9 | 50 | ```bash |
10 | | -git clone --depth=1 https://github.com/AREA44/astro-shadcn-ui-template |
11 | | -cd astro-shadcn-ui-template |
12 | | -pnpm install |
13 | | -pnpm dev |
| 51 | +pnpm run build |
14 | 52 | ``` |
15 | 53 |
|
16 | | -Now, you can open your browser and navigate to http://localhost:4321 to see the application running. |
| 54 | +The built site will be output to the `dist/` directory. |
| 55 | + |
| 56 | +To preview the production build locally: |
17 | 57 |
|
18 | | -## Features |
| 58 | +```bash |
| 59 | +pnpm run preview |
| 60 | +``` |
19 | 61 |
|
20 | | -- [Astro](https://astro.build): A modern static site builder that allows you to write components using familiar web standards like HTML, CSS, and JavaScript. |
21 | | -- [Tailwind CSS](https://tailwindcss.com): A utility-first CSS framework that provides a set of pre-designed styling classes to rapidly build user interfaces. |
22 | | -- [shadcn/ui](https://ui.shadcn.com): A collection of reusable UI components for building responsive and accessible interfaces. |
23 | | -- The template includes support for a theme toggle, allowing users to switch between light and dark themes. |
| 62 | +## Deployment |
24 | 63 |
|
25 | | -## How to add components |
| 64 | +This site is automatically deployed to production using GitHub Actions. |
26 | 65 |
|
27 | | -Shadcn UI is a collection of re-usable components that can be easily integrated into your applications. It is not a component library, but rather a set of components that you can copy and paste into your projects. |
| 66 | +- **Production Branch**: `production` |
| 67 | +- **Live Site**: [opensource.block.xyz](https://opensource.block.xyz) |
28 | 68 |
|
29 | | -To add a new component to your application, please refer to the [configuration guide](https://ui.shadcn.com/docs/installation/astro#thats-it). |
| 69 | +When changes are pushed to the `production` branch, a GitHub Action workflow automatically builds and deploys the site to the live environment. |
30 | 70 |
|
31 | | -> [!NOTE] |
32 | | -> In Astro, an [island](https://docs.astro.build/en/concepts/islands/) refers to any interactive UI component on the page. To add an interactive component like [Accordion](https://ui.shadcn.com/docs/components/accordion), [Dialog](https://ui.shadcn.com/docs/components/dialog) and more you have a couple of solutions available: [Add a Shadcn UI Component - Space Madness](https://spacemadness.dev/docs/add-a-shadcn-ui-component) or [shadcn-ui/ui#2890](https://github.com/AREA44/astro-shadcn-ui-template/issues/66). |
| 71 | +### Deployment Workflow |
33 | 72 |
|
34 | | -For detailed documentation on using Shadcn UI, please visit the [full documentation](https://ui.shadcn.com/docs). |
| 73 | +1. Make changes on a feature branch |
| 74 | +2. Create a pull request to the `production` branch |
| 75 | +3. After review and merge, the GitHub Action triggers automatically |
| 76 | +4. The site is built and deployed to opensource.block.xyz |
35 | 77 |
|
36 | | -Shadcn UI is primarily built for the React framework. If you are unfamiliar with framework components in Astro, we recommend reading the [framework components guide](https://docs.astro.build/en/core-concepts/framework-components/) to get started. |
| 78 | +## Contributing |
37 | 79 |
|
38 | | -Feel free to explore the various components and enhance your application with Shadcn UI! |
| 80 | +We welcome contributions! Please see our contributing guidelines for more information. |
39 | 81 |
|
40 | 82 | ## License |
41 | 83 |
|
42 | | -Licensed under the [MIT License](LICENSE). |
| 84 | +Licensed under the [Apache 2.0 License](LICENSE). |
0 commit comments