Skip to content

Commit df3892f

Browse files
committed
docs: mention about the mirrored state
1 parent 35595fb commit df3892f

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# [sli.dev](https://sli.dev)
22

3-
Documentation for [Slidev](https://github.com/slidevjs/slidev)
3+
> [!IMPORTANT]
4+
> This repository is a mirror of the `docs/` directory in [slidevjs/slidev](https://github.com/slidevjs/slidev/tree/main/docs). Mainly for other translations repositories to sync.
5+
>
6+
> **‼️ Please DO NOT submit pull requests here ‼️**. Instead, send them to the [main repository](https://github.com/slidevjs/slidev), and they will be synced here automatically.
7+
8+
Mirrored documentation site for [Slidev](https://github.com/slidevjs/slidev)
49

510
## Translations
611

712
| | Repo | Site | Maintainers |
813
| -------------- | ---------------------------------------------- | -------------------------------: | --------------------------------------------------------------------- |
9-
| English | [docs](https://github.com/slidevjs/docs) | [sli.dev](https://sli.dev) | [@antfu](https://github.com/antfu) |
14+
| English | [docs](https://github.com/slidevjs/slidev/tree/main/docs) | [sli.dev](https://sli.dev) | [@antfu](https://github.com/antfu) |
1015
| 简体中文 | [docs-cn](https://github.com/slidevjs/docs-cn) | [cn.sli.dev](https://cn.sli.dev) | [@QC-L](https://github.com/QC-L) [@Ivocin](https://github.com/Ivocin) |
1116
| Français | [docs-fr](https://github.com/slidevjs/docs-fr) | [fr.sli.dev](https://fr.sli.dev) | [@ArthurDanjou](https://github.com/ArthurDanjou) |
1217
| Español | [docs-es](https://github.com/slidevjs/docs-es) | [es.sli.dev](https://es.sli.dev) | [@owlnai](https://github.com/owlnai) |

sync.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/**
2+
* Sync the changes from the main Slidev repository to this repo
3+
* https://stackoverflow.com/a/63745988
4+
*
5+
* Use `bun sync.js` to run this script
6+
*/
7+
/* eslint-disable no-console */
8+
import process from 'node:process'
9+
import { $ } from 'bun'
10+
11+
await $`git remote rm slidev`
12+
await $`git remote add slidev https://github.com/slidevjs/slidev`
13+
await $`git fetch slidev main`
14+
15+
console.log('Timestamp of last commit:')
16+
const { stdout: timestamp } = await $`git log -1 --format="%at" main`
17+
console.log('Commits since last time:')
18+
const { stdout: hashes } = await $`git log --since="${+(timestamp.toString()) + 1}" slidev/main --format="%H"`
19+
20+
const firstHash = hashes.toString().trim().split('\n').at(-1)
21+
if (!firstHash) {
22+
console.log('No changes to sync')
23+
process.exit(0)
24+
}
25+
26+
const command = `git format-patch -k --stdout ${firstHash}...slidev/main --remove-empty -- docs | git am -3 -k --empty=drop`
27+
console.log('Running command:', command)
28+
await $(command)

0 commit comments

Comments
 (0)