Giter Site home page Giter Site logo

astro

Astro Quickstart Template

This is a bare-bones Astro project that has everything you need to quickly deploy it to Netlify.

Hate reading, here's a video: https://youtu.be/SknFflQVOys!

Love reading, here's blog post: www.netlify.app/blog/deploy-your-astro-project-fast/!

⚡️ Quick Setup + Deploy Option

Click this button and it will help you create a new repo, create a new Netlify project, and deploy!

Deploy to Netlify Button

💫 Regular Setup

1. Cloning + Install Packages

  • Clone this repo with one of these options:

    • Click the 'Use this template' button at the top of the page
    • Or via the command line git clone https://github.com/netlify-templates/astro-quickstart
  • Then install the necessary packages and run the project locally to make sure everything works.

    npm install
    npm run dev

Alternatively, you can run this locally with the Netlify CLI's by running the netlify dev command for more options like receiving a live preview to share (netlify dev --live) and the ability to test Netlify Functions and redirects.

2. Deploying

  • Install the Netlify CLI globally npm install netlify-cli -g

  • Run npm run build

  • Then use the netlify deploy for a deploy preview link or netlify deploy --prod to deploy to production

Here are a few other ways you can deploy this template:

  • Use the Netlify CLI's create from template command netlify sites:create-template astro-quickstart which will create a repo, Netlify project, and deploy it

  • If you want to utilize continuous deployment through GitHub webhooks, run the Netlify command netlify init to create a new project based on your repo or netlify link to connect your repo to an existing project

Astro 💙 Netlify Resources

Here are some resources to help you on your Astro + Netlify coding fun!

Hope this template helps :) Happy coding 👩🏻‍💻!


🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

/
├── public/
│   └── favicon.ico
├── src/
│   ├── components/
│   │   └── Layout.astro
│   └── pages/
│       └── index.astro
└── package.json

Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.

There's nothing special about src/components/, but that's where we like to put any Astro/React/Vue/Svelte/Preact components or layouts.

Any static assets, like images, can be placed in the public/ directory.

🧞 Commands

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:3000
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying

👀 Want to learn more?

Feel free to check our documentation or jump into our Discord server.

Stefan Kopco's Projects

cirql icon cirql

🔧 A flexible SurrealDB ORM & query builder with Zod powered validation 🏋️‍♂️

modulartex icon modulartex

This is a possible implementation for working with standalone .tex files.

ninja-keys icon ninja-keys

Keyboard shortcuts interface for your website. Working with static HTML, Vanilla JS, Vue, React, Svelte.

open-props icon open-props

CSS custom properties to help accelerate adaptive and consistent design.

sandpack icon sandpack

A component toolkit for creating live-running code editing experiences, using the power of CodeSandbox.

shiki icon shiki

A beautiful Syntax Highlighter.

solid icon solid

A declarative, efficient, and flexible JavaScript library for building user interfaces.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.