diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 03401e0c1..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,45 +0,0 @@ -// basic .eslintrc.js compatible with react prettier and typescript -module.exports = { - // Specifies the ESLint parser for TypeScript - parser: "@typescript-eslint/parser", - extends: [ - "plugin:react/recommended", - "plugin:@typescript-eslint/recommended", - "prettier/@typescript-eslint", - "plugin:prettier/recommended", - ], - settings: { - react: { - version: "detect", - }, - }, - env: { - browser: true, - node: true, - es6: true, - }, - plugins: ["@typescript-eslint", "react", "prettier"], - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - // Allows for the parsing of modern ECMAScript features - ecmaVersion: 2018, - // Allows for the use of imports - sourceType: "module", - }, - rules: { - // Disable prop-types as we use TypeScript for type checking - "react/prop-types": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - // Enable prettier rules - "prettier/prettier": "error", - // interface start with capital I - "@typescript-eslint/interface-name-prefix": "off", - // allow "any" as type - "@typescript-eslint/no-explicit-any": "off", - // allow @ts-ignore for testing purposes - "@typescript-eslint/ban-ts-ignore": "off", - }, -} diff --git a/.gitignore b/.gitignore index aa59480a2..16d54bb13 100644 --- a/.gitignore +++ b/.gitignore @@ -1,69 +1,24 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components +# build output +dist/ +# generated types +.astro/ -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories +# dependencies node_modules/ -jspm_packages/ - -# Typescript v1 declaration files -typings/ - -# Optional npm cache directory -.npm -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* -# Output of 'npm pack' -*.tgz -# dotenv environment variable files -.env* -.env.development -# gatsby files -.cache/ -public +# environment variables +.env +.env.production -# Mac files +# macOS-specific files .DS_Store -# Yarn -yarn-error.log -.pnp/ -.pnp.js -# Yarn Integrity file -.yarn-integrity +# jetbrains setting folder +.idea/ diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 58d06c368..000000000 --- a/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -.cache -package.json -package-lock.json -public diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 48e90e8d4..000000000 --- a/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "endOfLine": "lf", - "semi": false, - "singleQuote": false, - "tabWidth": 2, - "trailingComma": "es5" -} diff --git a/.stylelintrc.json b/.stylelintrc.json deleted file mode 100644 index 40db42c66..000000000 --- a/.stylelintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "stylelint-config-standard" -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..22a15055d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + "recommendations": ["astro-build.astro-vscode"], + "unwantedRecommendations": [] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..d64220976 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "command": "./node_modules/.bin/astro dev", + "name": "Development server", + "request": "launch", + "type": "node-terminal" + } + ] +} diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 1180a1cf3..000000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Gatsbyjs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index be1e2b131..87b813ae7 100644 --- a/README.md +++ b/README.md @@ -1,99 +1,43 @@ - -

- - Gatsby - -

-

- Gatsby's blog starter -

+# Astro Starter Kit: Minimal -Kick off your project with this blog boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React. +```sh +npm create astro@latest -- --template minimal +``` -_Have another more specific idea? You may want to check out our vibrant collection of [official and community-created starters](https://www.gatsbyjs.org/docs/gatsby-starters/)._ +> πŸ§‘β€πŸš€ **Seasoned astronaut?** Delete this file. Have fun! -## πŸš€ Quick start +## πŸš€ Project Structure -1. **Create a Gatsby site.** +Inside of your Astro project, you'll see the following folders and files: - Use the Gatsby CLI to create a new site, specifying the blog starter. +```text +/ +β”œβ”€β”€ public/ +β”œβ”€β”€ src/ +β”‚ └── pages/ +β”‚ └── index.astro +└── package.json +``` - ```shell - # create a new Gatsby site using the blog starter - gatsby new my-blog-starter https://github.com/gatsbyjs/gatsby-starter-blog - ``` +Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. -1. **Start developing.** +There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. - Navigate into your new site’s directory and start it up. +Any static assets, like images, can be placed in the `public/` directory. - ```shell - cd my-blog-starter/ - gatsby develop - ``` +## 🧞 Commands -1. **Open the source code and start editing!** +All commands are run from the root of the project, from a terminal: - Your site is now running at `http://localhost:8000`! +| 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 | - _Note: You'll also see a second link: _`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.org/tutorial/part-five/#introducing-graphiql)._ +## πŸ‘€ Want to learn more? - Open the `my-blog-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time! - -## 🧐 What's inside? - -A quick look at the top-level files and directories you'll see in a Gatsby project. - - . - β”œβ”€β”€ node_modules - β”œβ”€β”€ src - β”œβ”€β”€ .gitignore - β”œβ”€β”€ .prettierrc - β”œβ”€β”€ gatsby-browser.js - β”œβ”€β”€ gatsby-config.js - β”œβ”€β”€ gatsby-node.js - β”œβ”€β”€ gatsby-ssr.js - β”œβ”€β”€ LICENSE - β”œβ”€β”€ package-lock.json - β”œβ”€β”€ package.json - └── README.md - -1. **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed. - -2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for β€œsource code”. - -3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for. - -4. **`.prettierrc`**: This is a configuration file for [Prettier](https://prettier.io/). Prettier is a tool to help keep the formatting of your code consistent. - -5. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.org/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser. - -6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the [config docs](https://www.gatsbyjs.org/docs/gatsby-config/) for more detail). - -7. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.org/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process. - -8. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.org/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering. - -9. **`LICENSE`**: Gatsby is licensed under the MIT license. - -10. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You won’t change this file directly).** - -11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project. - -12. **`README.md`**: A text file containing useful reference information about your project. - -## πŸŽ“ Learning Gatsby - -Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.org/). Here are some places to start: - -- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process. - -- **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.org/docs/).** In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar. - -## πŸ’« Deploy - -[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-blog) - -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/gatsbyjs/gatsby-starter-blog) - - +Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 000000000..e762ba5cf --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,5 @@ +// @ts-check +import { defineConfig } from 'astro/config'; + +// https://astro.build/config +export default defineConfig({}); diff --git a/gatsby-browser.js b/gatsby-browser.js deleted file mode 100644 index 8b843acc9..000000000 --- a/gatsby-browser.js +++ /dev/null @@ -1 +0,0 @@ -import "./src/styles/global.css" diff --git a/gatsby-config.js b/gatsby-config.js deleted file mode 100644 index c9294d8ff..000000000 --- a/gatsby-config.js +++ /dev/null @@ -1,82 +0,0 @@ -require("dotenv").config({ - path: `.env.${process.env.NODE_ENV}`, -}) - -module.exports = { - siteMetadata: { - siteUrl: `https://www.jessebox.net/`, - }, - plugins: [ - { - resolve: `gatsby-plugin-typescript`, - options: { - isTSX: true, // defaults to false - jsxPragma: `React`, // defaults to "React" - allExtensions: true, // defaults to false - }, - }, - { - resolve: "gatsby-plugin-eslint", - options: { - test: /\.js$|\.jsx$|\.ts$|\.tsx$/, - exclude: /(node_modules|.cache|public)/, - stages: ["develop"], - options: { - emitWarning: true, - failOnError: false, - }, - }, - }, - { - resolve: `gatsby-transformer-remark`, - options: { - plugins: [ - { - resolve: "gatsby-remark-embed-video", - options: { - width: 800, - ratio: 1.77, // Optional: Defaults to 16/9 = 1.77 - height: 400, // Optional: Overrides optional.ratio - related: false, //Optional: Will remove related videos from the end of an embedded YouTube video. - noIframeBorder: true, //Optional: Disable insertion of + diff --git a/src/components/Bio.tsx b/src/components/Bio.tsx deleted file mode 100644 index 940f0eff1..000000000 --- a/src/components/Bio.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import React from "react" -import { Link } from "gatsby" -import { useStaticQuery, graphql } from "gatsby" - -interface Data { - datoCmsAbout: { - header: string - subheaderNode: { - childMarkdownRemark: { - html: "string" - } - } - linkTo: string - linkLabel: string - } -} - -export default function Bio() { - const data: Data = useStaticQuery(graphql` - query BioQuery { - datoCmsAbout { - header - subheaderNode { - childMarkdownRemark { - html - } - } - linkTo - linkLabel - } - } - `) - - return ( -
-

{data.datoCmsAbout.header}

-
-
- {data.datoCmsAbout.linkLabel} -
-
- ) -} diff --git a/src/components/CardPost.tsx b/src/components/CardPost.tsx deleted file mode 100644 index 39f99bdcf..000000000 --- a/src/components/CardPost.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react" -import { Link } from "gatsby" -import Image, { FluidObject } from "gatsby-image" - -interface Props { - key: string - date: string - title: string - to: string - description: string - alt: string - fluid: FluidObject -} - -export default function CardPost(props: Props) { - const { key, date, title, to, description, alt, fluid } = props - - return ( -
  • -
    - {alt} -
    -
    -

    - - {title} - -

    -

    {description}

    -
    {date}
    -
    -
  • - ) -} diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx deleted file mode 100644 index 1d10b4be8..000000000 --- a/src/components/Footer.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React from "react" - -export default function Footer() { - return ( - - ) -} diff --git a/src/components/HeaderPage.tsx b/src/components/HeaderPage.tsx deleted file mode 100644 index 5dd4d34fb..000000000 --- a/src/components/HeaderPage.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from "react" -import { Link } from "gatsby" -import Image, { FluidObject } from "gatsby-image" - -interface Props { - hero?: FluidObject - alt?: string - caption?: string - header: string - subheader: string - linkTo?: string - linkLabel?: string -} - -export default function HeaderPage(props: Props) { - const { hero, alt, caption, header, subheader, linkTo, linkLabel } = props - return ( -
    - {hero ? ( -
    - {alt} -
    {caption}
    -
    - ) : null} -

    {header}

    -
    - {linkTo ? ( -
    - {linkLabel} -
    - ) : null} -
    - ) -} diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx deleted file mode 100644 index 37332cf6d..000000000 --- a/src/components/Layout.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import React from "react" -import { useStaticQuery, graphql } from "gatsby" -import { HelmetDatoCms } from "gatsby-source-datocms" - -import "../styles/global.css" -import Navigation from "./Navigation" -import Footer from "./Footer" - -interface Data { - datoCmsSite: { - locale: string - faviconMetaTags: any - } - datoCmsSeoMetaTags: { - tags: [] - } -} - -interface Props { - children: React.ReactNode -} - -export default function Layout(props: Props) { - const { children } = props - - const data: Data = useStaticQuery(graphql` - query seoQuery { - datoCmsSite { - locale - faviconMetaTags { - ...GatsbyDatoCmsFaviconMetaTags - } - } - datoCmsSeoMetaTags { - ...GatsbyDatoCmsSeoMetaTags - } - } - `) - - return ( - <> - - - - -
    {children}
    -