diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6fec229a..d4c72333 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,6 +124,7 @@ To set up the project locally: npm run format npm run lint ``` + *Note: `npm run format` currently only targets CSS, HTML, and Markdown files.* 5. **Git Hooks (Optional)**: We provide a script to set up a git pre-commit hook that runs linting and CSS builds automatically before you commit. diff --git a/README.md b/README.md index d6bb7ae7..515c0924 100644 --- a/README.md +++ b/README.md @@ -262,7 +262,7 @@ package scripts to keep formatting, linting, and generated output consistent: ```bash npm install # install Prettier, Stylelint, and Tailwind toolchain -npm run format # format CSS/HTML/JS/MD with Prettier + tailwindcss plugin +npm run format # format CSS/HTML/MD with Prettier + tailwindcss plugin npm run lint # run CSS, hex color, inline-style, design-token, and Tailwind color/bracket guards in one pass npm run lint:css # enforce token usage and forbid raw hex colors npm run lint:inline-styles # fail CI if inline style attributes or element.style usage slip in diff --git a/assets/jpg/bitvid_Simplified-Chinese.png b/assets/jpg/bitvid_Simplified-Chinese.png new file mode 100644 index 00000000..c44590bc Binary files /dev/null and b/assets/jpg/bitvid_Simplified-Chinese.png differ diff --git a/content/upload-content.md b/content/upload-content.md index 70691b3e..ce96079d 100644 --- a/content/upload-content.md +++ b/content/upload-content.md @@ -25,20 +25,26 @@ To allow your browser to upload files directly to Cloudflare, you must allow Cro 1. Still in your bucket's **Settings** tab, scroll down to **"CORS Policy"**. 2. Click **"Add CORS Policy"** (or Edit). -3. Paste the following JSON configuration: +3. Paste the following JSON configuration (update the origins to match your dev/prod domains): ```json [ { - "AllowedOrigins": ["*"], + "AllowedOrigins": ["http://127.0.0.1:5500", "https://bitvid.network"], "AllowedMethods": ["GET", "PUT", "POST", "DELETE", "HEAD"], - "AllowedHeaders": ["*"], + "AllowedHeaders": [ + "authorization", + "content-type", + "x-amz-*", + "x-amz-content-sha256", + "x-amz-date" + ], "ExposeHeaders": ["ETag", "Content-Length", "Content-Range", "Accept-Ranges"], "MaxAgeSeconds": 3600 } ] ``` -> **Note:** You can replace `"*"` in `AllowedOrigins` with your specific domain (e.g., `["https://bitvid.network"]`) for tighter security, but `"*"` is easiest for getting started. +> **Note:** Replace the `AllowedOrigins` values with the exact origins you use in development and production. This CORS policy must be configured on the **R2 bucket’s CORS settings** for the **S3 endpoint** (not just the public `r2.dev` URL), since uploads use the S3 API. 4. Click **"Save"**. diff --git a/docs/nostr-event-schemas.md b/docs/nostr-event-schemas.md index 9b9b20c4..cd521229 100644 --- a/docs/nostr-event-schemas.md +++ b/docs/nostr-event-schemas.md @@ -148,6 +148,7 @@ import { updateWatchHistoryListWithDefaultClient } from "./nostrWatchHistoryFaca | Video post (`NOTE_TYPES.VIDEO_POST`) | `30078` | `['t','video']`, `['d', ]` plus optional schema append tags | JSON payload using Content Schema v3 (`version`, `title`, optional `url`, `magnet`, `thumbnail`, `description`, `mode`, `videoRootId`, `deleted`, `isPrivate`, `isNsfw`, `isForKids`, `enableComments`, `ws`, `xs`) | | NIP-94 mirror (`NOTE_TYPES.VIDEO_MIRROR`) | `1063` | Tags forwarded from `publishVideo` (URL, mime type, thumbnail, alt text, magnet) | Plain text alt description | | Repost (`NOTE_TYPES.REPOST`) | `6` | `['e', , ]` with optional address pointer `['a', , ]`, and `['p', ]` when the origin author is known; inherits schema append tags | JSON-serialized event being reposted (or empty if unavailable) | +| Generic Repost (`NOTE_TYPES.GENERIC_REPOST`) | `16` | Same as Repost; specific for non-text kinds (e.g. videos). | Same as Repost. | | Share note (`NOTE_TYPES.SHARE`) | `1` | `['e',