Skip to content

Commit

Permalink
feat: upgrade to docusaurus v3 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
uncenter authored Nov 1, 2023
1 parent 015ad9b commit 8b80364
Show file tree
Hide file tree
Showing 24 changed files with 4,785 additions and 5,076 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Lock Threads

on:
schedule:
- cron: '5 3 * * *'
- cron: "5 3 * * *"
workflow_dispatch:

permissions:
Expand All @@ -18,11 +18,11 @@ jobs:
steps:
- uses: dessant/lock-threads@v4
with:
issue-inactive-days: '30'
issue-inactive-days: "30"
issue-comment: >
I'm going to lock this issue because it has been closed for _30 days_. ⏳
This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new
issue and complete the issue template so we can capture all the details
necessary to investigate further.
process-only: 'issues'
process-only: "issues"
2 changes: 1 addition & 1 deletion .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
issue_comment:
types: [created]
schedule:
- cron: '10 * * * *'
- cron: "10 * * * *"

jobs:
noResponse:
Expand Down
7 changes: 6 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
{"language":"en","version":"0.2","flagWords":[],"words":["linemode","Hyprland","ueberzug","yazi","sxyazi","Discardable","Sixel","downscaling","downscales"]}
{
"language": "en",
"version": "0.2",
"flagWords": [],
"words": ["linemode", "Hyprland", "ueberzug", "yazi", "sxyazi", "Discardable", "Sixel", "downscaling", "downscales"]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions usage/quick-start.md → docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ To select files and directories, the following commands are available.

| Key binding | Action |
| ----------- | ---------------------------------------------- |
| <Space\> | Toggle selection of highlighted file/directory |
| \<Space> | Toggle selection of highlighted file/directory |
| v | Enter visual mode (selection mode) |
| V | Enter visual mode (unset mode) |
| <Ctrl-a\> | Select all files |
| <Ctrl-r\> | Inverse selection of all files |
| <Esc\> | Cancel selection |
| \<Ctrl-a> | Select all files |
| \<Ctrl-r> | Inverse selection of all files |
| \<Esc> | Cancel selection |

### File/directory operations

Expand All @@ -69,8 +69,8 @@ To interact with selected files/directories use any of the commands below.
| ------------- | --------------------------------------------------------------------------- |
| o | Open the selected files |
| O | Open the selected files interactively |
| <Enter\> | Open the selected files |
| <Ctrl-Enter\> | Open the selected files interactively (some terminals don't support it yet) |
| \<Enter> | Open the selected files |
| \<Ctrl-Enter> | Open the selected files interactively (some terminals don't support it yet) |
| y | Yank the selected files (copy) |
| x | Yank the selected files (cut) |
| p | Paste the yanked files |
Expand All @@ -86,7 +86,7 @@ To interact with selected files/directories use any of the commands below.
| . | Toggle the visibility of hidden files |
| s | Search files by name using fd |
| S | Search files by content using ripgrep |
| <Ctrl-s\> | Cancel the ongoing search |
| \<Ctrl-s> | Cancel the ongoing search |
| z | Jump to a directory using zoxide |
| Z | Jump to a directory, or reveal a file using fzf |

Expand Down
File renamed without changes.
132 changes: 0 additions & 132 deletions docusaurus.config.js

This file was deleted.

125 changes: 125 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
import { themes as prismThemes } from "prism-react-renderer"
import type { Config } from "@docusaurus/types"
import type * as Preset from "@docusaurus/preset-classic"

const config: Config = {
title: "Yazi",
tagline: "⚡️ Blazing fast terminal file manager written in Rust, based on async I/O.",
favicon: "img/logo.png",

url: "https://yazi-rs.github.io",
baseUrl: "/",

organizationName: "yazi-rs",
projectName: "yazi-rs.github.io",

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

i18n: {
defaultLocale: "en",
locales: ["en"],
},

presets: [
[
"classic",
{
docs: {
path: "docs",
routeBasePath: "docs",
sidebarPath: "./sidebars.ts",
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/yazi-rs/yazi-rs.github.io/edit/main/",
},
blog: {
showReadingTime: true,
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/yazi-rs/yazi-rs.github.io/edit/main/",
},
theme: {
customCss: "./src/css/custom.css",
},
} satisfies Preset.Options,
],
],

themeConfig: {
// Replace with your project's social card
image: "img/docusaurus-social-card.jpg",
navbar: {
title: "Yazi",
logo: {
alt: "Yazi file manager",
src: "img/logo.png",
},
items: [
{
type: "docSidebar",
sidebarId: "docsSidebar",
position: "left",
label: "Docs",
},
{ to: "/showcase", label: "Showcase", position: "left" },
{ to: "/blog", label: "Blog", position: "left" },
{
href: "https://github.com/sxyazi/yazi",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Docs",
to: "/docs/installation",
},
{
label: "Showcase",
to: "/showcase",
},
],
},
{
title: "Community",
items: [
{
label: "Discord (English mainly)",
href: "https://discord.gg/qfADduSdJu",
},
{
label: "Telegram (Chinese mainly)",
href: "https://t.me/yazi_rs",
},
],
},
{
title: "More",
items: [
{
label: "GitHub",
href: "https://github.com/sxyazi/yazi",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Yazi. Built with ❤️️.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ["lua", "toml", "diff", "bash"],
},
} satisfies Preset.ThemeConfig,

markdown: {
format: "mdx",
},
}

export default config
24 changes: 14 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc",
"format": "prettier --write ."
},
"dependencies": {
"@docusaurus/core": "2.4.3",
"@docusaurus/preset-classic": "2.4.3",
"@mdx-js/react": "^1.6.22",
"@docusaurus/core": "3.0.0",
"@docusaurus/preset-classic": "3.0.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"prism-react-renderer": "^2.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.3",
"prettier": "^3.0.3"
"@docusaurus/module-type-aliases": "3.0.0",
"@docusaurus/tsconfig": "3.0.0",
"@docusaurus/types": "3.0.0",
"prettier": "^3.0.3",
"typescript": "~5.2.2"
},
"browserslist": {
"production": [
Expand All @@ -38,7 +42,7 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
},
"packageManager": "pnpm@8.9.2"
"packageManager": "pnpm@8.10.1"
}
Loading

0 comments on commit 8b80364

Please sign in to comment.