diff --git a/.prettierrc.json b/.prettierrc.json index 603c65a1a5..6f5f4f2938 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -8,7 +8,8 @@ "tabWidth": 2, "plugins": [ "./packages/prettier-plugin-typespec/dist/index.js", - "./node_modules/prettier-plugin-organize-imports/index.js" + "./node_modules/prettier-plugin-organize-imports/index.js", + "prettier-plugin-astro" ], "overrides": [ { @@ -16,6 +17,12 @@ "options": { "parser": "typespec" } + }, + { + "files": "*.astro", + "options": { + "parser": "astro" + } } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 8e894d52f4..060a77ad40 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -28,7 +28,7 @@ "editor.detectIndentation": false, "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "[json][[jsonc][yaml][typespec][markdown][css]": { + "[json][[jsonc][yaml][typespec][markdown][css][astro]": { "editor.formatOnSave": true, "editor.formatOnPaste": true, "editor.insertSpaces": true, @@ -58,8 +58,6 @@ "vitest.enable": true, "vitest.commandLine": "node ./node_modules/vitest/vitest.mjs", "prettier.prettierPath": "./node_modules/prettier/index.cjs", - "prettier.documentSelectors": ["**/*.tsp"], - "testExplorer.errorDecoration": false, - "typespec.tsp-server.path": "${workspaceFolder}/packages/compiler", - "eslint.experimental.useFlatConfig": true // Still needed new version coming soon should work without https://github.com/microsoft/vscode-eslint/issues/1644 + "prettier.documentSelectors": ["**/*.tsp", "**/*.astro"], + "typespec.tsp-server.path": "${workspaceFolder}/packages/compiler" } diff --git a/package.json b/package.json index bd7b0fe919..e18ce113f4 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "micromatch": "^4.0.8", "picocolors": "~1.1.0", "prettier": "~3.3.3", + "prettier-plugin-astro": "^0.14.1", "prettier-plugin-organize-imports": "~4.1.0", "rimraf": "~6.0.1", "syncpack": "^13.0.0", diff --git a/packages/website-astro/astro.config.mjs b/packages/website-astro/astro.config.mjs index 2174f04ee5..b5cd3bf813 100644 --- a/packages/website-astro/astro.config.mjs +++ b/packages/website-astro/astro.config.mjs @@ -33,6 +33,7 @@ export default defineConfig({ starlight({ title: "TypeSpec", sidebar: await resolveSideBars(), + favicon: "/img/favicon.svg", customCss: ["./src/css/custom.css"], components: { Header: "./src/components/header/header.astro", diff --git a/packages/website-astro/src/components/homepage/extensibility-illustration.astro b/packages/website-astro/src/components/homepage/extensibility-illustration.astro index 53b3a7eacd..17a3359909 100644 --- a/packages/website-astro/src/components/homepage/extensibility-illustration.astro +++ b/packages/website-astro/src/components/homepage/extensibility-illustration.astro @@ -3,6 +3,7 @@ import { Code } from "@astrojs/starlight/components"; import extensibilityTs from "@site/src/assets/tsp-samples/extensibility/custom-lib.ts?raw"; import extensibilityTsp from "@site/src/assets/tsp-samples/extensibility/custom-lib.tsp?raw"; --- + diff --git a/packages/website-astro/src/pages/blog/_BlogPostPreview.astro b/packages/website-astro/src/pages/blog/_BlogPostPreview.astro index 7aa2f3486a..18acdebc51 100644 --- a/packages/website-astro/src/pages/blog/_BlogPostPreview.astro +++ b/packages/website-astro/src/pages/blog/_BlogPostPreview.astro @@ -24,17 +24,17 @@ const image = post.data.image && (await resolveBlogImagePath(post.slug, post.dat ---
- - + +