Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaBubermanOB authored Oct 8, 2024
2 parents ded3669 + 04f3ba3 commit cc19d8e
Show file tree
Hide file tree
Showing 27 changed files with 4,725 additions and 6,241 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: GitHub Actions

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18
- 20
- 22
steps:
- uses: actions/checkout@v4
- name: Use Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run build
# - run: npm test

check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run check
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"yaml.schemas": {
"./.vscode/astrowind/config-schema.json": "/src/config.yaml"
},
"eslint.experimental.useFlatConfig": true
"eslint.useFlatConfig": true
}
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Inside **AstroWind** template, you'll see the following folders and files:
│ ├── config.yaml
│ └── navigation.js
├── package.json
├── astro.config.mjs
├── astro.config.ts
└── ...
```

Expand All @@ -140,15 +140,15 @@ Any static assets, like images, can be placed in the `public/` directory if they

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 |
| `npm run format` | Format codes with Prettier |
| `npm run lint:eslint` | Run Eslint |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` |
| 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 |
| `npm run check` | Check your project for errors |
| `npm run fix` | Run Eslint and format codes with Prettier |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` |

<br>

Expand Down Expand Up @@ -256,13 +256,13 @@ prefer.

#### Deploy to Netlify

Clone this repository on own GitHub account and deploy to Netlify:
Clone this repository on your own GitHub account and deploy it to Netlify:

[![Netlify Deploy button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/onwidget/astrowind)

#### Deploy to Vercel

Clone this repository on own GitHub account and deploy to Vercel:
Clone this repository on your own GitHub account and deploy to Vercel:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fonwidget%2Fastrowind)

Expand All @@ -283,7 +283,7 @@ Clone this repository on own GitHub account and deploy to Vercel:

## Contributing

If you have any idea, suggestions or find any bugs, feel free to open a discussion, an issue or create a pull request.
If you have any ideas, suggestions or find any bugs, feel free to open a discussion, an issue or create a pull request.
That would be very useful for all of us and we would be happy to listen and take action.

## Acknowledgements
Expand Down
14 changes: 5 additions & 9 deletions astro.config.mjs → astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
import path from 'path';
import { fileURLToPath } from 'url';

import { defineConfig, squooshImageService } from 'astro/config';
import { defineConfig } from 'astro/config';

import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import mdx from '@astrojs/mdx';
import partytown from '@astrojs/partytown';
import icon from 'astro-icon';
import compress from '@playform/compress';
import compress from 'astro-compress';
import type { AstroIntegration } from 'astro';

import astrowind from './vendor/integration';

import {
readingTimeRemarkPlugin,
responsiveTablesRehypePlugin,
lazyImagesRehypePlugin,
} from './src/utils/frontmatter.mjs';
import { readingTimeRemarkPlugin, responsiveTablesRehypePlugin, lazyImagesRehypePlugin } from './src/utils/frontmatter';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const hasExternalScripts = false;
const whenExternalScripts = (items = []) =>
const whenExternalScripts = (items: (() => AstroIntegration) | (() => AstroIntegration)[] = []) =>
hasExternalScripts ? (Array.isArray(items) ? items.map((item) => item()) : [items()]) : [];

export default defineConfig({
Expand Down Expand Up @@ -75,7 +72,6 @@ export default defineConfig({
],

image: {
service: squooshImageService(),
domains: ['cdn.pixabay.com'],
},

Expand Down
Loading

0 comments on commit cc19d8e

Please sign in to comment.