Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# Logs
logs
*.log
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# jetbrains setting folder
.idea/


# CF workers
.wrangler/
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
51 changes: 0 additions & 51 deletions CLAUDE.md

This file was deleted.

105 changes: 47 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,63 @@
# React + TypeScript + Vite
# Astro Starter Kit: Blog

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
```sh
pnpm create astro@latest -- --template blog
```

Currently, two official plugins are available:
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
Features:

## Requirements
- ✅ Minimal styling (make it your own!)
- ✅ 100/100 Lighthouse performance
- ✅ SEO-friendly with canonical URLs and Open Graph data
- ✅ Sitemap support
- ✅ RSS Feed support
- ✅ Markdown & MDX support

### Install pnpm
## 🚀 Project Structure

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

```text
├── public/
├── src/
│   ├── assets/
│   ├── components/
│   ├── content/
│   ├── layouts/
│   └── pages/
├── astro.config.mjs
├── README.md
├── package.json
└── tsconfig.json
```

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

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

### Run Dev
```
pnpm run dev
```
The `src/content/` directory contains "collections" of related Markdown and MDX documents. Use `getCollection()` to retrieve posts from `src/content/blog/`, and type-check your frontmatter using an optional schema. See [Astro's Content Collections docs](https://docs.astro.build/en/guides/content-collections/) to learn more.

### Deploy prod
```
pnpm deploy:prod
```
Any static assets, like images, can be placed in the `public/` directory.

## Expanding the ESLint configuration
## 🧞 Commands

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
All commands are run from the root of the project, from a terminal:

- Configure the top-level `parserOptions` property like this:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `pnpm install` | Installs dependencies |
| `pnpm dev` | Starts local dev server at `localhost:4321` |
| `pnpm build` | Build your production site to `./dist/` |
| `pnpm preview` | Preview your build locally, before deploying |
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
| `pnpm astro -- --help` | Get help using the Astro CLI |

```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```
## 👀 Want to learn more?

- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:

```js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
})
```
Check out [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

## Credit

This theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/).
39 changes: 39 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// @ts-check

import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import { defineConfig, fontProviders } from 'astro/config';

import tailwindcss from '@tailwindcss/vite';

import react from '@astrojs/react';

// https://astro.build/config
export default defineConfig({
site: 'https://cotrasoft.co',
output: "static",
integrations: [mdx(), sitemap(), react()],
i18n: {
locales: ["es", "en"],
defaultLocale: "es",
routing: {
prefixDefaultLocale: true,
redirectToDefaultLocale: true,
},
},
fonts: [
{
provider: fontProviders.google(),
name: 'Inter',
cssVariable: '--font-inter',
weights: ['100 900'],
styles: ['normal'],
subsets: ['latin', 'latin-ext'],
fallbacks: ['system-ui', 'sans-serif'],
},
],

vite: {
plugins: [tailwindcss()],
},
});
34 changes: 34 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"version": "0.2",
"language": "en,es-ES",
"words": [
"cotrasoft",
"hreflang",
"jsonld",
"oxlint",
"oxfmt",
"pnpm",
"vite",
"astro",
"tailwindcss",
"webmanifest",
"Únete",
"Beneficios",
"Servicios",
"servicios",
"beneficios",
"sesión",
"Iniciar",
"Alternar",
"menú",
"Navegación"
],
"ignorePaths": [
"_OLD",
"node_modules",
"dist",
"pnpm-lock.yaml",
".astro",
"public/site.webmanifest"
]
}
28 changes: 0 additions & 28 deletions eslint.config.js

This file was deleted.

Loading