-
Notifications
You must be signed in to change notification settings - Fork 408
chore(repo): Improve READMEs #4053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
16c78d1
nextjs: initial
LekoArts 07f707f
switch from div to p tag
LekoArts e876d3c
Revert "switch from div to p tag"
LekoArts 747ce97
remove hr
LekoArts 0d44fcc
only point to quickstart guide
LekoArts 2d5466b
astro
LekoArts 70c7484
backend
LekoArts 16d80ce
chrome extension
LekoArts 24e76bc
clerk-js
LekoArts 2c5545c
elements
LekoArts 6411f15
expo
LekoArts 68ab892
express
LekoArts 8c59000
fix typo in first paragraph
LekoArts 6dd5b6e
fastify
LekoArts 4ac2e25
correct utm tag
LekoArts 7ad0f67
localizations
LekoArts 75c3810
react
LekoArts 6553a22
remix
LekoArts 8c120dd
node sdk
LekoArts 2620121
tanstack start
LekoArts 0b250e9
testing
LekoArts d9e6c4f
themes
LekoArts c1e416a
types
LekoArts a9ad3b1
upgrade
LekoArts 37bf442
add changeset
LekoArts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| "@clerk/chrome-extension": patch | ||
| "@clerk/tanstack-start": patch | ||
| "@clerk/localizations": patch | ||
| "@clerk/clerk-js": patch | ||
| "@clerk/elements": patch | ||
| "@clerk/clerk-sdk-node": patch | ||
| "@clerk/backend": patch | ||
| "@clerk/express": patch | ||
| "@clerk/fastify": patch | ||
| "@clerk/testing": patch | ||
| "@clerk/upgrade": patch | ||
| "@clerk/nextjs": patch | ||
| "@clerk/themes": patch | ||
| "@clerk/astro": patch | ||
| "@clerk/clerk-react": patch | ||
| "@clerk/remix": patch | ||
| "@clerk/types": patch | ||
| "@clerk/clerk-expo": patch | ||
| --- | ||
|
|
||
| Tidy up and improve README |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,9 @@ | |
| </picture> | ||
| </a> | ||
| <br /> | ||
| <h1 align="center">@clerk/astro</h1> | ||
| </p> | ||
|
|
||
| # @clerk/astro | ||
|
|
||
| <div align="center"> | ||
|
|
||
| [](https://clerk.com/discord) | ||
|
|
@@ -22,164 +21,46 @@ | |
| · | ||
| [Request a Feature](https://feedback.clerk.com/roadmap) | ||
| · | ||
| [Ask a Question](https://github.com/clerk/javascript/discussions) | ||
| [Get help](https://clerk.com/contact/support?utm_source=github&utm_medium=clerk_astro) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We disabled Github Discussions so no use to link to that |
||
|
|
||
| </div> | ||
|
|
||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| Clerk is the easiest way to add authentication and user management to your Astro application. Add sign up, sign in, and profile management to your Astro application in minutes. | ||
|
|
||
| ## Getting Started | ||
| [Clerk](https://clerk.com/?utm_source=github&utm_medium=clerk_astro) is the easiest way to add authentication and user management to your Astro application. Add sign up, sign in, and profile management to your application in minutes. | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - Astro 3.2 or later | ||
| - Node.js `>=18.17.0` or later | ||
| - An existing Clerk application. [Create your account for free](https://dashboard.clerk.com/sign-up?utm_source=github&utm_medium=clerk_astro). | ||
|
|
||
| ### Installation | ||
|
|
||
| Add `@clerk/astro` as a dependency | ||
|
|
||
| **With npm** | ||
|
|
||
| ```sh | ||
| npm install @clerk/astro | ||
| ``` | ||
|
|
||
| **With yarn** | ||
|
|
||
| ```sh | ||
| yarn add @clerk/astro | ||
| ``` | ||
|
|
||
| **With pnpm** | ||
|
|
||
| ```sh | ||
| pnpm add @clerk/astro | ||
| ``` | ||
|
|
||
| ### Build | ||
|
|
||
| To build the package locally with the TypeScript compiler, run: | ||
|
|
||
| ```sh | ||
| npm run build | ||
| ``` | ||
|
|
||
| To build the package in watch mode, run the following: | ||
| The fastest way to get started with Clerk is by following the [Astro Quickstart](https://clerk.com/docs/quickstarts/astro?utm_source=github&utm_medium=clerk_astro). | ||
|
|
||
| ```sh | ||
| npm run dev | ||
| ``` | ||
| You'll learn how to install `@clerk/astro`, set up your environment keys, add the `clerk()` integration to your application, use the Clerk middleware, and use Clerk's prebuilt components. | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Set environment variables | ||
|
|
||
| ```sh | ||
| PUBLIC_CLERK_PUBLISHABLE_KEY=pk_(test|live)_xxxxxxx | ||
| CLERK_SECRET_KEY=sk_(test|live)_xxxxxxx | ||
|
|
||
| PUBLIC_CLERK_SIGN_IN_URL=/sign-in # update this if sign in page exists on another path | ||
| PUBLIC_CLERK_SIGN_UP_URL=/sign-up # update this if sign up page exists on another path | ||
| ``` | ||
|
|
||
| ### Update `env.d.ts` | ||
|
|
||
| ```ts | ||
| /// <reference types="astro/client" /> | ||
| /// <reference types="@clerk/astro/env" /> | ||
| ``` | ||
|
|
||
| ### Add integrations | ||
|
|
||
| Follow [the instructions](https://clerk.com/docs/quickstarts/astro) in our documentation. | ||
|
|
||
| Example configuration file | ||
|
|
||
| ```js | ||
| import { defineConfig } from 'astro/config'; | ||
| import node from '@astrojs/node'; | ||
| import clerk from '@clerk/astro'; | ||
|
|
||
| export default defineConfig({ | ||
| integrations: [clerk()], | ||
| adapter: node({ mode: 'standalone' }), | ||
| output: 'server', | ||
| }); | ||
| ``` | ||
|
|
||
| ### Add a middleware file | ||
|
|
||
| This step is required in order to use SSR or any control component. Create a `middleware.ts` file inside the `src/` directory. | ||
|
|
||
| ```ts | ||
| import { clerkMiddleware } from '@clerk/astro/server'; | ||
|
|
||
| export const onRequest = clerkMiddleware(); | ||
| ``` | ||
|
|
||
| ### Use components inside .astro files | ||
|
|
||
| ```astro | ||
| --- | ||
| import { SignedIn, SignedOut, UserButton, SignInButton } from "@clerk/astro/components"; | ||
| --- | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
| <meta name="generator" content={Astro.generator} /> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <h1>{title}</h1> | ||
| <nav> | ||
| <SignedOut> | ||
| <SignInButton mode="modal" /> | ||
| </SignedOut> | ||
| <SignedIn> | ||
| <UserButton /> | ||
| </SignedIn> | ||
| </nav> | ||
| </header> | ||
| <article> | ||
| <slot /> | ||
| </article> | ||
| </body> | ||
| </html> | ||
| ``` | ||
|
|
||
| _For further details and examples, please refer to | ||
| our [Documentation](https://clerk.com/docs?utm_source=github&utm_medium=clerk_nextjs)._ | ||
| For further information, guides, and examples visit the [Astro reference documentation](https://clerk.com/docs/references/astro/overview?utm_source=github&utm_medium=clerk_astro). | ||
|
|
||
| ## Support | ||
|
|
||
| You can get in touch with us in any of the following ways: | ||
|
|
||
| - Join our official community [Discord server](https://clerk.com/discord) | ||
| - Create a [GitHub Discussion](https://github.com/clerk/javascript/discussions) | ||
| - Contact options listed on [our Support page](https://clerk.com/support?utm_source=github&utm_medium=clerk_astro) | ||
| - On [our support page](https://clerk.com/contact/support?utm_source=github&utm_medium=clerk_astro) | ||
|
|
||
| ## Contributing | ||
|
|
||
| We're open to all community contributions! If you'd like to contribute in any way, please | ||
| read [our contribution guidelines](https://github.com/clerk/javascript/blob/main/docs/CONTRIBUTING.md)) | ||
| . | ||
| We're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerk/javascript/blob/main/docs/CONTRIBUTING.md) and [code of conduct](https://github.com/clerk/javascript/blob/main/docs/CODE_OF_CONDUCT.md). | ||
|
|
||
| ## Security | ||
|
|
||
| `@clerk/astro` follows good practices of security, but 100% security cannot be assured. | ||
|
|
||
| `@clerk/astro` is provided **"as is"** without any **warranty**. Use at your own risk. | ||
|
|
||
| _For more information and to report security issues, please refer to | ||
| our [security documentation](https://github.com/clerk/javascript/blob/main/docs/SECURITY.md)._ | ||
| _For more information and to report security issues, please refer to our [security documentation](https://github.com/clerk/javascript/blob/main/docs/SECURITY.md)._ | ||
|
|
||
| ## License | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I removed the "Build" instructions from the READMEs I made this addition