Skip to content

Commit

Permalink
[Break change] update website
Browse files Browse the repository at this point in the history
  • Loading branch information
DaviRain-Su committed Aug 29, 2023
1 parent 58ef09e commit 6035f46
Show file tree
Hide file tree
Showing 10 changed files with 2,074 additions and 247 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 1
sidebar_label: Solana Co Learn tutorials
sidebar_class_name: green
title: Solana Co Learn
sidebar_position: 0
slug: /
---

# Solana Co Learn
Expand Down Expand Up @@ -73,5 +73,3 @@ sidebar_class_name: green
- [随机性](./module6/randomness/README.md)

- [最后的作品](./module6/finishing-touches/README.md)

## [💾参考资料](../intro.md)
7 changes: 5 additions & 2 deletions docs/intro.md → docs/awesome-solana-zh/README.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: Awsome Solana zh
sidebar_position: 0
sidebar_label: Start
sidebar_class_name: green
slug: /
---

import { PageMetadata } from "@docusaurus/theme-common";


> 欢迎提交pr持续补充这个列表
## Solana development 文档 📄
Expand Down
70 changes: 50 additions & 20 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,43 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

const path = require('path');

/**
* Defines a section with overridable defaults
* @param {string} section
* @param {import('@docusaurus/plugin-content-docs').Options} options
*/
function defineSection(section, version = {}, options = {}) {
return [
'@docusaurus/plugin-content-docs',
/** @type {import('@docusaurus/plugin-content-docs').Options} */
({
id: section,
path: `docs/${section}`,
routeBasePath: section,
include: ['**/*.md', '**/*.mdx'],
breadcrumbs: false,
sidebarPath: require.resolve('./sidebars.cjs'),
editUrl: 'https://github.com/CreatorsDAO/all-in-one-solana',
versions: version && {
current: {
label: version.label,
},
},
...options,
}),
];
}

const SECTIONS = [
defineSection('awesome-solana-zh'),
defineSection('Solana-Co-Learn'),
];

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'All in One Solana',
Expand All @@ -28,14 +63,10 @@ const config = {

presets: [
[
'classic',
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/CreatorsDAO/all-in-one-solana/edit/main/',
},
docs: false,
blog: {
showReadingTime: true,
editUrl:
Expand All @@ -48,6 +79,12 @@ const config = {
],
],

plugins: [
...SECTIONS,
path.resolve(__dirname, './plugins/webpack-plugin.cjs'),
path.resolve(__dirname, './plugins/tailwind-loader.cjs'),
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
Expand All @@ -59,23 +96,16 @@ const config = {
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
href: '/awesome-solana-zh',
position: 'left',
label: 'Tutorial',
label: 'Awesome Solana Zh',
},
{
type: 'doc',
docId: 'Solana-Co-Learn/README',
href: '/Solana-Co-Learn',
position: 'left',
label: 'Solana Co Learn',
},
{ to: '/blog', label: 'Blog', position: 'left' },
{
href: 'https://github.com/CreatorsDAO/all-in-one-solana/discussions',
label: 'Discussions',
position: 'right',
},
{
href: 'https://github.com/CreatorsDAO/all-in-one-solana.git',
label: 'GitHub',
Expand All @@ -87,11 +117,11 @@ const config = {
style: 'dark',
links: [
{
title: 'Docs',
title: 'Products',
items: [
{
label: 'Tutorial',
to: '/docs/intro',
label: 'Forum',
href: 'https://github.com/CreatorsDAO/all-in-one-solana/discussions',
},
],
},
Expand Down Expand Up @@ -125,7 +155,7 @@ const config = {
copyright: `Copyright © ${new Date().getFullYear()} All in One Solana site, Inc.`,
},
prism: {
theme: require('prism-react-renderer/themes/dracula'),
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
// Additional languages can be added here.
additionalLanguages: ['powershell', 'rust', 'toml', 'yaml', 'c', 'cpp'],
Expand Down
Loading

0 comments on commit 6035f46

Please sign in to comment.