Git Product home page Git Product logo

netlify-templates / astro-platform-starter Goto Github PK

View Code? Open in Web Editor NEW
16.0 7.0 10.0 2.96 MB

A modern starter based on Astro.js, Tailwind, daisyUI, and Netlify Core Primitives (Edge Functions, Image CDN, Blob Store).

Home Page: https://astro-platform-starter.netlify.app/

JavaScript 5.56% Astro 60.20% CSS 2.41% TypeScript 31.83%
astrojs template astro-template astro-theme tailwindcss daisyui

astro-platform-starter's Introduction

Astro on Netlify Platform Starter

Live Demo

A modern starter based on Astro.js, Tailwind, daisyUI, and Netlify Core Primitives (Edge Functions, Image CDN, Blob Store).

Astro 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:4321
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI

Deploying to Netlify

Deploy to Netlify

Developing Locally

Prerequisites
Node.js v18.14+.
(optional) nvm for Node version management.
  1. Clone this repository, then run npm install in its root directory.

  2. For the starter to have full functionality locally (e.g. edge functions, blob store), please ensure you have an up-to-date version of Netlify CLI. Run:

npm install netlify-cli@latest -g
  1. Link your local repository to the deployed Netlify site. This will ensure you're using the same runtime version for both local development and your deployed site.
netlify link
  1. Then, run the Astro.js development server via Netlify CLI:
netlify dev

If your browser doesn't navigate to the site automatically, visit localhost:8888.

astro-platform-starter's People

Contributors

renovate[bot] avatar tomasbankauskas avatar eladroz avatar serhalp avatar klavavej avatar dependabot[bot] avatar

Stargazers

 avatar Hemang Yadav avatar hyperoot avatar luke cater avatar Fernando De Olazábal avatar Doug Ouverson avatar Asta Bankauske avatar Ely Kahn avatar  avatar Kevin N. Murphy avatar Ken avatar Weldhapi avatar Kiril Misnikov avatar Sirvent avatar  avatar  avatar

Watchers

Phil Hawksworth avatar Mathias Biilmann avatar  avatar Doug Ouverson avatar RJ Beers avatar  avatar Kiril Misnikov avatar

astro-platform-starter's Issues

[preview] The @astrojs/netlify adapter does not support the preview command.

Hey Netlifolk,
Thanks for the template, it's really awesome! I'm having a few issues now I'm actually building a full site with it. I've tried deploying the site and it's 404ing.

Update: So I tried previewing, and saw this issue. I've now got the site deployed, but would be helpful to have the preview function!

———
OLD CONTEXT

It seems to be building fine, and fine in dev, but the deployment is resulting in page not found. And there's no way to preview if it's the build process that's broken or my netlify configuration.

My ./dist shape.

It may be because I updated the astro.config.mjs to resolve a vite issue, where I was getting:

09:04:56 [WARN] [vite] The file does not exist at "/Users/me/site/node_modules/.vite/deps/chunk-5E3PJM5T.js?v=e914b06b" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.

Here's the update Astro config:

...rest of Astro config
 vite: {
        optimizeDeps: {
            include: ['@sanity/asset-utils']
        }
    },

CleanShot 2024-07-19 at 09 31 30@2x

My full Astro Config:

import { defineConfig } from 'astro/config';
import netlify from '@astrojs/netlify';
import react from '@astrojs/react';
import tailwind from '@astrojs/tailwind';
import sanity from '@sanity/astro';

// https://astro.build/config
export default defineConfig({
    integrations: [
        react(),
        tailwind({
            applyBaseStyles: false
        }),
        sanity({
            projectId: 'xrq4swux',
            dataset: 'production',
            // Set useCdn to false if you're building statically.
            useCdn: false,
            studioBasePath: '/studio'
        })
    ],
    vite: {
        optimizeDeps: {
            include: ['@sanity/asset-utils']
        }
    },
    output: 'hybrid',
    adapter: netlify()
});

My packages.json:

{
  "name": "astro-netlify-platform-starter",
  "type": "module",
  "version": "0.1.0",
  "scripts": {
    "dev": "astro dev",
    "start": "astro dev",
    "build": "astro build",
    "preview": "astro preview",
    "astro": "astro"
  },
  "dependencies": {
    "@astrojs/netlify": "^5.4.0",
    "@astrojs/react": "^3.6.0",
    "@astrojs/tailwind": "^5.1.0",
    "@fontsource-variable/plus-jakarta-sans": "^5.0.21",
    "@fontsource/inter": "^5.0.18",
    "@netlify/blobs": "^7.3.0",
    "@netlify/functions": "^2.7.0",
    "@sanity/astro": "^3.1.3",
    "@sanity/client": "^6.20.0",
    "@sanity/image-url": "^1.0.2",
    "@sanity/visual-editing": "^2.1.4",
    "@types/react": "^18.3.3",
    "@types/react-dom": "^18.3.0",
    "astro": "^4.11.6",
    "astro-portabletext": "^0.10.0",
    "blobshape": "^1.0.0",
    "marked": "^12.0.1",
    "marked-shiki": "^1.1.0",
    "prettier-plugin-astro": "^0.14.1",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-player": "^2.16.0",
    "sanity": "^3.45.0",
    "sharp": "^0.33.4",
    "styled-components": "^6.1.12",
    "tailwindcss": "^3.4.3",
    "unique-names-generator": "^4.7.1"
  },
  "devDependencies": {
    "@types/blobshape": "^1.0.3",
    "@types/node": "^20.12.7",
    "daisyui": "^4.10.2"
  }
}

Appreciate your help 💙

Pnc

Un site qui lit un fichier Excel et peut afficher les éléments de la liste et équipé d'une barre de recherche

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • fix(deps): update dependency @types/react to v18.3.4
  • chore(deps): update dependency @types/node to v20.16.1
  • fix(deps): update dependency astro to v4.14.5
  • fix(deps): update dependency marked to v14

Detected dependencies

npm
package.json
  • @astrojs/netlify ^5.2.0
  • @astrojs/react ^3.3.0
  • @astrojs/tailwind ^5.1.0
  • @fontsource/inter ^5.0.18
  • @netlify/blobs ^8.0.0
  • @netlify/functions ^2.8.1
  • @types/react ^18.2.79
  • @types/react-dom ^18.2.25
  • astro ^4.6.2
  • blobshape ^1.0.0
  • marked ^13.0.0
  • marked-shiki ^1.1.0
  • react ^18.2.0
  • react-dom ^18.2.0
  • tailwindcss ^3.4.3
  • unique-names-generator ^4.7.1
  • @types/blobshape ^1.0.3
  • @types/node ^20.12.7
  • daisyui ^4.10.2

  • Check this box to trigger a request for Renovate to run again on this repository

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.