An Astro + Tailwind CSS site.
- Project Structure
- Commands
- Development Workflow
- Linting & Formatting
- Deploying to Production (GoDaddy)
Inside of your Astro project, you'll see the following folders and files:
/
├── public/
│ └── favicon.svg
├── src
│ ├── assets
│ │ └── astro.svg
│ ├── components
│ │ └── Welcome.astro
│ ├── layouts
│ │ └── Layout.astro
│ └── pages
│ └── index.astro
└── package.json
To learn more about the folder structure of an Astro project, refer to our guide on project structure.
All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run lint |
Run ESLint and oxlint against the project |
npm run format |
Format the project with Prettier |
npm run format:check |
Check formatting without writing changes |
- Clone the repo and install dependencies:
git clone <repo-url> cd TrueImageSite npm install
- Start the dev server:
The site is available at
npm run dev
http://localhost:4321with hot reload. - Make your changes in
src/. Components, layouts, and pages live undersrc/components,src/layouts, andsrc/pagesrespectively.
Before committing or opening a pull request, run:
npm run lintThis runs both ESLint (.astro/.ts/.tsx files) and oxlint. Fix any reported issues, then check formatting:
npm run format:checkIf formatting issues are found, fix them automatically with:
npm run formatThe .github/workflows/lint.yml CI workflow runs npm run lint and npm run format:check on every push and pull request, so make sure both pass locally first.
This project builds to static files, which works with GoDaddy's shared hosting (cPanel).
- Build the production site:
This outputs static HTML/CSS/JS to
npm run build
./dist/. - Upload the contents of
dist/(not thedist/folder itself) to your GoDaddy hosting account's web root, typicallypublic_html/(or a subfolder if deploying to a subdirectory):- Via cPanel File Manager: log in to GoDaddy cPanel, open File Manager, navigate to
public_html/, and upload/extract the contents ofdist/. - Via FTP/SFTP: use an FTP client (e.g. FileZilla) with the credentials from GoDaddy's cPanel (Files → FTP Accounts), connect, and copy the contents of
dist/intopublic_html/.
- Via cPanel File Manager: log in to GoDaddy cPanel, open File Manager, navigate to
- Overwrite existing files when prompted so old builds don't linger.
- Verify the site by visiting your domain once the upload completes.