Skip to content

Commit

Permalink
[feat] 更新博客
Browse files Browse the repository at this point in the history
# Conflicts:
#	docusaurus.config.js
#	package-lock.json
#	package.json
#	pnpm-lock.yaml
  • Loading branch information
DBSDs committed Dec 25, 2023
1 parent 67ce956 commit 87916d9
Show file tree
Hide file tree
Showing 15 changed files with 12,440 additions and 25,452 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@



## [点击跳转](https://blog-jade-five-78.vercel.app/)
## [点击跳转](http://www.lianliankan.online)
4 changes: 2 additions & 2 deletions docs/Vscode/开发Vscode语法插件.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 2

---

<!--
# 开发Vscode语法插件
## 背景
Expand Down Expand Up @@ -74,4 +74,4 @@ vsce package
## 总结
最后推广一下我的两个插件:
* react-hooks(typescript环境下) 自动补全插件: [react-hooks-snippet/typescript](https://marketplace.visualstudio.com/items?itemName=op-chen.react-hooks-snippet)
* js 函数快速生成注释模版插件(待完善中...): [auto comment](https://marketplace.visualstudio.com/items?itemName=op-chen.auto-comment)
* js 函数快速生成注释模版插件(待完善中...): [auto comment](https://marketplace.visualstudio.com/items?itemName=op-chen.auto-comment) -->
132 changes: 0 additions & 132 deletions docusaurus.config.js

This file was deleted.

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

const config: Config = {
title: `Op-chen'Blog`,
tagline: "Op-chen的个人主页",
url: "https://blog-jade-five-78.vercel.app",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "/img/avator.png",
projectName: "Blog", // Usually your repo name.

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "zh",
locales: ["zh"],
},
// themes: ['@docusaurus/theme-search-algolia'],
presets: [
[
"classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
remarkPlugins: [require("mdx-mermaid")],
},
blog: {
showReadingTime: true,

editUrl:
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
theme: {
customCss: require.resolve("./src/css/custom.scss"),
},
} satisfies Preset.Options,
],
],
themeConfig: {
navbar: {
title: `Op-chen'Blog`,
logo: {
alt: "My Site Logo",
src: "/img/avator.png",
},
items: [
{
type: "doc",
docId: "intro",
position: "left",
label: "文章",
},
{
type: "dropdown",
label: "工具箱",
position: "left",
items: [
{
label: "时间戳工具",
to: "/tools/timestamp",
},
{
label: "Base64编解码",
to: "/tools/base64compute",
},
{
label: "三维地球",
to: "/tools/earth",
},
{
label: "Json格式",
href: "https://dbsds.github.io/json-view-web/build/",
},
],
},

{
type: "localeDropdown",
position: "right",
},
{
href: "https://github.com/DBSDs",
position: "right",
className: "header-github-link",
"aria-label": "GitHub 仓库",
},
],
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
algolia: {
// Algolia 提供的应用 ID
appId: "TS23858RNP",

// 公开 API 密钥:提交它没有危险
apiKey: "649cdab6bb34cb22dbe8e4d40d36823e",

indexName: "jade-five-78",

// 可选:见下文
contextualSearch: true,

// 可选:声明哪些域名需要用 window.location 型的导航而不是 history.push。 适用于 Algolia 配置会爬取多个文档站点,而我们想要用 window.location.href 在它们之间跳转时。
externalUrlRegex: "external\\.com|domain\\.com",

// // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
// replaceSearchResultPathname: {
// from: '/docs/', // or as RegExp: /\/docs\//
// to: '/',
// },

// Optional: Algolia search parameters
searchParameters: {},

// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search",

//... other Algolia params
},
} satisfies Preset.ThemeConfig,
plugins: ["docusaurus-plugin-sass"],
};

export default config;
Loading

0 comments on commit 87916d9

Please sign in to comment.