Giter VIP home page Giter VIP logo

rspress's Introduction

Rspress Banner

Rspress

A fast Rspack-based static site generator.

discord channel npm version downloads license

🔥 Features

  • 🚀 Fast Startup: Based on Rust-based build tool and markdown/mdx compiler, the build speed is extremely fast, bringing you the ultimate development experience.
  • 📚 MDX Support: MDX is a powerful way to write content, allowing you to use React components in Markdown.
  • 📦 Built-in Full Text Search: Automatically generates a full-text search index for you during building process, providing out-of-the-box full-text search capabilities.
  • 🌈 Static Site Generation: In production, it automatically builds into static HTML files, which can be easily deployed anywhere.
  • 🔌 Providing Plugin System: Providing a plugin system, you can customize the build process and theme according to your needs.
  • 📝 Component Document: Support multi ways to preview your component demo.

📚 Getting Started

Go to the Quick Start to get started.

🤝 Contribution

Please read the contributing guide and let's build Rspress together.

If you have any questions, you can open an issue or go to Discord to communicate with us.

Contributors




Contributors of web-infra-dev/rspress New trends of web-infra-dev
Contributors of web-infra-dev/rspress

Code of Conduct

This repo has adopted the ByteDance Open Source Code of Conduct. Please check Code of Conduct for more details.

🦀 Links

Name Description
@rspress/mdx-rs Rust MDX compiler for Rspress.
Rspack A fast Rust-based web bundler.
Rsbuild An Rspack-based build tool for the web.
Rsdoctor A one-stop build analyzer for Rspack and Webpack.

🌟 Quality

Rspress uses Web Infra QoS to observe the trend of key metrics, such as bundle size, compile speed and install size.

📖 License

Rspress is licensed under the MIT License.

rspress's People

Contributors

10derozan avatar 9aoy avatar ambar avatar arnavk-09 avatar bvanjoi avatar bytehulk avatar caohuilin avatar chenjiahan avatar evanryuu avatar fi3ework avatar firebushtree avatar godliangcy avatar h7ml avatar hooozen avatar jbroma avatar kainstar avatar maomao1996 avatar renovate[bot] avatar sanyuan0704 avatar shulaoda avatar snowingfox avatar sooniter avatar sumy7 avatar sylingd avatar timeless0911 avatar xc2 avatar yixiaojiu avatar yukiniro avatar zonemeen avatar zoolsher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rspress's Issues

[Bug]: inconsistent flexbox layout with odd number of features in home page

Version

1.1.1

Details

It looks like the feature layout in the home page is not quite consistent. For example, 6 features as in the rspress.dev site yield a 3x2 flexbox. But 5 features as below yield a 1x6 layout, which looks bad:

---
pageType: home

hero:
  name: My Doc
  text: my doc
  tagline:
  actions:
    - theme: brand
      text: Get Started

features:
  - title: Feature 1
    details: feature 1
    icon: 📦
  - title: Feature 2
    details: feature 2
    icon: 📦
  - title: Feature 3
    details: feature 3
    icon: 📦
  - title: Feature 4
    details: feature 4
    icon: 📦
  - title: Feature 5
    details: feature 5
    icon: 📦
Screenshot 2023-10-19 at 23 48 52 I also tried other numbers: 7 for 1x7, 8 for 2x4 and 9 for 3x3, etc. Personally, I think 3xN looks nicer.

Reproduce link

N/A

Reproduce Steps

N/A

[Bug]: add dts for rspress/runtime

Version

`version: 0.0.13`

Details

image

Reproduce link

none

Reproduce Steps

When I try to use rspress/runtime, it suggests that the type is not found, which is confusing.

[Feature]: Optimize the bundle size of initial project

What problem does this feature solve?

The current size is 684.65 kB (rspress 0.0.9), we need to provide a smaller bundle size.

Success Client compiled successfully in 929 ms
info    File sizes after production build:

  File                                                  Size         Gzipped    
  doc_build/static/js/main.6e03f38e.js                  297.74 kB    90.25 kB
  doc_build/static/js/lib-polyfill.50969b76.js          138.3 kB     40.07 kB
  doc_build/static/js/lib-react.d173d706.js             137.01 kB    44.02 kB
  doc_build/static/css/main.21fb27b0.css                45.06 kB     10.08 kB
  doc_build/static/js/lib-lodash.1e262c93.js            32.9 kB      7.61 kB
  doc_build/static/js/lib-router.4ba2f6b5.js            21.66 kB     7.38 kB
  doc_build/html/main/index.html                        10.3 kB      4.17 kB
  doc_build/static/js/async/doc_index_md.d71926a1.js    846 B        483 B
  doc_build/static/js/async/doc_guide_md.15d436d4.js    822 B        474 B

  Total size:  684.65 kB
  Gzipped size:  204.53 kB

What does the proposed API look like?

We can:

  • Remove lib-lodash
  • Reduce the size of lib-polyfill (if Rspack can support polyfill by usage, it will be much smaller)
  • Reduce the size of main.js

[Feature]: Add shiki syntax highlighting plugin support

What problem does this feature solve?

rspress seems to support PL syntax highlighting by prismjs at the moment, hopefully the Shiki plugin can be added as well. The advantage of supporting shiki is that prism may can't support syntax highlighting for some less common programming languages in the short term, but if it supports the shiki plugin, the corresponding syntax highlighting grammar can be applied to shiki as long as it has a VSCode extension. And the Nushell official site is currently using this solution!

What does the proposed API look like?

Something like this: https://vuepress.github.io/reference/plugin/shiki.html

[Bug]: Error when modifying docs/index.md homepage in development mode

Version

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-1240P
    Memory: 9.06 GB / 15.70 GB
Browsers:
    Edge: Spartan (44.19041.3570.0), Chromium (118.0.2088.61)
    Internet Explorer: 11.0.19041.3570
npmPackages:
    rspress: ^1.1.3 => 1.1.3

Details

  1. pnpm dev
  2. edit docs/index.md, just add a blank
oxi-doc on  master via  v18.18.2 
❯ p dev

> [email protected] dev D:\code\oxi-doc
> rspress dev

🔥 Rspress v1.1.3

info    Starting dev server...
info    Dev server running at:

  > Network:  http://192.168.8.131:8080/
  > Local:    http://localhost:8080/

ready   Client compiled in 5.4 s
thread 'tokio-runtime-worker' panicked at 'Module(javascriptx|D:\code\oxi-doc\node_modules\.pnpm\@[email protected][email protected][email protected][email protected]\node_modules\@rspress\core\loader.cjs??ruleSet[1].rules[11].oneOf[0].use[0]!D:\code\oxi-doc\node_modules\.pnpm\[email protected][email protected]\node_modules\string-replace-loader\index.js??ruleSet[1].rules[11].oneOf[0].use[1]!D:/code/oxi-doc/docs/index.md) should be added before using', crates\rspack_core\src\chunk_graph\chunk_graph_module.rs:73:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
<e> [webpack-dev-middleware] [Error: error[internal]: Module(javascriptx|D:\code\oxi-doc\node_modules\.pnpm\@[email protected][email protected][email protected][email protected]\node_modules\@rspress\core\loader.cjs??ruleSet[1].rules[11].oneOf[0].use[0]!D:\code\oxi-doc\node_modules\.pnpm\s[email protected][email protected]\node_modules\string-replace-loader\index.js??ruleSet[1].rules[11].oneOf[0].use[1]!D:/code/oxi-doc/docs/index.md) should be added before using
<e> This is not expected, please file an issue at https://github.com/web-infra-dev/rspack/issues.
<e>    0: napi_register_module_v1
<e>    1: napi_register_module_v1
<e>    2: <unknown>
<e>    3: <unknown>
<e>    4: <unknown>
<e>    5: napi_register_module_v1
<e>    6: napi_register_module_v1
<e>    7: napi_register_module_v1
<e>    8: napi_register_module_v1
<e>    9: napi_register_module_v1
<e>   10: napi_register_module_v1
<e>   11: BaseThreadInitThunk
<e>   12: RtlUserThreadStart
<e>
<e>
<e> ] {
<e>   code: 'GenericFailure'
<e> }

Restart after exiting dev mode, no error reported

Reproduce link

none

Reproduce Steps

as Details

[Feature]: support divider type in _meta.json

What problem does this feature solve?

Currently we use _meta.json to generate sidebar automatically. Sometimes, we need to specify a divider between two sidebar items.

What does the proposed API look like?

The content of _meta.json can be like this:

[
  {
    "type": "dir",
    "name": "guide",
    "label": "Guide"
  },
  { "type": "divider" },
  {
    "type": "dir",
    "name": "advanced",
    "label": "Advanced"
  },
]

Then rspress will render a divider between the two sidebar group.

[Feature]: support `--host` and `--port` options in dev server

What problem does this feature solve?

The preview server already supports specified port and host, so I can work around it by running build + preview. But it would be nice if the dev server could natively support it. This is quite useful when developing on a remote server.

What does the proposed API look like?

N/A

[Bug]: Doc right aside do not contain the title of document fragments

Version

System:
    OS: macOS 13.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 5.36 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 114.0.5735.198
    Safari: 16.5.1
  npmPackages:
    @modern-js/doc-tools: workspace:* => 2.26.0 
    @modern-js/tsconfig: workspace:* => 2.26.0

Details

The right aside bar do not contain the title of document fragments.

For example, The "CLI Tool" chapter is imported as a Component:

import CliToolVue from '@zh/shared/cliToolVue.md';

<CliToolVue />

And the generated aside bar do not contain "CLI Tool":

image

Reproduce link

https://github.com/web-infra-dev/modern.js

Reproduce Steps

  1. cd packages/document/builder
  2. pnpm run dev

[Feature]: Allow to configure prism languages

What problem does this feature solve?

Currently, the prism languages of Rspress is fixed, and users may want to support other languages, so we should provide a configure for it.

image

What does the proposed API look like?

export default defineConfig({
    markdown: {
      highlightLanguages: ['ejs', 'yaml'],
   },
});

Rspress Roadmap

💡 We will update the Roadmap content every quarter. Please stay tuned.

Tasks

Tasks

  1. 🐞 bug
    sanyuan0704
  2. 💡 good first issue
    Yukiniro
  3. 🐞 bug
  4. enhancement 👏 PR welcome
  5. sanyuan0704

[Bug]: path without /index will be recognized as dead links

Version

System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 70.20 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Browsers:
    Chrome: 117.0.5938.92
    Safari: 15.6.1
  npmPackages:
    @rspress/shared: 0.2.0 => 0.0.0-next-20230927072732

Details

use 0.2.0 next version

It used to be written as /en/api/#config, but now the dead link check will report an error, and it needs to be written as /en/api/index#config

image image

Reproduce link

none

Reproduce Steps

none

[Bug]: Unable to display images using `<img/>`

Version

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 AMD Ryzen 5 5600H with Radeon Graphics
    Memory: 7.05 GB / 15.86 GB
    Chrome: bookmarks.html
initial_preferences
    Edge: Spartan (44.19041.3570.0), Chromium (117.0.2045.60)
    Internet Explorer: 11.0.19041.3570

Details

If I use <img/>tags to import online images, they will not be displayed, but if I use '! [] () ` can be displayed

image

The result should be two images, but the page only has one

image

I am unable to search for a solution and hope to receive an answer

Reproduce link

This is just a small question, so I don't have a project address

Reproduce Steps

Using img tags and using ![]() create two images and then view the page

[Bug]: App crash due to add _meta.json or yaml format error

Version

System:
    OS: macOS 14.0
    CPU: (10) arm64 Apple M2 Pro
    Memory: 206.80 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 118.0.5993.96
    Safari: 17.0
  npmPackages:
    rspress: ^1.1.3 => 1.1.3

Details

After creating _meta.json, the app will crash. Then it prompts that the port is already in use, I should restart the app manually.
image
I changed the frontmatter in index.md, and the app also crashed. Throw out a yaml exception, that makes a bad DX.
image

Reproduce link

https://github.com/web-infra-dev/rspress/tree/main/packages/create-rspress/template

Reproduce Steps

Use rspress default template.

  1. Update frontmatter in index.md, deliberately creating yaml syntax error.
  2. Add new page, then add a _meta.json.

[Feature]: Limit Rspress version range in the template

What problem does this feature solve?

When we create a new Rspress project, the version of the rspress package is latest by default. We should use ^0.0.9 to avoid automatic upgrades to versions with breaking changes

{
  "name": "rspress-doc-template",
  "private": true,
  "dependencies": {
    "rspress": "latest"
  }
}

What does the proposed API look like?

{
  "name": "rspress-doc-template",
  "private": true,
  "dependencies": {
    "rspress": "^0.0.9"
  }
}

[Bug]: Anchor not work when header contains link

Version

System:
    OS: macOS 13.5.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 2.81 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 118.0.5993.88
    Safari: 16.6
  npmPackages:
    @rspress/shared: ^1.1.1 => 1.1.1 
    rspress: ^1.1.1 => 1.1.1

Details

  • Example:
### [@rsbuild/plugin-vue](/plugins/list/plugin-vue.html)

Provides support for Vue 3 SFC (Single File Components).
  • Result:

image

Reproduce link

https://rsbuild.dev/plugins/list/index.html

Reproduce Steps

  1. Open https://rsbuild.dev/plugins/list/index.html
  2. Click:

image

[Bug]: 使用pluginPreview后SSR产物不能正确构建

版本信息

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz
    Memory: 9.17 GB / 15.84 GB
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (117.0.2045.36)   
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @rspress/plugin-preview: ^0.1.1 => 0.1.1

问题详情

加入预览插件后,运行build命令就不能正确生成SSR产物。

复现链接

pnpm create rspress@latest

复现步骤

pnpm install @rspress/plugin-preview -D

修改rspress.config.ts

import path from 'path'
import { defineConfig } from 'rspress/config'
import { pluginPreview } from '@rspress/plugin-preview'

export default defineConfig({
  plugins: [pluginPreview()],  // 这里加入了预览插件
  root: path.join(__dirname, 'docs'),
  title: 'Rspress',
  description: 'Rspack-based Static Site Generator',
  icon: '/rspress-icon.png',
  logo: {
    light: '/rspress-light-logo.png',
    dark: '/rspress-dark-logo.png'
  },
  themeConfig: {
    socialLinks: [
      {
        icon: 'github',
        mode: 'link',
        content: 'https://github.com/web-infra-dev/rspress'
      }
    ]
  }
})

pnpm build

[Feature]: Doc supports client redirects

What problem does this feature solve?

Support client-side redirects, like @docusaurus/plugin-client-redirects.

The redirects can be used when we modify the URL address of some pages and need to keep the original URL accessible.

What does the proposed API look like?

// modern.config.ts
{
  doc: {
    redirects: [
      // /docs/oldDoc -> /docs/newDoc
      {
        to: '/docs/newDoc',
        from: '/docs/oldDoc',
      },
      // Redirect from multiple old paths to the new path
      {
        to: '/docs/newDoc2',
        from: ['/docs/oldDocFrom2019', '/docs/legacyDocFrom2016'],
      },
    ],
  }
}

[Feature]: Support insert some contents in overview page

What problem does this feature solve?

Support insert some contents in overview page.

What does the proposed API look like?

  • api/index.md:
---
overview: true
---

# Overview

Here are some contents before the API overview.

// API overview

[Feature]: Support monorepo

What problem does this feature solve?

Currently, rspress could not support perfectly, when we write docs in packages, and defined sidebar using _meta.json, it's not working.

The monorepo dir structure is usually as below:

- docs      # top level docs
   - _meta.json
- packages
  - pkg1
     - docs
     - _meta.json
  - pkg2
     - docs
     - _meta.json
  - pkg3
     - docs
     - _meta.json

What does the proposed API look like?

Just add monorepo supporting, and better provide plugin API at the same time.

[Bug]: Search Index not loading from Asset Prefix path

Version

System: macOS 13.5.1
Browser: Chrome 113
RSPress 0.0.9

Details

My doc site requires an assetPrefix since its hosted on a CDN in a sub directory. After setting the rspress.config -> builderConfig:output:assetPrefix, the build output does not concatenate the ASSET_PREFIX, it only shows '/static/'

After analyzing the source code here in github, it looks to be correct. However the compiled bundle does not show the assetPrefix. all other assets such as css, js, etc. respect the assetPrefix that I have defined they work just fine. It seems related to how the LocalProvider resolves "ASSET_PREFIX".

Again, everything works with my site but the search feature.

The easiest way to test is to set the output:assetPrefix, run a build and analyze the output file for "search_index" and you'll fine that there is no additional concat statement for the prefix.

Reproduce link

https://www.google.com/

Reproduce Steps

Sorry for no reproduce link, its hard to demonstrate this as a bad prefix url will prevent the site from rendering.

  1. Create a simple rspress project using rspress 0.0.8 or 0.0.9
  2. In the rspress.config.ts, set builderConfig -> output -> assetPrefix to a value such as "https://www.google.com"
  3. Run npx rspress build
  4. Go the build output directory, then static, then js, then the vendors~node_modules_modern-js*
  5. Search for "/static/"
  6. Notice there is no asset prefix present

[Feature]: Support multiline hero text

What problem does this feature solve?

Yaml supports multiple lines string, but it can not work in the front matter config.

If multiple lines string are supported, users can control the line break of the hero text, making text typesetting more convenient.

What does the proposed API look like?

// index.mdx
---
pageType: home
hero:
  name: XXX
  text: |
    This is a multiline string.
    It can span multiple lines.
---

[Bug]: Anchor is removed after redirection

Version

-

Details

When an English user visits https://modernjs.dev/builder/api/config-html.html#htmldisablehtmlfolder, the URL will be redirected to https://modernjs.dev/builder/en/api/config-html.html, and the hash anchor is removed.

The hash anchor may be the same between the English and Chinese documentation, so it is better to keep the hash anchor.

Reproduce link

https://modernjs.dev/builder/api/config-html.html#htmldisablehtmlfolder

Reproduce Steps

See above.

[Bug]: RangeError: Invalid WebSocket frame: RSV1 must be clear

版本信息

System:
    OS: macOS 12.6.6
    CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
    Memory: 31.64 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Browsers:
    Chrome: 118.0.5993.70
    Edge: 118.0.2088.46
    Safari: 15.6.1

问题详情

yarn run v1.22.11
$ rspress dev
🔥 Rspress v1.0.2

info Starting dev server...
info Dev server running at:

Local: http://localhost:8080/
Network: http://192.168.2.231:8080/

ready Client compiled in 5.9 s
node:events:491
throw er; // Unhandled 'error' event
^

RangeError: Invalid WebSocket frame: RSV1 must be clear
at Receiver.getInfo (/Users/grace/Documents/repos/rspress-site/node_modules/ws/lib/receiver.js:218:14)
at Receiver.startLoop (/Users/grace/Documents/repos/rspress-site/node_modules/ws/lib/receiver.js:155:22)
at Receiver._write (/Users/grace/Documents/repos/rspress-site/node_modules/ws/lib/receiver.js:93:10)
at writeOrBuffer (node:internal/streams/writable:392:12)
at _write (node:internal/streams/writable:333:10)
at Writable.write (node:internal/streams/writable:337:10)
at Socket.socketOnData (/Users/grace/Documents/repos/rspress-site/node_modules/ws/lib/websocket.js:1286:35)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on WebSocket instance at:
at Receiver.receiverOnError (/Users/grace/Documents/repos/rspress-site/node_modules/ws/lib/websocket.js:1172:13)
at Receiver.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'WS_ERR_UNEXPECTED_RSV_1',
[Symbol(status-code)]: 1002
}

Node.js v18.16.1

复现链接

复现步骤

  1. npm create rspress@^1.0.2
  2. cd 项目目录
  3. npm i
  4. yarn dev

[Bug]: 在cli进行新建项目的时候描述没有进行转义字符化导致的编译错误

版本信息

System:
OS: Linux 6.5 Garuda Linux
CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-1240P
Memory: 5.01 GB / 15.33 GB
Container: Yes
Shell: 5.9 - /bin/zsh

问题详情

在新建项目描述里填写存在'字符的时候,并没有将其转义,而是直接添加到了rspress.config.ts中。

例如如果在描述中输入"I'm good",最终的配置中会出现description: 'I'm good',

复现链接

任何环境均可复现

复现步骤

使用官方提供的创建步骤进行创建即可复现

[Bug]: HMR not work for sidebar label

Version

System:
    OS: macOS 13.5.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 2.30 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 118.0.5993.88
    Safari: 16.6
  npmPackages:
    @rspress/shared: ^1.1.1 => 1.1.1 
    rspress: ^1.1.1 => 1.1.1

Details

After updating the h1 of a markdown file, the sidebar label can not be updated, it cannot be updated even after refreshing the page.

image

Reproduce link

https://github.com/web-infra-dev/rsbuild/tree/main/packages/document

Reproduce Steps

  1. Update h1 in markdown file.

[Feature]: plugin-jsdoc

这个功能解决了什么问题?

解析jsdoc生成静态文档

你期望的 API 是什么样子的?

和typedoc用法类似

Tasks

No tasks being tracked yet.

[Feature]: Support HMR for plugins

What problem does this feature solve?

RSPress works great so I wanted to start with a thank you!

I'm not sure if this is a feature or a bug, but currently I am using RSPress 0.0.13, and using the @theguild/remark-mermaid plugin. I have noticed that HMR does not work for mermaid diagrams. Other code snippets, mdx files, etc. seem to work without any issues. Is it possible to support this feature?

What does the proposed API look like?

I don't think there is an API change to support this feature, and probably iterating all the plugins may have a performance implication. It's possible that their plugin is responsible for the functionality/hook.

[Feature]: ensure equal padding width on both sides of the content

What problem does this feature solve?

On my 14-inch Macbook, the left side padding width is 140px, the right side padding width is 120px. This causes the page to look asymmetrical.

image

What does the proposed API look like?

Can we keep the padding width consistent on both sides of the content?

[Feature]: Unify the logger style

What problem does this feature solve?

The logger style of Rspress and Modern.js Builder are different now:

Screenshot 2023-09-28 at 14 58 42

What does the proposed API look like?

@sanyuan0704 Do you want Rspress's logger style to be consistent with Modern.js?

If so, I can release the @modern-js/utils/logger module as a separate package, and let Rspress / Rsbuild / Modern.js to use it.

[Feature]: Expose the PackageManagerTabs component to users

What problem does this feature solve?

The PackageManagerTabs component is very useful for npm package maintainers, we can expose this component, so users can directly use it.

What does the proposed API look like?

The user only need to

<PackageManagerTabs command="npm install rspress typescript ts-node -D" />

The component will automatically replace npm install with yarn add or pnpm add.

Or we can pass an object:

<PackageManagerTabs
  :command="{
    npm: 'npm install rspress typescript ts-node -D',
    yarn: 'yarn add rspress typescript ts-node -D',
    pnpm: 'pnpm add rspress typescript ts-node -D',
    bun: 'bun add rspress typescript ts-node -D',
  }"
/>

[Feature]: should nav item be clickable when having both 'items' and 'link' ?

What problem does this feature solve?

Say I have a nav config like this

  themeConfig: {
    nav: [
      { 
        text: 'Coding Guide', 
        link: '/guide/', 
        items: [
          { text: 'HTML', link: '/guide/html' },
          { text: 'Javascript', link: '/guide/js' },
          { text: 'CSS', link: '/guide/css' },
        ] 
      }
    ],
  }

After setting items to the nav, it is not clickable.
image

I'm wondering if we can still redirect when link and items are both provided.

This is quite a common need indeed, just like in Apple Store, the nav could still redirect.

image

Vitepress does not support this, I'm thinking maybe we can do this in Rspress?

What does the proposed API look like?

  themeConfig: {
    nav: [
      { 
        link: '...', 
        items: [] 
      }
    ],
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.