Setup Astro

Following the article Manual Setup in the Astro docs.

  1. In the project folder, with npm init --yes, create a package.json file to manage dependencies.
  2. Install astro with npm install astro
  3. Replace the placeholder text in the ‘scripts’ section of package.json with:
      "dev": "astro dev",
      "build": "astro build",
      "preview": "astro preview"
  4. Create the first page in src/pages/index.astro.
  5. Create static asset public/robots.txt with:
      # Example: Allow all bots to scan and index your site.
      User-agent: *
      Allow: /
    This is something I need and want to learn more about. Info from Google, a blog post on robots.txt for AI Bots: What to Allow, What to Block, and Why, an article on How to block AI Crawler Bots using robots.txt file, and personal website and for-fun project robotstxt.com from some SEO expert.
  6. Add TypeScript support by adding tsconfig.json at the root of the project. Set the contents of the file to:
    {
      "extends": "astro/tsconfigs/base"
    }
  7. Start the astro server with npm run dev