Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: assist documentation #1387

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

159 changes: 80 additions & 79 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";
import rehypeSlug from "rehype-slug";
import { searchForWorkspaceRoot } from "vite";
import { version as biomeVersion } from "./node_modules/@biomejs/wasm-web/package.json";
import { version as prettierVersion } from "./node_modules/prettier/package.json";
import { bundledLanguages } from "./node_modules/shiki";
import { version as biomeVersion } from "./node_modules/@biomejs/wasm-web/package.json" with {
type: "json",
};
import { version as prettierVersion } from "./node_modules/prettier/package.json" with {
type: "json",
};
import { rehypeAutolink } from "./plugins/rehype-autolink";

const site = "https://biomejs.dev";
Expand Down Expand Up @@ -136,75 +139,15 @@ export default defineConfig({
],
},
{
label: "Tools",
translations: {
ja: "ツール",
"zh-CN": "工具",
"pt-BR": "Ferramentas",
},
label: "Analyzer",
items: [
{
label: "Analyzer",
items: [
{
label: "Introduction",
link: "/analyzer",
translations: {
ja: "イントロダクション",
"zh-CN": "介绍",
"pt-BR": "Introdução",
},
},
{
label: "Import Sorting",
link: "/analyzer/import-sorting",
translations: {
ja: "Import文のソート",
"zh-CN": "导入排序",
"pt-BR": "Ordenação de importações",
},
},
],
label: "Introduction",
link: "/analyzer",
translations: {
ja: "Analyzer",
"zh-CN": "分析器",
"pt-BR": "Analisador",
},
},
{
label: "Formatter",
items: [
{
label: "Introduction",
link: "/formatter",
translations: {
ja: "イントロダクション",
"zh-CN": "介绍",
"pt-BR": "Introdução",
},
},
{
label: "Differences with Prettier",
link: "/formatter/differences-with-prettier",
translations: {
ja: "Prettier との違い",
"zh-CN": "与 Prettier 的区别",
"pt-BR": "Diferenças em relação ao Prettier",
},
},
{
label: "Formatter Option Philosophy",
link: "/formatter/option-philosophy",
translations: {
ja: "Formatterオプションに対する考え方",
"zh-CN": "格式化配置理念",
"pt-BR": "Princípios de configuração",
},
},
],
translations: {
"zh-CN": "格式化程序",
"pt-BR": "Formatador",
ja: "イントロダクション",
"zh-CN": "介绍",
"pt-BR": "Introdução",
},
},
{
Expand Down Expand Up @@ -234,7 +177,71 @@ export default defineConfig({
},
],
},
{
label: "Assist",
badge: "new",
items: [
{
label: "Introduction",
link: "/assist",
},
{
label: "Actions",
link: "/assist/actions",
},
],
},
{
label: "Import Sorting",
link: "/analyzer/import-sorting",
translations: {
ja: "Import文のソート",
"zh-CN": "导入排序",
"pt-BR": "Ordenação de importações",
},
},
],
translations: {
ja: "Analyzer",
"zh-CN": "分析器",
"pt-BR": "Analisador",
},
},
{
label: "Formatter",
items: [
{
label: "Introduction",
link: "/formatter",
translations: {
ja: "イントロダクション",
"zh-CN": "介绍",
"pt-BR": "Introdução",
},
},
{
label: "Differences with Prettier",
link: "/formatter/differences-with-prettier",
translations: {
ja: "Prettier との違い",
"zh-CN": "与 Prettier 的区别",
"pt-BR": "Diferenças em relação ao Prettier",
},
},
{
label: "Formatter Option Philosophy",
link: "/formatter/option-philosophy",
translations: {
ja: "Formatterオプションに対する考え方",
"zh-CN": "格式化配置理念",
"pt-BR": "Princípios de configuração",
},
},
],
translations: {
"zh-CN": "格式化程序",
"pt-BR": "Formatador",
},
},
{
label: "Reference",
Expand All @@ -251,7 +258,6 @@ export default defineConfig({
{
label: "Diagnostics",
link: "/reference/diagnostics",
badge: "new",
},
{
label: "Environment variables",
Expand Down Expand Up @@ -282,7 +288,6 @@ export default defineConfig({
{
label: "Zed extension",
link: "/reference/zed",
badge: "new",
translations: {
ja: "Zed拡張機能",
"zh-CN": "Zed 扩展",
Expand Down Expand Up @@ -438,14 +443,10 @@ export default defineConfig({
syntaxHighlight: "shiki",
rehypePlugins: [rehypeSlug, ...rehypeAutolink()],
shikiConfig: {
langs: [
// @ts-expect-error
{
...(await bundledLanguages.javascript()).default[0],
scopeName: "source.cjs",
aliases: ["cjs"],
},
],
langAlias: {
cjs: "javascript",
grit: "text",
},
},
},

Expand Down
Loading