Skip to content

Commit

Permalink
docs: update links
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 26, 2024
1 parent 95d80e1 commit 842d092
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 32 deletions.
4 changes: 2 additions & 2 deletions docs/languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## Bundled Languages

Language grammars listed below are re-distributed via [`tm-grammars`](https://github.com/antfu/textmate-grammars-themes/tree/main/packages/tm-grammars) into the `shiki` package.
Language grammars listed below are re-distributed via [`tm-grammars`](https://github.com/shikijs/textmate-grammars-themes/tree/main/packages/tm-grammars) into the `shiki` package.

<LanguagesList />

Grammars are covered by their repositories’ respective licenses, which are permissive (apache-2.0, mit, etc), and made available in [this NOTICE](https://github.com/antfu/textmate-grammars-themes/blob/main/packages/tm-grammars/NOTICE).
Grammars are covered by their repositories’ respective licenses, which are permissive (apache-2.0, mit, etc), and made available in [this NOTICE](https://github.com/shikijs/textmate-grammars-themes/blob/main/packages/tm-grammars/NOTICE).

For loading your custom languages, please reference to [this guide](/guide/load-lang).

Expand Down
14 changes: 7 additions & 7 deletions docs/packages/cli.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# shiki-cli
# @shikijs/cli

<Badges name="shiki-cli" />
<Badges name="@shikijs/cli" />

Shiki in the command line.

Expand All @@ -9,15 +9,15 @@ Shiki in the command line.
The Shiki CLI works like `cat` command, but with syntax highlighting.

```bash
npx shiki-cli README.md
npx @shikijs/cli README.md
```

## Install

You can also install it globally. Command aliases `shiki-cli`, `shiki`, `skat` are registered.
You can also install it globally. Command aliases `@shikijs/cli`, `shiki`, `skat` are registered.

```bash
npm i -g shiki-cli
npm i -g @shikijs/cli

skat src/index.ts
```
Expand All @@ -29,13 +29,13 @@ skat src/index.ts
Specify the theme to use. Defaults to `vitesse-dark`.

```bash
npx shiki-cli README.md --theme=nord
npx @shikijs/cli README.md --theme=nord
```

### `--lang`

Language is auto-inferred from the file extension. You can override it with `--lang`.

```bash
npx shiki-cli src/index.js --lang=ts
npx @shikijs/cli src/index.js --lang=ts
```
8 changes: 4 additions & 4 deletions docs/packages/monaco.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# shiki-monaco
# @shikijs/monaco

<Badges name="shiki-monaco" />
<Badges name="@shikijs/monaco" />

Use Shiki to highlight [Monaco Editor](https://microsoft.github.io/monaco-editor/).

Expand All @@ -11,12 +11,12 @@ Heavily inspired by [`monaco-editor-textmate`](https://github.com/zikaari/monaco
## Install

```bash
npm i -D shiki-monaco
npm i -D @shikijs/monaco
```

```ts
import { getHighlighter } from 'shiki'
import { shikiToMonaco } from 'shiki-monaco'
import { shikiToMonaco } from '@shikijs/monaco'
import * as monaco from 'monaco-editor-core'

// Create the highlighter, it can be reused
Expand Down
12 changes: 6 additions & 6 deletions docs/packages/rehype.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
outline: deep
---

# rehype-shiki
# @shikijs/rehype

<Badges name="rehype-shiki" />
<Badges name="@shikijs/rehype" />

[rehype](https://github.com/rehypejs/rehype) plugin for Shiki.

## Install

```bash
npm i -D rehype-shiki
npm i -D @shikijs/rehype
```

## Usage
Expand All @@ -22,7 +22,7 @@ import { unified } from 'unified'
import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import rehypeStringify from 'rehype-stringify'
import rehypeShiki from 'rehype-shiki'
import rehypeShiki from '@shikijs/rehype'

const file = await unified()
.use(remarkParse)
Expand All @@ -40,15 +40,15 @@ const file = await unified()

## Fine-grained Bundle

By default, the full bundle of `shiki` will be imported. If you are using a [fine-grained bundle](/guide/install#fine-grained-bundle), you can import `rehypeShikiFromHighlighter` from `rehype-shiki/core` and pass your own highlighter:
By default, the full bundle of `shiki` will be imported. If you are using a [fine-grained bundle](/guide/install#fine-grained-bundle), you can import `rehypeShikiFromHighlighter` from `@shikijs/rehype/core` and pass your own highlighter:

```ts twoslash
// @noErrors: true
import { unified } from 'unified'
import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import rehypeStringify from 'rehype-stringify'
import rehypeShikiFromHighlighter from 'rehype-shiki/core'
import rehypeShikiFromHighlighter from '@shikijs/rehype/core'

import { fromHighlighter } from '@shikijs/markdown-it/core'
import { getHighlighterCore } from 'shiki/core'
Expand Down
2 changes: 1 addition & 1 deletion docs/packages/twoslash.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ By default `@typescript/twoslash` runs on Node.js and relies on your local syste

Luckily, Twoslash implemented a virtual file system, which allow you to provide your own files for TypeScript to resolve in memory. However, loading these files in the browser is still a challenge. Thanks to the work on the [TypeScript WebSite](https://github.com/microsoft/TypeScript-Website), the TypeScript team has provided some utilities to fetch types on demand through CDN, they call it [Automatic Type Acquisition (ATA)](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/ata).

We make tiny wrappers around the building blocks and provide an easy-to-use API in [`twoslash-cdn`](https://github.com/antfu/twoslash-cdn). For example:
We make tiny wrappers around the building blocks and provide an easy-to-use API in [`twoslash-cdn`](https://twoslash.netlify.app/packages/cdn). For example:

```js
// TODO: Replace with explicit versions in production
Expand Down
2 changes: 1 addition & 1 deletion docs/packages/vitepress.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ console.log('hello')

### Vue Single File Component

In addition, this plugin also integrated [`twoslash-vue`](https://github.com/antfu/twoslash-vue) for you, so that you can also highlight Vue SFC blocks with `vue twoslash`:
In addition, this plugin also integrated [`twoslash-vue`](https://twoslash.netlify.app/packages/vue) for you, so that you can also highlight Vue SFC blocks with `vue twoslash`:

```vue twoslash
<script setup>
Expand Down
4 changes: 2 additions & 2 deletions docs/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## Bundled Themes

Themes listed below are re-distributed via [`tm-themes`](https://github.com/antfu/textmate-grammars-themes/tree/main/packages/tm-themes) into the `shiki` package.
Themes listed below are re-distributed via [`tm-themes`](https://github.com/shikijs/textmate-grammars-themes/tree/main/packages/tm-themes) into the `shiki` package.

<ThemesList />

Themes are covered by their repositories’ respective licenses, which are permissive (apache-2.0, mit, etc), and made available in [this NOTICE](https://github.com/antfu/textmate-grammars-themes/blob/main/packages/tm-themes/NOTICE).
Themes are covered by their repositories’ respective licenses, which are permissive (apache-2.0, mit, etc), and made available in [this NOTICE](https://github.com/shikijs/textmate-grammars-themes/blob/main/packages/tm-themes/NOTICE).

For loading your custom themes, please reference to [this guide](/guide/load-theme).

Expand Down
3 changes: 2 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/shikijs/shiki.git",
"directory": "packages/shiki-cli"
"directory": "packages/cli"
},
"bugs": "https://github.com/shikijs/shiki/issues",
"keywords": [
Expand All @@ -34,6 +34,7 @@
"bin": {
"shiki": "bin.mjs",
"shiki-cli": "bin.mjs",
"@shikijs/cli": "bin.mjs",
"skat": "bin.mjs"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/shikijs/shiki.git",
"directory": "packages/shiki-compat"
"directory": "packages/compat"
},
"bugs": "https://github.com/shikijs/shiki/issues",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/shikijs/shiki.git",
"directory": "packages/@shikijs/core"
"directory": "packages/core"
},
"bugs": "https://github.com/shikijs/shiki/issues",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/monaco/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# shiki-monaco
# @shikijs/monaco

Use [shiki](https://github.com/shikijs/shiki) to highlight [Monaco Editor](https://microsoft.github.io/monaco-editor/).

Expand Down
4 changes: 2 additions & 2 deletions packages/shiki/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Code.
The original copyright notice and license under which the author(s) received
such Third Party Code are set forth below.

https://github.com/antfu/textmate-grammars-themes/blob/main/packages/tm-grammars/NOTICE
https://github.com/antfu/textmate-grammars-themes/blob/main/packages/tm-themes/NOTICE
https://github.com/shikijs/textmate-grammars-themes/blob/main/packages/tm-grammars/NOTICE
https://github.com/shikijs/textmate-grammars-themes/blob/main/packages/tm-themes/NOTICE
2 changes: 1 addition & 1 deletion packages/transformers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/shikijs/shiki.git",
"directory": "packages/@shikijs/transformers"
"directory": "packages/transformers"
},
"bugs": "https://github.com/shikijs/shiki/issues",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/twoslash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/shikijs/shiki.git",
"directory": "packages/@shikijs/twoslash"
"directory": "packages/twoslash"
},
"bugs": "https://github.com/shikijs/shiki/issues",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/vitepress-twoslash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/shikijs/shiki.git",
"directory": "packages/@shikijs/vitepress-twoslash"
"directory": "packages/vitepress-twoslash"
},
"bugs": "https://github.com/shikijs/shiki/issues",
"keywords": [
Expand Down

0 comments on commit 842d092

Please sign in to comment.