Skip to content

Commit

Permalink
🔖 Bump version 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Aug 30, 2023
1 parent 706ffc6 commit 8f41091
Show file tree
Hide file tree
Showing 15 changed files with 364 additions and 0 deletions.
18 changes: 18 additions & 0 deletions website/versioned_docs/version-2.1.0/components/Admonition.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Admonition

import Admonition from "@theme/Admonition";
import BrowserWindow from "@site/src/components/BrowserWindow";

```tsx
import Admonition from "@theme/Admonition";

<Admonition type="info" title="Title">
content
</Admonition>;
```

<BrowserWindow>
<Admonition type="info" title="Title">
content
</Admonition>
</BrowserWindow>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Announcement

import AnnouncementBar from "@theme/AnnouncementBar";
import BrowserWindow from "@site/src/components/BrowserWindow";

## AnnouncementBar

```tsx
import AnnouncementBar from "@theme/AnnouncementBar";

<AnnouncementBar />;
```

<BrowserWindow>
<AnnouncementBar />
</BrowserWindow>

## AnnouncementBar/Content

## AnnouncementBar/CloseButton
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# BackToTopButton

```tsx
import BackToTopButton from "@theme/BackToTopButton";

<BackToTopButton />;
```
28 changes: 28 additions & 0 deletions website/versioned_docs/version-2.1.0/components/CodeBlock.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# CodeBlock

import CodeBlock from "@theme/CodeBlock";
import BrowserWindow from "@site/src/components/BrowserWindow";

```tsx
import CodeBlock from "@theme/CodeBlock";

<CodeBlock language="jsx" title="Code" showLineNumbers>
{[
"function HelloCodeTitle(props) {",
" // highlight-next-line",
" return <h1>Hello, {props.name}</h1>;",
"}",
].join("\n")}
</CodeBlock>;
```

<BrowserWindow>
<CodeBlock language="jsx" title="Code" showLineNumbers>
{[
"function HelloCodeTitle(props) {",
" // highlight-next-line",
" return <h1>Hello, {props.name}</h1>;",
"}",
].join("\n")}
</CodeBlock>
</BrowserWindow>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ColorModeToggle

import ColorModeToggle from "@theme/ColorModeToggle";
import BrowserWindow from "@site/src/components/BrowserWindow";

```tsx
import ColorModeToggle from "@theme/ColorModeToggle";

<ColorModeToggle value="dark" onChange={onChange} />;
```

<BrowserWindow>
<ColorModeToggle value="dark" onChange={console.log} />
</BrowserWindow>
33 changes: 33 additions & 0 deletions website/versioned_docs/version-2.1.0/components/Details.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Details

import BrowserWindow from "@site/src/components/BrowserWindow";

```markdown
<details>
<summary>Toggle me!</summary>
<div>
<div>This is the detailed content</div>
<br />
<details>
<summary>Nested toggle! Some surprise inside...</summary>
<div>😲😲😲😲😲</div>
</details>
</div>
</details>
```

<BrowserWindow>

<details>
<summary>Toggle me!</summary>
<div>
<div>This is the detailed content</div>
<br />
<details>
<summary>Nested toggle! Some surprise inside...</summary>
<div>😲😲😲😲😲</div>
</details>
</div>
</details>

</BrowserWindow>
14 changes: 14 additions & 0 deletions website/versioned_docs/version-2.1.0/components/DocBreadcrumbs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# DocBreadcrumbs

import DocBreadcrumbs from "@theme/DocBreadcrumbs";
import BrowserWindow from "@site/src/components/BrowserWindow";

```tsx
import DocBreadcrumbs from "@theme/DocBreadcrumbs";

<DocBreadcrumbs />;
```

<BrowserWindow>
<DocBreadcrumbs />
</BrowserWindow>
14 changes: 14 additions & 0 deletions website/versioned_docs/version-2.1.0/components/DocCard.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# DocCard

import DocCard from "@theme/DocCard";
import BrowserWindow from "@site/src/components/BrowserWindow";

```tsx
import DocCard from "@theme/DocCard";

<DocCard item={{ type: "link", href: "/" }} />;
```

<BrowserWindow>
<DocCard item={{ type: "link", href: "/" }} />
</BrowserWindow>
14 changes: 14 additions & 0 deletions website/versioned_docs/version-2.1.0/components/DocCardList.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# DocCardList

import DocCardList from "@theme/DocCardList";
import BrowserWindow from "@site/src/components/BrowserWindow";

```tsx
import DocCardList from "@theme/DocCardList";

<DocCardList items={[{ type: "link", href: "/" }]} />;
```

<BrowserWindow>
<DocCardList items={[{ type: "link", href: "/" }]} />
</BrowserWindow>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"position": 10,
"label": "Components",
"collapsible": true,
"collapsed": true
}
6 changes: 6 additions & 0 deletions website/versioned_docs/version-2.1.0/guide/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"position": 1,
"label": "Guide",
"collapsible": true,
"collapsed": false
}
65 changes: 65 additions & 0 deletions website/versioned_docs/version-2.1.0/guide/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
sidebar_position: 2
description: Config your Nonepress theme
tags:
- guide

options:
menu:
- category: guide
weight: 20
---

# Theme Config

Custom NonePress theme config in `docusaurus.config.js`.

<details>
<summary>Full Example:</summary>

```js title="docusaurus.config.js" showLineNumbers
module.exports = {
themeConfig:
/** @type {import('@nullbot/docusaurus-preset-nonepress').ThemeConfig} */
({
colorMode: {
respectPrefersColorScheme: true,
},
announcementBar: {
id: "support-us",
content:
'⭐️ If you like NonePress, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/nonebot/docusaurus-theme-nonepress">GitHub</a>! ⭐️',
isCloseable: true,
},
}),
};
```

</details>

## Theme Config Type

```js title="docusaurus.config.js" showLineNumbers
module.exports = {
themeConfig:
// highlight-next-line
/** @type {import('@nullbot/docusaurus-preset-nonepress').ThemeConfig} */
(
{
// theme config
}
),
};
```

## Color Mode

```js title="docusaurus.config.js"
{
colorMode: {
defaultMode: "light",
disableSwitch: false,
respectPrefersColorScheme: true,
}
}
```
68 changes: 68 additions & 0 deletions website/versioned_docs/version-2.1.0/guide/intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
sidebar_position: 1
description: Introduction to Nonepress
tags:
- guide
- introduction

options:
menu:
- category: guide
weight: 10
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# Docusaurus Theme Nonepress

## Installation

<Tabs>
<TabItem value="yarn" default>

```bash
yarn add @nullbot/docusaurus-preset-nonepress
```

</TabItem>
<TabItem value="npm" default>

```bash
npm i @nullbot/docusaurus-preset-nonepress
```

</TabItem>
</Tabs>

## Usage

```js title="docusaurus.config.js" showLineNumbers
presets: [
[
"@nullbot/docusaurus-preset-nonepress",
/** @type {import('@nullbot/docusaurus-preset-nonepress').Options} */
({
// options
docs: {
sidebarPath: require.resolve("./sidebars.js"),
},
}),
],
];
```

## TODO

- [x] NonePress Theme Components
- [x] NonePress Theme Preset
- [x] Plugins useful to NonePress Theme
- [x] DocsMenu
- [x] SideBar Keeper
- [ ] Documentation
- [x] Introduction
- [ ] Config
- [ ] Components
- [ ] Plugins
- [ ] Preset
- [ ] Custom Theme
54 changes: 54 additions & 0 deletions website/versioned_sidebars/version-2.1.0-sidebars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"main": [
{
"type": "category",
"label": "Guide",
"link": {
"type": "generated-index",
"title": "Guide",
"description": "Start using NonePress",
"slug": "/guide/"
},
"items": [
{
"type": "autogenerated",
"dirName": "guide"
}
]
}
],
"examples": [
{
"type": "category",
"label": "Components",
"link": {
"type": "generated-index",
"title": "Components",
"description": "Examples of components",
"slug": "/components/"
},
"items": [
{
"type": "autogenerated",
"dirName": "components"
}
]
},
{
"type": "category",
"label": "Page",
"items": [
{
"type": "link",
"label": "Page",
"href": "/page-example"
}
]
},
{
"type": "link",
"label": "NoneBot",
"href": "https://nonebot.dev"
}
]
}
3 changes: 3 additions & 0 deletions website/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"2.1.0"
]

0 comments on commit 8f41091

Please sign in to comment.