Skip to content

Commit

Permalink
feat: introduce blog (#2)
Browse files Browse the repository at this point in the history
  - configure content collections for blog route
  - configure biome for lint/format
  - configure tailwind typography
  • Loading branch information
at-the-vr authored Aug 28, 2024
1 parent d0e91e7 commit bd03ffd
Show file tree
Hide file tree
Showing 24 changed files with 977 additions and 243 deletions.
15 changes: 12 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
.astro
dist
node_modules
**/dist
**/node_modules
.github
pnpm-lock.yaml
.vscode
.vscode

*.js
*.ts
*.mjs
*.cjs
*.json
*.jsonc
*.mdx
*.md
18 changes: 9 additions & 9 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/** @type {import("prettier").Config} */
export default {
plugins: ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
plugins: ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
};
12 changes: 6 additions & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"recommendations": [
"astro-build.astro-vscode",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
],
"unwantedRecommendations": []
"recommendations": [
"astro-build.astro-vscode",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
],
"unwantedRecommendations": []
}
18 changes: 9 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ All commands are run from the root of the project, on a terminal:
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro preview` |
| `pnpm astro --help` | Get help using the Astro CLI |


### Credits

[Michael](https://github.com/michael-andreuzza) for the AstroMax Theme Template
19 changes: 10 additions & 9 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { defineConfig } from "astro/config";
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import icon from "astro-icon";
import { defineConfig } from "astro/config";

import sitemap from "@astrojs/sitemap";
import mdx from "@astrojs/mdx";

// https://astro.build/config
export default defineConfig({
site:
process.env.VERCEL_ENV === "production"
? "https://atharvatypes.vercel.app"
: process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}/`
: "http://localhost:4321/",
integrations: [tailwind(), icon(), sitemap({})],
site:
process.env.VERCEL_ENV === "production"
? "https://atharvatypes.vercel.app"
: process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}/`
: "https://localhost:4321/",
integrations: [tailwind(), icon(), sitemap({}), mdx()],
});
28 changes: 28 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"files": {
"ignore": [".astro/types.d.ts"]
},
"overrides": [
{
"include": ["*.svelte", "*.astro", "*.vue"],
"linter": {
"rules": {
"style": {
"useConst": "off",
"useImportType": "off"
}
}
}
}
]
}
57 changes: 31 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
{
"name": "website",
"type": "module",
"version": "0.5.2",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"format": "prettier . -w --cache",
"format:ci": "prettier ./src/ -w"
},
"dependencies": {
"@astrojs/check": "^0.8.3",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.12.3",
"astro-icon": "^1.1.0",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4"
},
"devDependencies": {
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.6.5"
}
"name": "website",
"type": "module",
"version": "0.5.2",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"format": "biome check --write ./ && prettier -w \"**/*\" --ignore-unknown --cache",
"lint": "biome check .",
"lint:fix": "biome check --write .",
"format:ci": "biome check --write ./ && prettier ./ -w"
},
"dependencies": {
"@astrojs/check": "^0.8.3",
"@astrojs/mdx": "^3.1.4",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.12.3",
"astro-icon": "^1.1.0",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@tailwindcss/typography": "^0.5.14",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.6.5"
}
}
Loading

0 comments on commit bd03ffd

Please sign in to comment.