This repository contains the source code for the official Counterparty website. Counterparty is a platform for creating and trading user-defined assets on the Bitcoin blockchain.
- Astro: A modern static site generator
- TinaCMS: A Git-backed headless CMS for Markdown
- Markdown: For content management
- TypeScript: For type-safe JavaScript
- CSS: For styling
/
├── public/
├── src/
│ ├── components/
│ ├── content/
│ │ ├── collections/
│ │ ├── news/
│ │ └── wallets/
│ ├── layouts/
│ └── pages/
└── package.json
public/
: Static assetssrc/components/
: Reusable Astro componentssrc/content/
: Markdown files and content collectionssrc/layouts/
: Page layoutssrc/pages/
: Astro pages that generate routes
-
Clone the repository:
git clone https://github.com/your-username/counterparty-website.git
-
Navigate to the project directory:
cd counterparty-website
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
Command | Action |
---|---|
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run astro ... |
Run CLI commands like astro add , astro check |
We manage content through Markdown files in the src/content/
directory. Here's how to make changes:
To edit existing content, such as updating information about an explorer:
- Navigate to the relevant Markdown file in the
src/content/
directory. - For example, to update the pepe-wtf explorer, you might edit
src/content/explorers/pepe-wtf.md
. - Make your changes directly in the file.
To add new content:
- Create a new Markdown file in the appropriate subdirectory of
src/content/
. - Use the following general frontmatter structure:
---
title: Content Title
description: A brief description of the content
additionalField: Any additional required fields
---
Detailed information about the content goes here.
For example, to add a new explorer:
- Create a new file:
src/content/explorers/new-explorer.md
. - Use the following frontmatter structure:
---
title: New Explorer Name
description: A brief description of the new explorer
url: https://new-explorer.com
---
Detailed information about the new explorer goes here.
- If necessary, update the corresponding collection file (e.g.,
src/content/collections/explorersCollection.ts
) to include the new content in the collection.
After making your changes:
-
Commit your changes to a new branch:
git checkout -b feature/your-feature-name git add path/to/modified/file(s) git commit -m "Brief description of your changes"
For example, to update explorer information:
git checkout -b update/explorer-info git add src/content/explorers/pepe-wtf.md git commit -m "Update pepe-wtf explorer information"
-
Push your changes to your fork:
git push origin feature/your-feature-name
-
Open a pull request on GitHub from your fork to the main repository.
-
In the pull request description, explain the changes you've made and why they're necessary.
-
Wait for a maintainer to review your changes. They may ask for modifications before merging.
By following this process, you help maintain the quality and consistency of the website's content while allowing for community contributions.
We welcome contributions to the Counterparty website! Here's how you can contribute:
- Fork the repository
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/your-feature-name
- Submit a pull request
Please make sure to update tests as appropriate and adhere to the project's coding standards.
This work is licensed under CC BY 4.0.
For more information about Counterparty, visit our official website or join our community chat.