When you create a new repository from this template, the project name and configuration are automatically detected from your git remote URL. No manual configuration needed!
- Use this template on GitHub (click the green "Use this template" button)
- Clone your new repository locally
- Run the project - it automatically detects:
- Your GitHub username
- Your repository name
- Generates appropriate paths for GitHub Pages
The following are automatically updated based on your new repository:
- Project name in all UI components
- Page titles and metadata
- PWA manifest
- Service Worker paths
- GitHub Pages base paths
- Email templates
- All branding references
# Clone your new repository
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
cd YOUR_REPO_NAME
# Create .env file with your user ID
echo "UID=$(id -u)" > .env
echo "GID=$(id -g)" >> .env
# Start Docker development (auto-detects project info)
docker compose upNOTE: This project REQUIRES Docker for development. Local pnpm/npm is NOT supported.
The project will automatically use your repository name everywhere "ScriptHammer" appeared before.
While the project auto-detects your repository name, you'll need to add personal configuration as GitHub Secrets for production features to work properly.
Go to your repository Settings → Secrets and variables → Actions and add these secrets.
All NEXTPUBLIC variables in alphabetical order:
NEXT_PUBLIC_AUTHOR_AVATAR- URL to your avatar imageNEXT_PUBLIC_AUTHOR_BIO- Short bio/taglineNEXT_PUBLIC_AUTHOR_BLUESKY- Bluesky handleNEXT_PUBLIC_AUTHOR_EMAIL- Contact email addressNEXT_PUBLIC_AUTHOR_GITHUB- GitHub usernameNEXT_PUBLIC_AUTHOR_LINKEDIN- LinkedIn usernameNEXT_PUBLIC_AUTHOR_MASTODON- Mastodon handle (include instance)NEXT_PUBLIC_AUTHOR_NAME- Your display nameNEXT_PUBLIC_AUTHOR_ROLE- Your professional roleNEXT_PUBLIC_AUTHOR_TWITCH- Twitch usernameNEXT_PUBLIC_AUTHOR_TWITTER- Twitter/X handleNEXT_PUBLIC_AUTHOR_WEBSITE- Personal website URLNEXT_PUBLIC_BASE_PATH- Override deployment base pathNEXT_PUBLIC_BASE_URL- Base URL for your siteNEXT_PUBLIC_CALENDAR_PROVIDER- EithercalendlyorcalcomNEXT_PUBLIC_CALENDAR_URL- Your calendar booking URLNEXT_PUBLIC_DISQUS_SHORTNAME- Your Disqus shortname (for blog comments)NEXT_PUBLIC_EMAILJS_PUBLIC_KEY- EmailJS public keyNEXT_PUBLIC_EMAILJS_SERVICE_ID- EmailJS service IDNEXT_PUBLIC_EMAILJS_TEMPLATE_ID- EmailJS template IDNEXT_PUBLIC_GA_MEASUREMENT_ID- Google Analytics ID (format: G-XXXXXXXXXX)NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION- Google Search Console verificationNEXT_PUBLIC_PROJECT_NAME- Override auto-detected project nameNEXT_PUBLIC_PROJECT_OWNER- Override auto-detected ownerNEXT_PUBLIC_SITE_TWITTER_HANDLE- Site-wide Twitter handle for social cardsNEXT_PUBLIC_SITE_URL- Your custom domain (if not using GitHub Pages)NEXT_PUBLIC_SOCIAL_PLATFORMS- Comma-separated list of enabled platformsNEXT_PUBLIC_WEB3FORMS_ACCESS_KEY- Web3Forms API key for contact forms
Without these secrets, your production site will build but won't have personalized content or working features like comments, calendar booking, or contact forms.
If you want to override the auto-detected values, create a .env.local file:
NEXT_PUBLIC_PROJECT_NAME=MyCustomName
NEXT_PUBLIC_PROJECT_OWNER=MyUsername
NEXT_PUBLIC_BASE_PATH=/my-custom-pathThe scripts/detect-project.js script:
- Checks git remote URL (
git remote get-url origin) - Parses username and repository name
- Generates configuration at build time
- Falls back to "ScriptHammer" if no git remote is found
- Clean History: Start with a fresh commit history
- No Connection: No link back to the original repository
- Your Own Project: This is YOUR project from day one
- GitHub Insights: Your commits count toward your GitHub contributions
- GitHub (primary support)
- GitLab (detected, may need manual config)
- Bitbucket (detected, may need manual config)
- Custom git servers (detected, may need manual config)
When deploying to GitHub Pages, the base path is automatically set:
- Development: No base path (runs on
localhost:3000) - Production:
/YOUR_REPO_NAME(forusername.github.io/YOUR_REPO_NAME)
If auto-detection isn't working:
-
Check git remote:
git remote get-url origin
Should show your forked repository URL
-
Run detection manually:
docker compose exec scripthammer node scripts/detect-project.jsThis will show what was detected
-
Check generated config:
docker compose exec scripthammer cat src/config/project-detected.json -
Clear and regenerate:
docker compose exec scripthammer rm -rf src/config/project-detected.* docker compose restart
The project configuration is managed in three layers (priority order):
- Environment Variables (highest priority) -
.env.local - Auto-detected Config - from git remote
- Default Values - fallback to "ScriptHammer"
/api/manifest- Dynamically generated PWA manifest with your project name
All these files now use dynamic configuration:
src/app/layout.tsx- Page metadatasrc/components/PWAInstall.tsx- Service worker pathspublic/manifest.json- Now generated dynamicallysrc/utils/email/providers/*.ts- Email templatesnext.config.ts- Base paths for production
This is designed to be a minimal-configuration experience:
- Click "Use this template" and choose your project name
- Clone your new repository
- Create
.envfile:cp .env.example .env(required for Docker) - Run
docker compose upto start development - Deploy to GitHub Pages - paths are handled automatically
No more searching and replacing "ScriptHammer" across 100+ files! The auto-configuration system handles most settings based on your git repository. 🎉