Skip to content

mnichols08/business-website-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

{{PROJECT_NAME}}

{{PROJECT_TAGLINE}}

Status License CI Release

Overview

{{PROJECT_DESCRIPTION}}

Use this repository as a starting point for {{PROJECT_DOMAIN|marketing site|SaaS landing|documentation|static site}} projects. It emphasizes maintainability, performance, accessibility, and a consistent release process.

Table of Contents

  1. Features
  2. Tech Stack
  3. Project Structure
  4. Getting Started
  5. Configuration
  6. Environment Variables
  7. Scripts
  8. Quality & Tooling
  9. Deployment
  10. CI/CD
  11. Versioning & Releases
  12. Contributing
  13. Security
  14. Roadmap
  15. FAQ
  16. License
  17. Maintainers

Features

  • Accessible, semantic HTML structure
  • Mobile-first responsive layout & fluid typography
  • SEO & social metadata helpers (OG/Twitter)
  • Theming via CSS variables (light/dark ready)
  • Pluggable analytics: Google, Plausible, PostHog (optional)
  • Content-driven pages (Markdown / JSON / CMS ready)
  • Form handling patterns (Netlify / Serverless / API)
  • Automated release workflow (Semantic Versioning + changelog)
  • {{CUSTOM_FEATURE_1}}
  • {{CUSTOM_FEATURE_2}}

Tech Stack

Layer Choice (example) Notes
Framework / SSG {{FRAMEWORK None / Astro / Next.js / Eleventy}}
Styling {{STYLING CSS Modules / Tailwind / Vanilla CSS}}
Content {{CONTENT_SOURCE Markdown / Headless CMS}}
Deployment {{HOSTING Vercel / Netlify / GitHub Pages}}
Analytics {{ANALYTICS None}}

Project Structure

.
├─ public/                # Static assets (favicons, images, robots.txt)
├─ src/
│  ├─ pages/              # Page templates or routes
│  ├─ components/         # Reusable UI components
│  ├─ styles/             # Global styles / tokens / themes
│  ├─ content/            # Markdown / data files (FAQs, testimonials)
│  └─ lib/                # Utilities (SEO, analytics, forms)
├─ scripts/               # Dev/build/release helpers (optional)
├─ .env.example           # Environment variable documentation
├─ CHANGELOG.md           # Version history
└─ README.md              # Project docs

Adapt names to your chosen framework (e.g., pages/ in Next.js, src/pages/ in Astro, content/ in Eleventy/Hugo).

Getting Started

Prerequisites

  • Node.js {{NODE_VERSION|min 18}} and a package manager (npm, pnpm, or yarn)
  • Git

Installation

git clone {{REPO_CLONE_URL}}
cd {{PROJECT_DIR_NAME}}
npm install

Development

npm run dev

Open: http://localhost:{{DEV_PORT|3000}}

Build & Preview

npm run build
npm run preview

Configuration

Centralize settings in src/lib/config.* or similar. Typical items:

Key Purpose Example
SITE_NAME Display name "{{PROJECT_NAME}}"
SITE_URL Canonical URL https://example.com
DEFAULT_DESCRIPTION Meta description "{{SHORT_DESCRIPTION}}"
ANALYTICS_PROVIDER Analytics toggle plausible
CONTACT_ENDPOINT Form submission URL /api/contact

Environment Variables

Document all variables in .env.example. Consumers copy to .env.

SITE_URL=
ANALYTICS_PROVIDER=
ANALYTICS_KEY=
CONTACT_ENDPOINT=
{{CUSTOM_ENV_VAR}}=

Never commit secrets. Use deployment platform secrets manager.

Scripts

"scripts": {
	"dev": "{{SCRIPT_DEV|next dev|astro dev|eleventy --serve}}",
	"build": "{{SCRIPT_BUILD|next build|astro build|eleventy}}",
	"preview": "{{SCRIPT_PREVIEW|next start|astro preview|npx serve dist}}",
	"lint": "{{SCRIPT_LINT|eslint .}}",
	"format": "{{SCRIPT_FORMAT|prettier --write .}}",
	"test": "{{SCRIPT_TEST|vitest}}",
	"typecheck": "{{SCRIPT_TYPECHECK|tsc --noEmit}}",
	"release": "{{SCRIPT_RELEASE|node scripts/release.mjs}}"
}

Quality & Tooling

  • Linting: {{LINTING|ESLint config in .eslintrc.*}}
  • Formatting: {{FORMATTING|Prettier}}
  • Type Safety: {{TYPES|TypeScript optional}}
  • Testing: {{TESTING|Vitest / Jest}} with minimal coverage on critical utils
  • Accessibility: Run automated checks (Lighthouse, axe)
  • Performance: Audit bundle (Lighthouse / WebPageTest)

Deployment

Platform Notes
Vercel Zero-config for Next.js / Astro; env vars via dashboard
Netlify Auto-deploy from main; forms + redirects support
Cloudflare Pages Edge caching + functions
GitHub Pages Use GitHub Action to build & publish dist/

Set production env vars in platform UI. Confirm caching headers & compression.

CI/CD

Recommended pipeline stages:

  1. Install deps (cache lockfile)
  2. Lint & typecheck
  3. Run tests
  4. Build artifact
  5. (Optional) Deploy on main branch merges
  6. (Optional) Automated release (see below)

Example (GitHub Actions excerpt):

name: CI
on: [push, pull_request]
jobs:
	build:
		runs-on: ubuntu-latest
		steps:
			- uses: actions/checkout@v4
			- uses: actions/setup-node@v4
				with:
					node-version: {{NODE_VERSION|min 18}}
					cache: 'npm'
			- run: npm ci
			- run: npm run lint --if-present
			- run: npm run typecheck --if-present
			- run: npm test --if-present
			- run: npm run build

Versioning & Releases

Follow Semantic Versioning. Maintain CHANGELOG.md (Keep a Changelog format).

Release steps (manual example):

# 1. Update CHANGELOG.md (move Unreleased -> new version w/ date)
# 2. Commit & tag
git add CHANGELOG.md
git commit -m "chore(release): {{NEW_VERSION}}"
git tag -a {{NEW_VERSION}} -m "Release {{NEW_VERSION}}"

# 3. Push branch & tags
git push origin HEAD
git push origin {{NEW_VERSION}}

Troubleshooting tags:

git tag --list
# Delete & recreate if needed
git tag -d {{EXISTING_VERSION}}; git push origin :refs/tags/{{EXISTING_VERSION}}; git tag -a {{EXISTING_VERSION}} -m "Release {{EXISTING_VERSION}}"; git push origin --tags

Contributing

See CONTRIBUTING.md for guidelines.

Principles:

  • Use Conventional Commits (feat:, fix:, chore: ...)
  • Keep PRs focused & small
  • Add tests for logic changes
  • Update docs for new features / breaking changes

Security

Please report vulnerabilities via SECURITY.md or private contact: {{SECURITY_CONTACT|email@example.com}}. Do not open public issues for sensitive security reports.

Roadmap (Optional)

  • {{ROADMAP_ITEM_1|Add blog}}
  • {{ROADMAP_ITEM_2|Internationalization}}
  • {{ROADMAP_ITEM_3|Dark mode toggle}}

Track features using GitHub Issues + Milestones or a project board.

FAQ (Optional)

{{QUESTION_1|Why another template?}} {{ANSWER_1|It standardizes the baseline so I can focus on unique functionality.}}
{{QUESTION_2|How do I deploy?}} {{ANSWER_2|Pick any static host (Vercel/Netlify). Configure build command + output directory.}}
{{QUESTION_3|Can I use a CMS?}} {{ANSWER_3|Yes—map your CMS content to the content layer or fetch at build.}}

License

This project is licensed under the {{LICENSE|MIT}} License - see LICENSE for details.

Maintainers

Name Role Contact
{{MAINTAINER_NAME}} {{MAINTAINER_ROLE Author}}

Template Usage Notes

  1. Search for {{ to find all placeholders.
  2. Delete optional sections you don't need (Roadmap, FAQ, etc.).
  3. Update badges (CI, status) to reflect your actual workflows.
  4. Add architectural or domain-specific docs in docs/.

Happy building!

Contributors