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
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
with:
token: ${{ secrets.GH_TOKEN }}
submodules: true

- name: Create .env file
run: |
echo "NEXT_PUBLIC_ALGOLIA_APP_ID=${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }}" >> .env
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 🧪 Test

on:
pull_request:
branches: [dev]
workflow_dispatch:
workflow_call:

concurrency:
group: ci-test-${{ github.sha }}
cancel-in-progress: false

permissions:
contents: read
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
npmtoken: ${{ secrets.VERDACCIO_TOKEN }}

- name: Check Build
run: pnpm build

lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.GH_TOKEN }}

- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
npmtoken: ${{ secrets.VERDACCIO_TOKEN }}

- name: Check eslint
run: pnpm lint
2 changes: 1 addition & 1 deletion app/[lang]/[[...mdxPath]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Metadata } from 'next'
import { generateStaticParamsFor, importPage } from 'nextra/pages'
import FeedbackMessage from '@/components/feedback-message'
import { useMDXComponents } from '@/mdx-components'
import { generateStaticParamsFor, importPage } from 'nextra/pages'

export const generateStaticParams = generateStaticParamsFor('mdxPath')

Expand Down
6 changes: 3 additions & 3 deletions app/[lang]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Metadata } from 'next'
import { Layout } from 'nextra-theme-docs'
import { Head } from 'nextra/components'
import { getPageMap } from 'nextra/page-map'
import Banner from '@/components/banner'
import Copyright from '@/components/copyright'
import DocSearch from '@/components/doc-search'
import Navbar from '@/components/navbar'
import TocBackToTop from '@/components/toc-back-to-top'
import { Layout } from 'nextra-theme-docs'
import { Head } from 'nextra/components'
import { getPageMap } from 'nextra/page-map'

import { version } from '../../package.json'

Expand Down
2 changes: 1 addition & 1 deletion components/banner.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use client'

import { useTranslation } from '@/hooks/i18n'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import { Banner as NextraBanner } from 'nextra/components'
import { useTranslation } from '@/hooks/i18n'

interface IProps {
version: string
Expand Down
2 changes: 1 addition & 1 deletion components/business-plan-notice.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useTranslation } from '@/hooks/i18n'
import { usePathname } from 'next/navigation'
import { Callout } from 'nextra/components'
import { useTranslation } from '@/hooks/i18n'

export default function BusinessPlanNotice() {
const pathname = usePathname()
Expand Down
2 changes: 1 addition & 1 deletion components/feature-box.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import { useTranslation } from '@/hooks/i18n'
import { usePathname } from 'next/navigation'
import { useTranslation } from '@/hooks/i18n'

export default function FeatureBox() {
const pathname = usePathname()
Expand Down
2 changes: 1 addition & 1 deletion components/feedback-message.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client'

import { useTranslation } from '@/hooks/i18n'
import { FeelbackTaggedMessage, PRESET_EVALUATION } from '@feelback/react'
import { usePathname } from 'next/navigation'
import { useTranslation } from '@/hooks/i18n'

import '@feelback/react/styles/feelback.css'

Expand Down
4 changes: 2 additions & 2 deletions components/product-selector.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use client'

import { useTranslation } from '@/hooks/i18n'
import clsx from '@/lib/clsx'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import { useEffect, useRef, useState } from 'react'
import { useTranslation } from '@/hooks/i18n'
import clsx from '@/lib/clsx'

function Icon() {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/server-notice.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client'

import { useTranslation } from '@/hooks/i18n'
import { usePathname } from 'next/navigation'
import { Callout } from 'nextra/components'
import { useTranslation } from '@/hooks/i18n'

export default function BusinessPlanNotice() {
const pathname = usePathname()
Expand Down
2 changes: 1 addition & 1 deletion components/toc-back-to-top.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import { useTranslation } from '@/hooks/i18n'
import { usePathname } from 'next/navigation'
import { useTranslation } from '@/hooks/i18n'

export default function TocBackToTop() {
const pathname = usePathname()
Expand Down
2 changes: 1 addition & 1 deletion components/toc-title.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useTranslation } from '@/hooks/i18n'
import { usePathname } from 'next/navigation'
import { useTranslation } from '@/hooks/i18n'

export default function TocTitle() {
const pathname = usePathname()
Expand Down
2 changes: 1 addition & 1 deletion content/en-US/_meta.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ProductSelector from '@/components/product-selector'
import { ShareRangeSingle } from '@univerjs/icons'
import ProductSelector from '@/components/product-selector'

export default {
selector: {
Expand Down
2 changes: 1 addition & 1 deletion content/zh-CN/_meta.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ProductSelector from '@/components/product-selector'
import { ShareRangeSingle } from '@univerjs/icons'
import ProductSelector from '@/components/product-selector'

export default {
selector: {
Expand Down
1 change: 0 additions & 1 deletion eslint.config.mjs → eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default antfu({
'packages/api/public/**/*',
'packages/showcase/src/*/demo/data.ts',
],
typescript: true,
formatters: true,
markdown: true,
react: true,
Expand Down
23 changes: 19 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "@univerjs-site/docs",
"type": "module",
"version": "0.7.0",
"packageManager": "pnpm@10.11.0",
"private": true,
"packageManager": "pnpm@10.11.0",
"scripts": {
"prepare": "simple-git-hooks",
"dev": "next",
"build": "NODE_OPTIONS=\"--max-old-space-size=4096\" next build",
"start": "next start"
"start": "next start",
"lint": "eslint ."
},
"dependencies": {
"@docsearch/css": "^3.9.0",
Expand All @@ -21,7 +23,7 @@
"@univerjs/uniscript": "0.8.0-beta.1",
"@univerjs/watermark": "0.8.0-beta.1",
"clsx": "^2.1.1",
"next": "15.3.2",
"next": "15.3.3",
"nextra": "^4.2.17",
"nextra-theme-docs": "^4.2.17",
"react": "19.1.0",
Expand All @@ -30,15 +32,28 @@
},
"devDependencies": {
"@antfu/eslint-config": "^4.13.2",
"@eslint-react/eslint-plugin": "^1.50.0",
"@tailwindcss/postcss": "^4.1.8",
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.5",
"eslint": "^9.27.0",
"eslint": "^9.28.0",
"eslint-plugin-format": "^1.0.1",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"eslint-plugin-readable-tailwind": "^2.1.2",
"file-loader": "^6.2.0",
"lint-staged": "^16.1.0",
"postcss": "^8.5.4",
"shiki": "^3.4.2",
"simple-git-hooks": "^2.13.0",
"tailwindcss": "^4.1.8",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.8.3"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"!submodules/*": "eslint"
}
}
Loading
Loading