Skip to content
Closed
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/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "\U0001F4DA 反馈中文文档项目问题"
name: 📚 反馈中文文档项目问题
description: 反馈 Vite 官方中文文档项目的相关问题
labels: [documentation]
body:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: autofix.ci

on:
pull_request:
permissions:
contents: write

jobs:
autofix:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v5

- name: Use Node.js lts/*
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Lint
run: nr lint --fix

- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.DS_Store
Thumbs.db
db.json
Expand Down
10 changes: 5 additions & 5 deletions .vitepress/buildEnd.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import path from 'node:path'
import type { SiteConfig } from 'vitepress'
import { writeFileSync } from 'node:fs'
import path from 'node:path'
import { Feed } from 'feed'
import type { SiteConfig } from 'vitepress'
import { createContentLoader } from 'vitepress'

const siteUrl = 'https://vite.dev'
const blogUrl = `${siteUrl}/blog`

export const buildEnd = async (config: SiteConfig): Promise<void> => {
export async function buildEnd(config: SiteConfig): Promise<void> {
const feed = new Feed({
title: 'Vite',
description: 'Next Generation Frontend Tooling',
Expand All @@ -26,8 +26,8 @@ export const buildEnd = async (config: SiteConfig): Promise<void> => {

posts.sort(
(a, b) =>
+new Date(b.frontmatter.date as string) -
+new Date(a.frontmatter.date as string),
+new Date(b.frontmatter.date as string)
- +new Date(a.frontmatter.date as string),
)

for (const { url, excerpt, frontmatter, html } of posts) {
Expand Down
Loading
Loading