diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..a8c61c7 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,66 @@ +name: Deploy documentation + +on: + push: + branches: + - main + paths: + - "apps/docs/**" + - "pnpm-lock.yaml" + - "pnpm-workspace.yaml" + - "package.json" + - ".github/workflows/deploy-docs.yml" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 11.5.1 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build documentation + run: pnpm build:docs + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: apps/docs/dist + + deploy: + needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/apps/docs/astro.config.mjs b/apps/docs/astro.config.mjs new file mode 100644 index 0000000..ffb6ce5 --- /dev/null +++ b/apps/docs/astro.config.mjs @@ -0,0 +1,7 @@ +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + output: 'static', + site: 'https://ale0aranda.github.io', + base: '/github-community-wall' +}); diff --git a/apps/docs/package.json b/apps/docs/package.json new file mode 100644 index 0000000..32b22a9 --- /dev/null +++ b/apps/docs/package.json @@ -0,0 +1,18 @@ +{ + "name": "@community-wall/docs", + "private": true, + "type": "module", + "scripts": { + "dev": "astro dev", + "build": "astro build", + "preview": "astro preview", + "check": "astro check" + }, + "dependencies": { + "astro": "^7.3.8" + }, + "devDependencies": { + "@astrojs/check": "^0.9.10", + "typescript": "^5.9.3" + } +} diff --git a/apps/docs/public/images/contributors.png b/apps/docs/public/images/contributors.png new file mode 100644 index 0000000..6ad230a Binary files /dev/null and b/apps/docs/public/images/contributors.png differ diff --git a/apps/docs/public/images/followers.png b/apps/docs/public/images/followers.png new file mode 100644 index 0000000..ec8d932 Binary files /dev/null and b/apps/docs/public/images/followers.png differ diff --git a/apps/docs/public/images/opengraph.png b/apps/docs/public/images/opengraph.png new file mode 100644 index 0000000..5c3b106 Binary files /dev/null and b/apps/docs/public/images/opengraph.png differ diff --git a/apps/docs/src/components/CodeBlock.astro b/apps/docs/src/components/CodeBlock.astro new file mode 100644 index 0000000..47611d6 --- /dev/null +++ b/apps/docs/src/components/CodeBlock.astro @@ -0,0 +1,63 @@ +--- +import Icon from "./Icon.astro"; + +interface Props { + code: string; + label?: string; +} + +const { code, label = "Terminal command" } = Astro.props; +--- + +
{code}
+
+
++ Generate a visual wall featuring the people who are part of your GitHub + community. +
+ ++ A command-line tool for creating images of followers, contributors, + sponsors, and organizations. Simple, configurable, and ready to share in + your README, website, or a banner. +
+ ++ Open source, built to celebrate your community. +
+ + + +
+ You need Node.js 22.13 or later. You can run the tool with
+ npx without installing it globally, or install it if you will
+ use it frequently.
+
+ The tool queries GitHub, downloads avatars, and arranges people in an + image. Choose the community, adjust the design, and decide where to save + the result. +
+ +
+ Configure a GitHub token in your environment. The
+ GITHUB_TOKEN variable lets you query the API without
+ including credentials directly in commands.
+
+ Replace the example value with your token. The required permissions + depend on the source; sponsors require access to the authenticated + maintainer's sponsorship data. +
+
+ To show the people who contribute to a repository, use
+ contributors followed by owner/repository.
+ Choose an output file and limit the number of avatars.
+
+ Replace owner/repository with your repository. You will get
+ community-wall.png in the directory where you ran the
+ command: an image ready to publish.
+
+ Contributor walls exclude bots by default. You can adjust the filters + to decide who appears. +
++ Every community has different ways to participate. In addition to + contributors, you can generate walls for followers, sponsors, + stargazers, watchers, and organization members. +
+ +
+ Use a user for followers and sponsors, a
+ repository for contributors, stargazers, and
+ watchers, or an organization for members.
+
+ Customize the theme, background, avatar shape, and spacing. Add titles, + subtitles, or a watermark to tailor the result to your project. +
+ ++ PNG is the default format. You can also export to JPEG, WebP, SVG, HTML, + or JSON. HTML generates a standalone file; JSON includes avatar and + design metadata. +
+ +
+ If you use the same options repeatedly, save them in
+ .community-wall.json. Commands read this file from the
+ current directory, and terminal options take precedence.
+
+ Include the wall in your README, share it on your website, or use it in
+ a post. The --twitter-banner option generates a
+ 1500 × 500 follower banner for X.
+
+ The readme command updates the wall block between its
+ markers. If they do not exist, it adds the block to the document.
+
+ To keep the image up to date, you can run the tool on a schedule with + GitHub Actions. The repository includes an example workflow that + generates and saves the walls. +
+ + + View automation example ++ Two ways to showcase the people who follow your work and help build it. +
+ + +
+ Run --help to explore the options. Use
+ doctor to check your configuration and token without
+ displaying it.
+