Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ npm run test # vitest unit tests (lib/)

The app deploys to any Node host. On Vercel, import the repo and it builds with zero config. There are no required environment variables. If you fork it, update the domain in `lib/tools.ts` (`SITE_URL`) and `app/robots.ts` so the sitemap and canonical URLs point at your host, and update `GITHUB_REPO` in `lib/tools.ts` so the star-count link points at your fork.

Optional environment variables (all safe to omit):

| Variable | Purpose |
|----------|---------|
| `GOOGLE_SITE_VERIFICATION` | Renders the Google Search Console `google-site-verification` meta tag so you can verify ownership of the property. |
| `BING_SITE_VERIFICATION` | Renders the Bing Webmaster Tools (`msvalidate.01`) verification meta tag. |

## Add a tool

The tool set is a single typed registry in [`lib/tools.ts`](lib/tools.ts). The home grid, per-tool metadata, JSON-LD (SoftwareApplication, breadcrumb, FAQ), social share images, hero, FAQ, CTA, sitemap, web manifest, and command palette all derive from it. To add a tool:
Expand Down
16 changes: 16 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ const THEME_INIT = `(function(){try{var t=localStorage.getItem("cc:theme");if(t!
// are marked noindex so they never get crawled or compete with production.
const IS_NON_PROD = Boolean(process.env.VERCEL_ENV) && process.env.VERCEL_ENV !== "production";

// Search-engine ownership verification tags. Tokens come from env so they are
// configurable per deployment and never committed; the tags render only when a
// token is set, so previews and forks stay clean. Both are optional.
const googleVerification = process.env.GOOGLE_SITE_VERIFICATION;
const bingVerification = process.env.BING_SITE_VERIFICATION;
const verification: Metadata =
googleVerification || bingVerification
? {
verification: {
...(googleVerification ? { google: googleVerification } : {}),
...(bingVerification ? { other: { "msvalidate.01": bingVerification } } : {}),
},
}
: {};

export const metadata: Metadata = {
metadataBase: new URL("https://tools.codercops.com"),
title: {
Expand All @@ -46,6 +61,7 @@ export const metadata: Metadata = {
"Free, fast, privacy-first developer tools: JSON formatter, JWT decoder, Base64 encoder, and more. Runs entirely in your browser.",
applicationName: "CODERCOPS Tools",
authors: [{ name: "CODERCOPS", url: "https://www.codercops.com" }],
...verification,
...(IS_NON_PROD ? { robots: { index: false, follow: false } } : {}),
openGraph: {
type: "website",
Expand Down